diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 0bd5a47cd29b..9d250c69fe6d 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -52,6 +52,12 @@ stdenv.mkDerivation (finalAttrs: { sed -i '1{;/#!\/bin\/sh/aPATH="'$out'/bin:$PATH" }' $out/bin/* '' + # avoid wrapping the actual executable on cygwin because changing the + # extension will break dll linking + + lib.optionalString stdenv.hostPlatform.isCygwin '' + mv $out/bin/{,.}gzip.exe + ln -s .gzip.exe $out/bin/gzip + '' # run gzip with "-n" when $GZIP_NO_TIMESTAMPS (set by stdenv's setup.sh) is set to stop gzip from adding timestamps # to archive headers: https://github.com/NixOS/nixpkgs/issues/86348 # if changing so that there's no longer a .gzip-wrapped then update copy in make-bootstrap-tools.nix