2018-10-20 15:36:02 +01:00
|
|
|
{
|
2022-03-31 19:11:26 +01:00
|
|
|
autoreconfHook, cups, libjpeg, rpmextract,
|
2018-10-20 15:36:02 +01:00
|
|
|
fetchurl, lib, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
srcdirs = {
|
|
|
|
filter = "epson-inkjet-printer-filter-1.0.0";
|
|
|
|
driver = "epson-inkjet-printer-workforce-635-nx625-series-1.0.1";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-08-12 22:00:21 +01:00
|
|
|
pname = "epson-inkjet-printer-workforce-635-nx625-series";
|
2018-10-20 15:36:02 +01:00
|
|
|
version = "1.0.1";
|
|
|
|
|
2018-10-21 23:05:26 +01:00
|
|
|
src = fetchurl {
|
2019-10-05 21:28:49 +01:00
|
|
|
# NOTE: Don't forget to update the webarchive link too!
|
|
|
|
urls = [
|
2021-08-12 22:00:21 +01:00
|
|
|
"https://download.ebz.epson.net/dsc/op/stable/SRPMS/${pname}-${version}-1lsb3.2.src.rpm"
|
|
|
|
"https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/${pname}-${version}-1lsb3.2.src.rpm"
|
2019-10-05 21:28:49 +01:00
|
|
|
];
|
2018-10-20 15:36:02 +01:00
|
|
|
sha256 = "19nb2h0y9rvv6rg7j262f8sqap9kjvz8kmisxnjg1w0v19zb9zf2";
|
|
|
|
};
|
|
|
|
sourceRoot = srcdirs.filter;
|
|
|
|
|
2022-03-31 19:11:26 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook rpmextract ];
|
2018-10-20 15:36:02 +01:00
|
|
|
buildInputs = [ cups libjpeg ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
rpmextract "$src"
|
|
|
|
for i in ${lib.concatStringsSep " " (builtins.attrValues srcdirs)}; do
|
|
|
|
tar xvf "$i".tar.gz
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
chmod u+x configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
let
|
|
|
|
filterdir = "$out/cups/lib/filter";
|
|
|
|
docdir = "$out/share/doc";
|
2021-08-12 22:00:21 +01:00
|
|
|
ppddir = "$out/share/cups/model/${pname}";
|
2018-10-20 15:36:02 +01:00
|
|
|
libdir =
|
|
|
|
if stdenv.system == "x86_64-linux" then "lib64"
|
|
|
|
else if stdenv.system == "i686_linux" then "lib"
|
|
|
|
else throw "other platforms than i686_linux and x86_64-linux are not yet supported";
|
|
|
|
in ''
|
|
|
|
mkdir -p "$out" "${docdir}" "${filterdir}" "${ppddir}"
|
|
|
|
cp src/epson_inkjet_printer_filter "${filterdir}"
|
|
|
|
|
|
|
|
cd ../${srcdirs.driver}
|
|
|
|
for ppd in ppds/*; do
|
2021-08-12 22:00:21 +01:00
|
|
|
substituteInPlace "$ppd" --replace '/opt/${pname}' "$out"
|
2018-10-20 15:36:02 +01:00
|
|
|
gzip -c "$ppd" > "${ppddir}/''${ppd#*/}"
|
|
|
|
done
|
|
|
|
cp COPYING.EPSON README "${docdir}"
|
|
|
|
cp -r resource watermark ${libdir} "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Proprietary CUPS drivers for Epson inkjet printers";
|
|
|
|
longDescription = ''
|
|
|
|
This software is a filter program used with Common UNIX Printing
|
|
|
|
System (CUPS) from the Linux. This can supply the high quality print
|
|
|
|
with Seiko Epson Color Ink Jet Printers.
|
|
|
|
|
|
|
|
This printer driver is supporting the following printers.
|
|
|
|
|
|
|
|
WorkForce 60
|
|
|
|
WorkForce 625
|
|
|
|
WorkForce 630
|
|
|
|
WorkForce 633
|
|
|
|
WorkForce 635
|
|
|
|
WorkForce T42WD
|
|
|
|
Epson Stylus NX625
|
|
|
|
Epson Stylus SX525WD
|
|
|
|
Epson Stylus SX620FW
|
|
|
|
Epson Stylus TX560WD
|
|
|
|
Epson Stylus Office B42WD
|
|
|
|
Epson Stylus Office BX525WD
|
|
|
|
Epson Stylus Office BX625FWD
|
|
|
|
Epson Stylus Office TX620FWD
|
|
|
|
Epson ME OFFICE 82WD
|
|
|
|
Epson ME OFFICE 85ND
|
|
|
|
Epson ME OFFICE 900WD
|
|
|
|
Epson ME OFFICE 960FWD
|
|
|
|
|
|
|
|
License: LGPL and SEIKO EPSON CORPORATION SOFTWARE LICENSE AGREEMENT
|
|
|
|
|
|
|
|
To use the driver adjust your configuration.nix file:
|
|
|
|
services.printing = {
|
|
|
|
enable = true;
|
2021-08-12 22:00:21 +01:00
|
|
|
drivers = [ pkgs.${pname} ];
|
2018-10-20 15:36:02 +01:00
|
|
|
};
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
downloadPage = "https://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=16857&DSCCHK=4334d3487503d7f916ccf5d58071b05b7687294f";
|
2018-10-20 16:20:56 +01:00
|
|
|
license = with lib.licenses; [ lgpl21 epson ];
|
|
|
|
maintainers = [ lib.maintainers.jorsn ];
|
2018-10-20 15:36:02 +01:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|