forked from mirrors/nixpkgs
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:
parent
b3ea42462c
commit
46646feb17
|
@ -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
|
let
|
||||||
firmware = gt68xxFirmware { inherit fetchurl; };
|
firmware = gt68xxFirmware { inherit fetchurl; };
|
||||||
in
|
in
|
||||||
|
@ -29,6 +29,11 @@ stdenv.mkDerivation {
|
||||||
if gt68xxFirmware != null then
|
if gt68xxFirmware != null then
|
||||||
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
|
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
|
||||||
" \${out}/share/sane/gt68xx/" + firmware.name
|
" \${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 "";
|
else "";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -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");
|
assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");
|
||||||
|
|
||||||
|
@ -36,6 +36,9 @@ stdenv.mkDerivation rec {
|
||||||
if gt68xxFirmware != null then
|
if gt68xxFirmware != null then
|
||||||
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
|
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
|
||||||
" \${out}/share/sane/gt68xx/" + firmware.name
|
" \${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 "";
|
else "";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -10067,12 +10067,14 @@ let
|
||||||
|
|
||||||
saneBackends = callPackage ../applications/graphics/sane/backends.nix {
|
saneBackends = callPackage ../applications/graphics/sane/backends.nix {
|
||||||
gt68xxFirmware = config.sane.gt68xxFirmware or null;
|
gt68xxFirmware = config.sane.gt68xxFirmware or null;
|
||||||
|
snapscanFirmware = config.sane.snapscanFirmware or null;
|
||||||
hotplugSupport = config.sane.hotplugSupport or true;
|
hotplugSupport = config.sane.hotplugSupport or true;
|
||||||
libusb = libusb1;
|
libusb = libusb1;
|
||||||
};
|
};
|
||||||
|
|
||||||
saneBackendsGit = callPackage ../applications/graphics/sane/backends-git.nix {
|
saneBackendsGit = callPackage ../applications/graphics/sane/backends-git.nix {
|
||||||
gt68xxFirmware = config.sane.gt68xxFirmware or null;
|
gt68xxFirmware = config.sane.gt68xxFirmware or null;
|
||||||
|
snapscanFirmware = config.sane.snapscanFirmware or null;
|
||||||
hotplugSupport = config.sane.hotplugSupport or true;
|
hotplugSupport = config.sane.hotplugSupport or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue