Merge pull request #128812 from Artturin/fix-hplip

This commit is contained in:
Sandro 2021-07-08 02:30:07 +02:00 committed by GitHub
commit 7b4ff2184e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
#