gzip: add setup-hook to stop gzip from adding timestamps to headers

This commit is contained in:
Pavol Rusnak 2020-05-01 21:36:01 +02:00 committed by Frederik Rietdijk
parent 4f5b81cdcf
commit a9d90273d8

View File

@ -1,4 +1,8 @@
{ stdenv, fetchurl, xz }:
{ stdenv
, fetchurl
, xz
, writeText
}:
stdenv.mkDerivation rec {
pname = "gzip";
@ -26,6 +30,12 @@ stdenv.mkDerivation rec {
}' $out/bin/*
'';
# set GZIP env variable to "-n" to stop gzip from adding timestamps
# to archive headers: https://github.com/NixOS/nixpkgs/issues/86348
setupHook = writeText "setup-hook" ''
export GZIP="-n"
'';
meta = {
homepage = "https://www.gnu.org/software/gzip/";
description = "GNU zip compression program";