Skip to content

Commit 0c54a29

Browse files
jgertmMic92
authored andcommittedJun 10, 2017
hplip: introduce nettools dependency (#26439)
* hplip: introduce nettools dependency Some HP printers (notably a HP MFP M477fnw) need to run `hostname` as part of the printing process. This executable is provided by the "nettools" package. * hplip: prepend nettools to PATH
1 parent b731e65 commit 0c54a29

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed
 

Diff for: ‎pkgs/misc/drivers/hplip/default.nix

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{ stdenv, fetchurl, substituteAll
22
, pkgconfig
3+
, makeWrapper
34
, cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils
4-
, net_snmp, openssl, polkit
5+
, net_snmp, openssl, polkit, nettools
56
, bash, coreutils, utillinux
67
, qtSupport ? true
78
, withPlugin ? false
@@ -22,20 +23,17 @@ let
2223
sha256 = "1y3wdax2wb6kdd8bi40wl7v9s8ffyjz95bz42sjcpzzddmlhcaxg";
2324
};
2425

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+
};
3937

4038
hplipArch = hplipPlatforms."${stdenv.system}"
4139
or (throw "HPLIP not supported on ${stdenv.system}");
@@ -63,6 +61,7 @@ pythonPackages.buildPythonApplication {
6361

6462
nativeBuildInputs = [
6563
pkgconfig
64+
makeWrapper
6665
];
6766

6867
propagatedBuildInputs = with pythonPackages; [
@@ -146,6 +145,9 @@ pythonPackages.buildPythonApplication {
146145
'';
147146

148147
postFixup = ''
148+
wrapProgram $out/lib/cups/filter/hpps \
149+
--prefix PATH : "${nettools}/bin"
150+
149151
substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
150152
'' + stdenv.lib.optionalString (!withPlugin) ''
151153
# A udev rule to notify users that they need the binary plugin.

0 commit comments

Comments
 (0)
Please sign in to comment.