mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
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
|
||||
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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user