Merge pull request #83007 from dominikh/epkowa-perfection-v39

epkowa: add the GT-S650 plugin
This commit is contained in:
Dmitry Kalinkin 2020-03-20 17:37:56 -04:00 committed by GitHub
commit cdf9b5de6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 2 deletions

View File

@ -1925,6 +1925,12 @@
githubId = 126339;
name = "Domen Kozar";
};
dominikh = {
email = "dominik@honnef.co";
github = "dominikh";
githubId = 39825;
name = "Dominik Honnef";
};
doronbehar = {
email = "me@doronbehar.com";
github = "doronbehar";

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
@ -278,6 +311,6 @@ stdenv.mkDerivation rec {
Supported hardware: at least :
'' +
stdenv.lib.concatStringsSep ", " (stdenv.lib.mapAttrsToList (name: value: value.passthru.hw) plugins);
maintainers = with stdenv.lib.maintainers; [ symphorien ];
maintainers = with stdenv.lib.maintainers; [ symphorien dominikh ];
};
}

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);