nix-prefetch
nix-prefetch copied to clipboard
Do not depend on NIX_PATH
When running the following on a system without any channels in Nix path, it fails:
$ nix-prefetch hello.src
warning: unknown setting 'experimental-features'
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
With more people starting to use flakes exclusively, it would be useful not to rely on NIX_PATH.
Additional note: it's possible to run nix-prefetch --file /nix/store/path_to_nixpkgs ...
to specify nixpkgs path, but that's not enough to get rid of NIX_PATH
dependency directly because of https://github.com/msteen/nix-prefetch/blob/master/lib/lib.nix#L1.