From a9d90273d8273a13364269111fc76afc2783a327 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 1 May 2020 21:36:01 +0200 Subject: [PATCH] gzip: add setup-hook to stop gzip from adding timestamps to headers --- pkgs/tools/compression/gzip/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 65760a0b6ccd..eb680ff8a061 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -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";