Apply mornfall's SANE patches

Fix sane-backends to generate udev rules, add a snapshot of sane-backends's unstable repo, and add a SANE nixos module

svn path=/nixos/trunk/; revision=30764
This commit is contained in:
Shea Levy 2011-12-05 17:32:45 +00:00
parent 72d7401976
commit e87764e327
2 changed files with 35 additions and 0 deletions

View File

@ -68,6 +68,7 @@
./services/hardware/bluetooth.nix
./services/hardware/hal.nix
./services/hardware/pcscd.nix
./services/hardware/sane.nix
./services/hardware/udev.nix
./services/hardware/udisks.nix
./services/hardware/upower.nix

View File

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
hardware.sane.enable = mkOption {
default = false;
description = "Enable support for SANE scanners.";
};
hardware.sane.snapshot = mkOption {
default = false;
description = "Use a development snapshot of SANE scanner drivers.";
};
};
###### implementation
config = let pkg = if config.hardware.sane.snapshot
then pkgs.saneBackendsSnapshot
else pkgs.saneBackends;
in mkIf config.hardware.sane.enable {
environment.systemPackages = [ pkg ];
services.udev.packages = [ pkg ];
};
}