diff options
author | Guillaume Girol <symphorien@users.noreply.github.com> | 2021-03-20 18:14:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 18:14:48 +0000 |
commit | 76b34118a911102a887401c059b10ecaa4af3326 (patch) | |
tree | 0e6584e011fedad53cac0750bc468d3d97a92dcb /pkgs/misc | |
parent | 2ccb169e38f82e232240ece2d7750747a3d60a71 (diff) | |
parent | 5f0d9afab6016fb3872c0ef6109e6ed49e39e04f (diff) |
Merge pull request #116812 from lenzj/epkowa-add-v600
epkowa: add epson perfection v600 photo
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/drivers/epkowa/default.nix | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/pkgs/misc/drivers/epkowa/default.nix b/pkgs/misc/drivers/epkowa/default.nix index ae8749f0326b..e027bd2e7f57 100644 --- a/pkgs/misc/drivers/epkowa/default.nix +++ b/pkgs/misc/drivers/epkowa/default.nix @@ -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" ]; |