summaryrefslogtreecommitdiffstats
path: root/pkgs/misc/drivers
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2021-07-01 00:37:24 +0300
committerArtturin <Artturin@artturin.com>2021-07-07 23:50:47 +0300
commit1422563f54681f3ea3805fa1b8f3571f20dd7e19 (patch)
tree16a129a224b12f0563aec95903fe9719a1146669 /pkgs/misc/drivers
parent46c7445c34fbd71118b217593b906e3e9df3caa2 (diff)
hplip: add -n to gzip to improve reproducibility
Diffstat (limited to 'pkgs/misc/drivers')
-rw-r--r--pkgs/misc/drivers/hplip/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index 0decad90ae3c..c8566bfc07a9 100644
--- a/pkgs/misc/drivers/hplip/default.nix
+++ b/pkgs/misc/drivers/hplip/default.nix
@@ -101,10 +101,11 @@ python3Packages.buildPythonApplication {
./hplip-3.20.11-nixos-cups-ppd-search-path.patch
];
- prePatch = ''
+ postPatch = ''
# https://github.com/NixOS/nixpkgs/issues/44230
substituteInPlace createPPD.sh \
- --replace ppdc "${cups}/bin/ppdc"
+ --replace ppdc "${cups}/bin/ppdc" \
+ --replace "gzip -c" "gzip -cn"
# HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
find . -type f -exec sed -i \
@@ -153,6 +154,12 @@ python3Packages.buildPythonApplication {
export CUPS_DATADIR="${cups}/share/cups"
'';
+ postConfigure = ''
+ # don't save timestamp, in order to improve reproducibility
+ substituteInPlace Makefile \
+ --replace "GZIP_ENV = --best" "GZIP_ENV = --best -n"
+ '';
+
enableParallelBuilding = true;
#