sane: add support for Epson snapscan scanners

The firmware file needs to be downloaded or extracted from the windows
driver file and configured in nixpkgs.config e.g.:

sane.snapscanFirmware = /firmware/esfw41.bin;
This commit is contained in:
Cillian de Róiste 2013-08-25 21:19:21 +02:00
parent b3ea42462c
commit 46646feb17
3 changed files with 12 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchgit, hotplugSupport ? true, libusb ? null, gt68xxFirmware ? null }:
{ stdenv, fetchurl, fetchgit, hotplugSupport ? true, libusb ? null, gt68xxFirmware ? null, snapscanFirmware ? null }:
let
firmware = gt68xxFirmware { inherit fetchurl; };
in
@ -29,6 +29,11 @@ stdenv.mkDerivation {
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
else if snapscanFirmware != null then
"mkdir -p \${out}/share/sane/snapscan ; ln -s " + snapscanFirmware +
" \${out}/share/sane/snapscan/your-firmwarefile.bin ;" +
"mkdir -p \${out}/etc/sane.d ; " +
"echo epson2 > \${out}/etc/sane.d/dll.conf"
else "";
meta = {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null, pkgconfig ? null , gt68xxFirmware ? null }:
{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null, pkgconfig ? null , gt68xxFirmware ? null , snapscanFirmware ? null }:
assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");
@ -36,6 +36,9 @@ stdenv.mkDerivation rec {
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
else if snapscanFirmware != null then
"mkdir -p \${out}/share/sane/snapscan ; ln -s " + snapscanFirmware +
" \${out}/share/sane/snapscan/your-firmwarefile.bin"
else "";
meta = {

View file

@ -10067,12 +10067,14 @@ let
saneBackends = callPackage ../applications/graphics/sane/backends.nix {
gt68xxFirmware = config.sane.gt68xxFirmware or null;
snapscanFirmware = config.sane.snapscanFirmware or null;
hotplugSupport = config.sane.hotplugSupport or true;
libusb = libusb1;
};
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;
};