diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index 98a67a75f0b..c8566bfc07a 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -101,7 +101,12 @@ 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 "gzip -c" "gzip -cn" + # HPLIP hardcodes absolute paths everywhere. Nuke from orbit. find . -type f -exec sed -i \ -e s,/etc/hp,$out/etc/hp,g \ @@ -149,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; #