diff options
author | Tim Jäger <jger.tm@gmail.com> | 2017-06-10 02:04:33 -0700 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2017-06-10 10:04:33 +0100 |
commit | 0c54a292fbf7b00dedfdc497515b149be5b6fb1a (patch) | |
tree | a88a71d16b4ff0f00c1da975fe126856c8476146 /pkgs/misc/drivers/hplip | |
parent | b731e65081aa0bdb065e637b85b9e4a02e1a4c99 (diff) | |
download | nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.tar nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.tar.gz nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.tar.bz2 nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.tar.lz nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.tar.xz nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.tar.zst nixlib-0c54a292fbf7b00dedfdc497515b149be5b6fb1a.zip |
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
Diffstat (limited to 'pkgs/misc/drivers/hplip')
-rw-r--r-- | pkgs/misc/drivers/hplip/default.nix | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index 62f94ae6fc9f..6adc2a765c7f 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl, substituteAll , pkgconfig +, makeWrapper , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils -, net_snmp, openssl, polkit +, net_snmp, openssl, polkit, nettools , bash, coreutils, utillinux , qtSupport ? true , withPlugin ? false @@ -22,20 +23,17 @@ let sha256 = "1y3wdax2wb6kdd8bi40wl7v9s8ffyjz95bz42sjcpzzddmlhcaxg"; }; - hplipState = - substituteAll - { - inherit version; - src = ./hplip.state; - }; - - hplipPlatforms = - { - "i686-linux" = "x86_32"; - "x86_64-linux" = "x86_64"; - "armv6l-linux" = "arm32"; - "armv7l-linux" = "arm32"; - }; + hplipState = substituteAll { + inherit version; + src = ./hplip.state; + }; + + hplipPlatforms = { + "i686-linux" = "x86_32"; + "x86_64-linux" = "x86_64"; + "armv6l-linux" = "arm32"; + "armv7l-linux" = "arm32"; + }; hplipArch = hplipPlatforms."${stdenv.system}" or (throw "HPLIP not supported on ${stdenv.system}"); @@ -63,6 +61,7 @@ pythonPackages.buildPythonApplication { nativeBuildInputs = [ pkgconfig + makeWrapper ]; propagatedBuildInputs = with pythonPackages; [ @@ -146,6 +145,9 @@ pythonPackages.buildPythonApplication { ''; postFixup = '' + wrapProgram $out/lib/cups/filter/hpps \ + --prefix PATH : "${nettools}/bin" + substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out '' + stdenv.lib.optionalString (!withPlugin) '' # A udev rule to notify users that they need the binary plugin. |