cabal2nix: include nix in the generated wrapper to ensure that nix-prefetch-url is in $PATH

Fixes https://github.com/NixOS/nixpkgs/issues/25718.
This commit is contained in:
Peter Simons 2017-05-15 09:34:39 +02:00
parent 8b647e991f
commit fc0543cd88

View file

@ -742,7 +742,9 @@ with pkgs;
exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
install -D $out/bin/${drv.pname} $exe
rm -rf $out/{bin,lib,share}
makeWrapper $exe $out/bin/${drv.pname} --prefix PATH ":" "${nix-prefetch-scripts}/bin"
makeWrapper $exe $out/bin/${drv.pname} \
--prefix PATH ":" "${nix}/bin" \
--prefix PATH ":" "${nix-prefetch-scripts}/bin"
mkdir -p $out/share/bash-completion/completions
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/${drv.pname}
'';