|
1 | 1 | { stdenv, fetchurl, substituteAll
|
2 | 2 | , pkgconfig
|
| 3 | +, makeWrapper |
3 | 4 | , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils
|
4 |
| -, net_snmp, openssl, polkit |
| 5 | +, net_snmp, openssl, polkit, nettools |
5 | 6 | , bash, coreutils, utillinux
|
6 | 7 | , qtSupport ? true
|
7 | 8 | , withPlugin ? false
|
|
22 | 23 | sha256 = "1y3wdax2wb6kdd8bi40wl7v9s8ffyjz95bz42sjcpzzddmlhcaxg";
|
23 | 24 | };
|
24 | 25 |
|
25 |
| - hplipState = |
26 |
| - substituteAll |
27 |
| - { |
28 |
| - inherit version; |
29 |
| - src = ./hplip.state; |
30 |
| - }; |
31 |
| - |
32 |
| - hplipPlatforms = |
33 |
| - { |
34 |
| - "i686-linux" = "x86_32"; |
35 |
| - "x86_64-linux" = "x86_64"; |
36 |
| - "armv6l-linux" = "arm32"; |
37 |
| - "armv7l-linux" = "arm32"; |
38 |
| - }; |
| 26 | + hplipState = substituteAll { |
| 27 | + inherit version; |
| 28 | + src = ./hplip.state; |
| 29 | + }; |
| 30 | + |
| 31 | + hplipPlatforms = { |
| 32 | + "i686-linux" = "x86_32"; |
| 33 | + "x86_64-linux" = "x86_64"; |
| 34 | + "armv6l-linux" = "arm32"; |
| 35 | + "armv7l-linux" = "arm32"; |
| 36 | + }; |
39 | 37 |
|
40 | 38 | hplipArch = hplipPlatforms."${stdenv.system}"
|
41 | 39 | or (throw "HPLIP not supported on ${stdenv.system}");
|
@@ -63,6 +61,7 @@ pythonPackages.buildPythonApplication {
|
63 | 61 |
|
64 | 62 | nativeBuildInputs = [
|
65 | 63 | pkgconfig
|
| 64 | + makeWrapper |
66 | 65 | ];
|
67 | 66 |
|
68 | 67 | propagatedBuildInputs = with pythonPackages; [
|
@@ -146,6 +145,9 @@ pythonPackages.buildPythonApplication {
|
146 | 145 | '';
|
147 | 146 |
|
148 | 147 | postFixup = ''
|
| 148 | + wrapProgram $out/lib/cups/filter/hpps \ |
| 149 | + --prefix PATH : "${nettools}/bin" |
| 150 | +
|
149 | 151 | substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
|
150 | 152 | '' + stdenv.lib.optionalString (!withPlugin) ''
|
151 | 153 | # A udev rule to notify users that they need the binary plugin.
|
|
0 commit comments