diff options
author | Scott Worley <scottworley@scottworley.com> | 2019-12-15 13:30:40 -0800 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-04-21 08:24:27 +0200 |
commit | d2d7fbc431a06ec58f537921dc1b898167a69adc (patch) | |
tree | 9d778759a233e48f21d91c8b4c8e79f2e4e4779d /pkgs/tools/compression/gzip | |
parent | 9fe2f2565e4acaabb9c4e0a0ab639a493faf8447 (diff) | |
download | nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.tar nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.tar.gz nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.tar.bz2 nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.tar.lz nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.tar.xz nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.tar.zst nixpkgs-d2d7fbc431a06ec58f537921dc1b898167a69adc.zip |
gzip: Don't depend on gzip being in $PATH
Diffstat (limited to 'pkgs/tools/compression/gzip')
-rw-r--r-- | pkgs/tools/compression/gzip/default.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 10cfa086860..65760a0b6cc 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -17,6 +17,15 @@ stdenv.mkDerivation rec { makeFlags = [ "SHELL=/bin/sh" "GREP=grep" ]; + # Many gzip executables are shell scripts that depend upon other gzip + # executables being in $PATH. Rather than try to re-write all the + # internal cross-references, just add $out/bin to PATH at the top of + # all the executables that are shell scripts. + preFixup = '' + sed -i '1{;/#!\/bin\/sh/aPATH="'$out'/bin:$PATH" + }' $out/bin/* + ''; + meta = { homepage = "https://www.gnu.org/software/gzip/"; description = "GNU zip compression program"; |