Merge pull request #131200 from NixOS/backport-128812-to-release-21.05

This commit is contained in:
Artturi 2021-08-06 15:41:04 +03:00 committed by GitHub
commit a9919ec147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -101,7 +101,12 @@ python3Packages.buildPythonApplication {
./hplip-3.20.11-nixos-cups-ppd-search-path.patch ./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. # HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
find . -type f -exec sed -i \ find . -type f -exec sed -i \
-e s,/etc/hp,$out/etc/hp,g \ -e s,/etc/hp,$out/etc/hp,g \
@ -149,6 +154,12 @@ python3Packages.buildPythonApplication {
export CUPS_DATADIR="${cups}/share/cups" 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; enableParallelBuilding = true;
# #