Unverified Commit 73858417 authored by John Ericson's avatar John Ericson Committed by GitHub
Browse files

gzip: fix cygwin build (#476285)

parents ddffc58e 3d54445b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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