From edf8f5d054d878adba911c8fdb26ecba19ae4db4 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 9 Oct 2021 09:14:41 +0100 Subject: [PATCH] p7zip: fix determinism of compressed manpages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diffoscope shown non-determinism in embedded gzip timestamp: --- p7zip-17.04/share/man/man1/7z.1.gz +++ p7zip-17.04.check/share/man/man1/7z.1.gz ─ filetype from file(1) @@ -1 +1 @@ -gzip compressed data, was "7z.1", last modified: Fri Oct 1 14:14:55 2021, from Unix +gzip compressed data, was "7z.1", last modified: Sat Oct 9 08:15:33 2021, from Unix Fix it by using `gzip -n`. --- pkgs/tools/archivers/p7zip/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix index 96f9262427b0..7f892a44da5d 100644 --- a/pkgs/tools/archivers/p7zip/default.nix +++ b/pkgs/tools/archivers/p7zip/default.nix @@ -14,6 +14,9 @@ stdenv.mkDerivation rec { # Default makefile is full of impurities on Darwin. The patch doesn't hurt Linux so I'm leaving it unconditional postPatch = '' sed -i '/CC=\/usr/d' makefile.macosx_llvm_64bits + # Avoid writing timestamps into compressed manpages + # to maintain determinism. + substituteInPlace install.sh --replace 'gzip' 'gzip -n' chmod +x install.sh # I think this is a typo and should be CXX? Either way let's kill it