diff options
author | Robin Gloster <mail@glob.in> | 2016-04-07 21:52:26 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-04-07 21:52:26 +0000 |
commit | 3e68106afd95df012ddb548575f0133681687a90 (patch) | |
tree | e2919b6900e6de13a3f52756acc02058a1ef0421 /pkgs/misc | |
parent | a73a28de7b16734d8e28da8be43a06b92eeb6bc3 (diff) | |
parent | 25cc1c12febf74c66d661528e2fc2b00caff1bf1 (diff) | |
download | nixlib-3e68106afd95df012ddb548575f0133681687a90.tar nixlib-3e68106afd95df012ddb548575f0133681687a90.tar.gz nixlib-3e68106afd95df012ddb548575f0133681687a90.tar.bz2 nixlib-3e68106afd95df012ddb548575f0133681687a90.tar.lz nixlib-3e68106afd95df012ddb548575f0133681687a90.tar.xz nixlib-3e68106afd95df012ddb548575f0133681687a90.tar.zst nixlib-3e68106afd95df012ddb548575f0133681687a90.zip |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
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 9cd5a7894646..1162cc4f00d2 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 ebe8a4d19abf..cd8e906c8171 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; { |