anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / misc / drivers / utsushi / networkscan.nix
blobb9aa1cbe904f4dced5d6df2d16e134bbf269de1a
1 { lib, stdenv, fetchurl, rpmextract }:
3 stdenv.mkDerivation rec {
4   pname = "imagescan-plugin-networkscan";
5   imagescanVersion = "3.65.0";
6   version = "1.1.4";
8   src = fetchurl {
9     urls = [
10       "https://buzo.eu/mirror/epson/imagescan-bundle-fedora-32-${imagescanVersion}.x64.rpm.tar.gz"
11       "https://web.archive.org/web/20221027001620if_/https://download2.ebz.epson.net/imagescanv3/fedora/latest1/rpm/x64/imagescan-bundle-fedora-32-${imagescanVersion}.x64.rpm.tar.gz"
12     ];
13     sha256 = "sha256-fxi63sV+YJOlv1aVTfCPIXOPfNAo+R7zNPvA11sFmMk=";
14   };
16   nativeBuildInputs = [ rpmextract ];
18   installPhase = ''
19     rpmextract plugins/imagescan-plugin-networkscan-${version}-*.x86_64.rpm
20     install -Dm755 usr/libexec/utsushi/networkscan $out/libexec/utsushi/networkscan
21     patchelf \
22       --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
23       --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc ]} \
24       $out/libexec/utsushi/networkscan
25   '';
27   meta = with lib; {
28     homepage = "https://support.epson.net/linux/en/imagescanv3.php";
29     description = "Network scan plugin for ImageScan v3";
30     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
31     license = licenses.unfree;
32     maintainers = with maintainers; [ abbradar ];
33     platforms = [ "x86_64-linux" ];
34   };