diff options
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/drivers/hplip/3.15.9.nix | 12 | ||||
-rw-r--r-- | pkgs/misc/drivers/hplip/default.nix | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/pkgs/misc/drivers/hplip/3.15.9.nix b/pkgs/misc/drivers/hplip/3.15.9.nix index 9cd5a78946461..1162cc4f00d2c 100644 --- a/pkgs/misc/drivers/hplip/3.15.9.nix +++ b/pkgs/misc/drivers/hplip/3.15.9.nix @@ -2,6 +2,7 @@ , pkgconfig , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils , net_snmp, polkit +, bash, coreutils, utillinux , qtSupport ? true, qt4, pyqt4 , withPlugin ? false }: @@ -112,8 +113,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - postInstall = stdenv.lib.optionalString withPlugin - '' + postInstall = stdenv.lib.optionalString withPlugin '' sh ${plugin} --noexec --keep cd plugin_tmp @@ -175,6 +175,14 @@ stdenv.mkDerivation { wrapPythonProgramsIn $out/lib "$out $pythonPath" 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. + # Needs a lot of patching but might save someone a bit of confusion: + substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ + --replace {,${bash}}/bin/sh \ + --replace {/usr,${coreutils}}/bin/nohup \ + --replace {,${utillinux}/bin/}logger \ + --replace {/usr,$out}/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index ebe8a4d19abfd..cd8e906c81716 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -2,6 +2,7 @@ , pkgconfig , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils , net_snmp, polkit +, bash, coreutils, utillinux , qtSupport ? true, qt4, pyqt4 , withPlugin ? false }: @@ -112,8 +113,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - postInstall = stdenv.lib.optionalString withPlugin - '' + postInstall = stdenv.lib.optionalString withPlugin '' sh ${plugin} --noexec --keep cd plugin_tmp @@ -175,6 +175,14 @@ stdenv.mkDerivation { wrapPythonProgramsIn $out/lib "$out $pythonPath" 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. + # Needs a lot of patching but might save someone a bit of confusion: + substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ + --replace {,${bash}}/bin/sh \ + --replace {/usr,${coreutils}}/bin/nohup \ + --replace {,${utillinux}/bin/}logger \ + --replace {/usr,$out}/bin ''; meta = with stdenv.lib; { |