epkowa: add the GT-S650 plugin

This plugin adds support for the GT-S650, Perfection V19 and
Perfection V39 scanners. I've tested it personally with an Epson
Perfection V39.

This plugin uses the ISCAN_FIRMWARE_DIR environment variable, not
ISCAN_FW_DIR. A quick grep didn't find any use of ISCAN_FW_DIR in the
currently packaged plugins, but a quick Google suggests that this
variable does (or at least used to) exist, so I'm not touching it.
This commit is contained in:
Dominik Honnef 2020-03-18 23:25:02 +01:00
parent d1303f10e9
commit 55e85a0d62
2 changed files with 35 additions and 1 deletions

View file

@ -153,6 +153,39 @@ let plugins = {
meta = common_meta // { description = "iscan esci s80 plugin for "+passthru.hw; };
};
s650 = stdenv.mkDerivation rec {
name = "iscan-gt-s650-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "1ffddf488c5fc1eb39452499951bd13a2dc1971980c0551176076c81af363038";
};
nativeBuildInputs = [ autoPatchelfHook rpm ];
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-s650-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x013c "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin"
$registry --add interpreter usb 0x04b8 0x013d "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin"
'';
hw = "GT-S650, Perfection V19, Perfection V39";
};
meta = common_meta // { description = "iscan GT-S650 for "+passthru.hw; };
};
network = stdenv.mkDerivation rec {
pname = "iscan-nt-bundle";
# for the version, look for the driver of XP-750 in the search page

View file

@ -8,12 +8,13 @@ set this environment variable. Instead, we patch iscan to set this variable
before loading libesci-interpreter-gt-f720.so.
--- backend/channel-usb.c.orig 2017-08-14 11:24:27.669582456 +0200
+++ backend/channel-usb.c 2017-08-14 11:31:40.509010897 +0200
@@ -169,6 +169,9 @@
@@ -169,6 +169,10 @@
{
SANE_Status s;
+ setenv("ESCI_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
+ setenv("ISCAN_FW_DIR", NIX_ESCI_PREFIX, 1);
+ setenv("ISCAN_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
+
s = sanei_usb_open (self->name, &self->fd);