summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/simple/imagescan-plugin-networkscan.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-06-05 12:06:36 +0200
committerlassulus <lassulus@lassul.us>2021-06-05 12:06:36 +0200
commit442636eb15f1b706b359b7fa390ff05ce1e866ff (patch)
tree68051661426e1cd6fa23fa639cc954b435963d96 /tv/5pkgs/simple/imagescan-plugin-networkscan.nix
parent6068c4f75ba4a371841c22581c022bcf930cc964 (diff)
parenta461078f13d01693c0da08eb9fd53612b68170eb (diff)
Merge remote-tracking branch 'ni/master' into 21.05
Diffstat (limited to 'tv/5pkgs/simple/imagescan-plugin-networkscan.nix')
-rw-r--r--tv/5pkgs/simple/imagescan-plugin-networkscan.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/tv/5pkgs/simple/imagescan-plugin-networkscan.nix b/tv/5pkgs/simple/imagescan-plugin-networkscan.nix
new file mode 100644
index 000000000..c3f2deaca
--- /dev/null
+++ b/tv/5pkgs/simple/imagescan-plugin-networkscan.nix
@@ -0,0 +1,55 @@
+{ fetchurl, lib, pkgs, stdenv }:
+
+stdenv.mkDerivation rec {
+ pname = "imagescan-plugin-networkscan";
+ version = "1.1.3";
+
+ src =
+ if stdenv.system == "x86_64-linux" then
+ fetchurl {
+ urls = [
+ "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-10-3.63.0.x64.deb.tar.gz"
+ "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-10-3.63.0.x64.deb.tar.gz"
+ ];
+ hash = "sha256:1rbz6mjfinag7c2vnyl7lls3gpn8n91sv0p18ilnbw0vaddssn4j";
+ }
+ else throw "${pname} is not supported on ${stdenv.system}; supported systems: x86_64-linux";
+
+ dontBuild = true;
+
+ nativeBuildInputs = [
+ pkgs.dpkg
+ ];
+
+ installPhase = ''
+ # Wildcard * stand for either i386 or amd64
+ dpkg -x \
+ plugins/imagescan-plugin-networkscan_${version}-1epson4debian10_*.deb \
+ tmp
+
+ mv tmp/usr $out
+ '';
+
+ preFixup = ''
+ patchelf --set-interpreter \
+ ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
+ $out/lib/utsushi/networkscan
+
+ # libstdc++.so.6
+ patchelf --set-rpath \
+ ${stdenv.cc.cc.lib}/lib \
+ $out/lib/utsushi/networkscan
+ '';
+
+ meta = {
+ description = "Epson Image Scan v3 networkscan plugin";
+ longDescription = ''
+ This package provides the unfree networkscan plugin from the Epson
+ Image Scan v3 scanner driver bundle, which can be used by Utsushi.
+ '';
+ homepage = "http://support.epson.net/linux/en/imagescanv3.php?version=${version}";
+ license = lib.licenses.eapl;
+ maintainers = [ lib.maintainers.tv ];
+ platforms = lib.platforms.linux;
+ };
+}