Merge pull request #116812 from lenzj/epkowa-add-v600

epkowa: add epson perfection v600 photo
This commit is contained in:
Guillaume Girol 2021-03-20 18:14:48 +00:00 committed by GitHub
commit 76b34118a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,6 @@
, rpm
, cpio
, getopt
, patchelf
, autoPatchelfHook
, gcc
}:
@ -99,6 +98,35 @@ let plugins = {
};
meta = common_meta // { description = "Plugin to support " + passthru.hw + " scanner in sane"; };
};
v600 = stdenv.mkDerivation rec {
pname = "iscan-gt-x820-bundle";
version = "2.30.4";
nativeBuildInputs = [ autoPatchelfHook rpm ];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "1vlba7dsgpk35nn3n7is8nwds3yzlk38q43mppjzwsz2d2n7sr33";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-x820-*.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 0x013a "$plugin/lib/esci/libesintA1 $plugin/share/esci/esfwA1.bin"
'';
hw = "Perfection V600 Photo";
};
meta = common_meta // { description = "iscan esci x820 plugin for " + passthru.hw; };
};
x770 = stdenv.mkDerivation rec {
pname = "iscan-gt-x770-bundle";
version = "2.30.4";
@ -295,17 +323,16 @@ stdenv.mkDerivation rec {
sha256 = "1ma76jj0k3bz0fy06fiyl4di4y77rcryb0mwjmzs5ms2vq9rjysr";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config libtool makeWrapper ];
buildInputs = [
gtk2
libxml2
libtool
libusb-compat-0_1
sane-backends
makeWrapper
];
patches = [
# Patch for compatibility with libpng versions greater than 10499
(fetchpatch {
urls = [
"https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?h=b6e4c805d53b49da79a0f64ef16bb82d6d800fcf"
@ -313,7 +340,9 @@ stdenv.mkDerivation rec {
];
sha256 = "04y70qjd220dpyh771fiq50lha16pms98mfigwjczdfmx6kpj1jd";
})
# Patch iscan to search appropriate folders for firmware files
./firmware_location.patch
# Patch deprecated use of sscanf code to use a more modern C99 compatible version
./sscanf.patch
];
patchFlags = [ "-p0" ];