saneBackends: don't add option for 1 udev rule

This commit is contained in:
Tobias Geerinckx-Rice 2015-12-25 15:56:05 +01:00
parent f3048aed1d
commit cf699caf4d
2 changed files with 3 additions and 11 deletions

View File

@ -2,13 +2,9 @@
, avahi, libusb1, libv4l, net_snmp
, gettext, pkgconfig
, gt68xxFirmware ? null, snapscanFirmware ? null
, hotplugSupport ? true
, version, src, ...
}:
assert hotplugSupport ->
builtins.elem stdenv.system [ "i686-linux" "x86_64-linux" ];
stdenv.mkDerivation {
inherit src;
@ -25,11 +21,9 @@ stdenv.mkDerivation {
nativeBuildInputs = [ gettext pkgconfig ];
postInstall = ''
if test "$hotplugSupport" = "1"; then
mkdir -p $out/etc/udev/rules.d/
./tools/sane-desc -m udev > $out/etc/udev/rules.d/49-libsane.rules || \
cp tools/udev/libsane.rules $out/etc/udev/rules.d/49-libsane.rules
fi
mkdir -p $out/etc/udev/rules.d/
./tools/sane-desc -m udev > $out/etc/udev/rules.d/49-libsane.rules || \
cp tools/udev/libsane.rules $out/etc/udev/rules.d/49-libsane.rules
'';
preInstall =

View File

@ -15542,13 +15542,11 @@ let
saneBackends = callPackage ../applications/graphics/sane/backends {
gt68xxFirmware = config.sane.gt68xxFirmware or null;
snapscanFirmware = config.sane.snapscanFirmware or null;
hotplugSupport = config.sane.hotplugSupport or true;
};
saneBackendsGit = callPackage ../applications/graphics/sane/backends/git.nix {
gt68xxFirmware = config.sane.gt68xxFirmware or null;
snapscanFirmware = config.sane.snapscanFirmware or null;
hotplugSupport = config.sane.hotplugSupport or true;
};
mkSaneConfig = callPackage ../applications/graphics/sane/config.nix { };