git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108830 from khumba/hplip-ppd-search-path
commit4539bf9ebe357fd361c04485e69c7fd44f1d7824 authorDoron Behar <doron.behar@gmail.com> dateSun 10 Jan 2021, 10:33 (6 years ago) parenta29fcc160df55c
2 files changed+30
pkgs/misc/drivers/hplip/default.nix+6 pkgs/misc/drivers/hplip/hplip-3.20.11-nixos-cups-ppd-search-path.patch+24
pkgs/misc/drivers/hplip/default.nix+6
@@ -93,6 +93,12 @@ python3Packages.buildPythonApplication {
9393 # https://bugs.launchpad.net/hplip/+bug/1788706
9494 # https://bugs.launchpad.net/hplip/+bug/1787289
9595 ./image-processor.patch
96+
97+ # HPLIP's getSystemPPDs() function relies on searching for PPDs below common FHS
98+ # paths, and hp-setup crashes if none of these paths actually exist (which they
99+ # don't on NixOS). Add the equivalent NixOS path, /var/lib/cups/path/share.
100+ # See: https://github.com/NixOS/nixpkgs/issues/21796
101+ ./hplip-3.20.11-nixos-cups-ppd-search-path.patch
96102 ];
97103
98104 prePatch = ''
pkgs/misc/drivers/hplip/hplip-3.20.11-nixos-cups-ppd-search-path.patchnew file+24
@@ -0,0 +1,24 @@
1+From: Bryan Gardiner <bog@khumba.net>
2+Date: Sat, 9 Jan 2021 16:51:20 -0800
3+Subject: [PATCH] Add NixOS CUPS PPD search path.
4+
5+---
6+ base/g.py | 2 +-
7+ 1 file changed, 1 insertion(+), 1 deletion(-)
8+
9+diff --git a/base/g.py b/base/g.py
10+index f73e23f..758f339 100644
11+--- a/base/g.py
12++++ b/base/g.py
13+@@ -283,7 +283,7 @@ prop.max_message_len = 8192
14+ prop.max_message_read = 65536
15+ prop.read_timeout = 90
16+
17+-prop.ppd_search_path = '/usr/share;/usr/local/share;/usr/lib;/usr/local/lib;/usr/libexec;/opt;/usr/lib64'
18++prop.ppd_search_path = '/var/lib/cups/path/share;/usr/share;/usr/local/share;/usr/lib;/usr/local/lib;/usr/libexec;/opt;/usr/lib64'
19+ prop.ppd_search_pattern = 'HP-*.ppd.*'
20+ prop.ppd_download_url = 'http://www.linuxprinting.org/ppd-o-matic.cgi'
21+ prop.ppd_file_suffix = '-hpijs.ppd'
22+--
23+2.29.2
24+