nix-prefetch-scripts: explicitly depend on Nix

Otherwise, a call to, for example, nix-prefetch-git, in a nix-shell --pure or
nix-build phase would result in an error such as:

    Switched to a new branch 'fetchgit'
    removing `.git'...
    /nix/store/7qvjji7kbd033nsyxlpiiiam61a44yz9-nix-prefetch-git/bin/.nix-prefetch-git-wrapped: line 374: nix-hash: command not found
This commit is contained in:
Valérian Galliat 2016-02-28 22:47:44 -05:00
parent ae2ad0dfc1
commit 269d0864b5

View file

@ -1,5 +1,5 @@
{ stdenv, makeWrapper, buildEnv,
git, subversion, mercurial, bazaar, cvs, unzip, curl, gnused, coreutils
git, subversion, mercurial, bazaar, cvs, unzip, curl, gnused, coreutils, nix
}:
let mkPrefetchScript = tool: src: deps:
@ -18,6 +18,7 @@ let mkPrefetchScript = tool: src: deps:
wrapArgs="$wrapArgs --prefix PATH : $dep/bin"
done
wrapArgs="$wrapArgs --prefix PATH : ${gnused}/bin"
wrapArgs="$wrapArgs --prefix PATH : ${nix}/bin" # For nix-hash
wrapArgs="$wrapArgs --set HOME : /homeless-shelter"
wrapProgram $out/bin/$name $wrapArgs
'';