diff options
author | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2019-06-30 15:29:17 +0200 |
---|---|---|
committer | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2019-07-14 10:15:38 +0200 |
commit | 2daea2c81f1690fb12070abe67f5ab6b1d582159 (patch) | |
tree | 49606548713c8ec4a47599f7c119b5686134eb54 /pkgs/misc/drivers/hplip | |
parent | 5aafd1d0dba2800e14421b3f93721e8b2d1cd0f7 (diff) | |
download | nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.tar nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.tar.gz nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.tar.bz2 nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.tar.lz nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.tar.xz nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.tar.zst nixlib-2daea2c81f1690fb12070abe67f5ab6b1d582159.zip |
hplip: retain udev rules in WithPlugin version
Beginning with commit 8ffd6af27e6dfae0a3b4d77db03409f62c5b8d98, the build recipe for `hplipWithPlugin` explicitely drops a udev rule file that is delivered with the sources. In `hplip` (without plugin), the rule file is retained. The udev rules takes care of uploading firmware to certain printers (and maybe of other things), e.g. to HP LaserJet 1000. This commit reinstates the rule file and expands the fixup script so that the rules are also patched in the WithPlugin version.
Diffstat (limited to 'pkgs/misc/drivers/hplip')
-rw-r--r-- | pkgs/misc/drivers/hplip/3.16.11.nix | 8 | ||||
-rw-r--r-- | pkgs/misc/drivers/hplip/3.18.5.nix | 8 | ||||
-rw-r--r-- | pkgs/misc/drivers/hplip/default.nix | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/pkgs/misc/drivers/hplip/3.16.11.nix b/pkgs/misc/drivers/hplip/3.16.11.nix index 4e9b4cbf0ae9..ebea49d9540a 100644 --- a/pkgs/misc/drivers/hplip/3.16.11.nix +++ b/pkgs/misc/drivers/hplip/3.16.11.nix @@ -142,8 +142,6 @@ pythonPackages.buildPythonApplication { mkdir -p $out/etc/sane.d/dll.d mv $out/etc/sane.d/dll.conf $out/etc/sane.d/dll.d/hpaio.conf - - rm $out/etc/udev/rules.d/56-hpmud.rules ''; # The installed executables are just symlinks into $out/share/hplip, @@ -171,9 +169,9 @@ pythonPackages.buildPythonApplication { postFixup = '' 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: + # Patch udev rules: + # with plugin, they upload firmware to printers, + # without plugin, they complain about the missing plugin. substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ --replace {,${bash}}/bin/sh \ --replace /usr/bin/nohup "" \ diff --git a/pkgs/misc/drivers/hplip/3.18.5.nix b/pkgs/misc/drivers/hplip/3.18.5.nix index 7da6b2db930b..68220392fd00 100644 --- a/pkgs/misc/drivers/hplip/3.18.5.nix +++ b/pkgs/misc/drivers/hplip/3.18.5.nix @@ -174,8 +174,6 @@ pythonPackages.buildPythonApplication { mkdir -p $out/var/lib/hp cp ${hplipState} $out/var/lib/hp/hplip.state - - rm $out/etc/udev/rules.d/56-hpmud.rules ''; # The installed executables are just symlinks into $out/share/hplip, @@ -203,9 +201,9 @@ pythonPackages.buildPythonApplication { postFixup = '' 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: + # Patch udev rules: + # with plugin, they upload firmware to printers, + # without plugin, they complain about the missing plugin. substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ --replace {,${bash}}/bin/sh \ --replace /usr/bin/nohup "" \ diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index 6c02fa52124e..851aa9f3f882 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -181,8 +181,6 @@ pythonPackages.buildPythonApplication { mkdir -p $out/var/lib/hp cp ${hplipState} $out/var/lib/hp/hplip.state - - rm $out/etc/udev/rules.d/56-hpmud.rules ''; # The installed executables are just symlinks into $out/share/hplip, @@ -210,9 +208,9 @@ pythonPackages.buildPythonApplication { postFixup = '' 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: + # Patch udev rules: + # with plugin, they upload firmware to printers, + # without plugin, they complain about the missing plugin. substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ --replace {,${bash}}/bin/sh \ --replace /usr/bin/nohup "" \ |