epkowa: added Perfection V500 support

This commit is contained in:
Massimo Redaelli 2018-06-23 17:04:21 +02:00
parent 19ef534fbb
commit 5667087581
2 changed files with 33 additions and 1 deletions

View file

@ -25,6 +25,37 @@ in
# adding a plugin for another printer shouldn't be too difficult, but you need the firmware to test...
let plugins = {
x770 = stdenv.mkDerivation rec {
name = "iscan-gt-x770-bundle";
version = "1.0.1";
pluginVersion = "2.1.2-1";
buildInputs = [ patchelf rpm ];
src = fetchurl {
url = "https://download2.ebz.epson.net/iscan/plugin/gt-x770/rpm/x64/iscan-gt-x770-bundle-${version}.x64.rpm.tar.gz";
sha256 = "0m9c60rszzdvq1pqfzygzzrjycm1giy465lj29108j7hsnfcv56r";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-x770-${pluginVersion}.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
'';
preFixup = ''
lib=$out/lib/esci/libesint7C.so
rpath=${gcc.cc.lib}/lib/
patchelf --set-rpath $rpath $lib
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0130 "$plugin/lib/esci/libesint7C $plugin/share/esci/esfw7C.bin"
'';
hw = "Perfection V500 Photo";
};
};
f720 = stdenv.mkDerivation rec {
name = "iscan-gt-f720-bundle";
version = "1.0.1";

View file

@ -8,11 +8,12 @@ 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,8 @@
@@ -169,6 +169,9 @@
{
SANE_Status s;
+ setenv("ESCI_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
+ setenv("ISCAN_FW_DIR", NIX_ESCI_PREFIX, 1);
+
s = sanei_usb_open (self->name, &self->fd);