gzip: fix cygwin build

This commit is contained in:
David McFarland
2026-01-02 12:48:09 -04:00
parent be8c8ea769
commit 3d54445b2b
+6
View File
@@ -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