forked from mirrors/nixpkgs
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
This commit is contained in:
parent
b731e65081
commit
0c54a292fb
|
@ -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;
|
||||
};
|
||||
hplipState = substituteAll {
|
||||
inherit version;
|
||||
src = ./hplip.state;
|
||||
};
|
||||
|
||||
hplipPlatforms =
|
||||
{
|
||||
"i686-linux" = "x86_32";
|
||||
"x86_64-linux" = "x86_64";
|
||||
"armv6l-linux" = "arm32";
|
||||
"armv7l-linux" = "arm32";
|
||||
};
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue