hplip: retain udev rules in WithPlugin version

Beginning with commit 8ffd6af27e,
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.
This commit is contained in:
Yarny0 2019-06-30 15:29:17 +02:00
parent 5aafd1d0db
commit 2daea2c81f
3 changed files with 9 additions and 15 deletions

View File

@ -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 "" \

View File

@ -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 "" \

View File

@ -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 "" \