python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / misc / drivers / epson-201106w / default.nix
bloba5a32644c3a5da691d4bd1b9100b1c442e6cdab0
1 { lib, stdenv, fetchurl, rpmextract, autoreconfHook, file, libjpeg, cups }:
3 let
4   version = "1.0.1";
5   filterVersion = "1.0.0";
6 in
7   stdenv.mkDerivation {
9     pname = "epson-201106w";
10     inherit version;
12     src = fetchurl {
13       # NOTE: Don't forget to update the webarchive link too!
14       urls = [
15         "https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201106w-${version}-1lsb3.2.src.rpm"
16         "https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201106w-${version}-1lsb3.2.src.rpm"
17       ];
19       sha256 = "1yig1xrh1ikblbp7sx706n5nnc237wy4mbch23ymy6akbgqg4aig";
20     };
22     nativeBuildInputs = [ rpmextract autoreconfHook file ];
24     buildInputs = [ libjpeg cups ];
26     unpackPhase = ''
27       rpmextract $src
28       tar -zxf epson-inkjet-printer-201106w-${version}.tar.gz
29       tar -zxf epson-inkjet-printer-filter-${filterVersion}.tar.gz
30       for ppd in epson-inkjet-printer-201106w-${version}/ppds/*; do
31         substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-201106w" "$out"
32         substituteInPlace $ppd --replace "/cups/lib" "/lib/cups"
33       done
34       cd epson-inkjet-printer-filter-${filterVersion}
35     '';
37     preConfigure = ''
38       chmod +x configure
39       export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
40     '';
42     postInstall = ''
43       cd ../epson-inkjet-printer-201106w-${version}
44       cp -a lib64 resource watermark $out
45       mkdir -p $out/share/cups/model/epson-inkjet-printer-201106w
46       cp -a ppds $out/share/cups/model/epson-inkjet-printer-201106w/
47       cp -a Manual.txt $out/doc/
48       cp -a README $out/doc/README.driver
49     '';
51     meta = with lib; {
52       homepage = "https://www.openprinting.org/driver/epson-201106w";
53       description = "Epson printer driver (BX535WD, BX630FW, BX635FWD, ME940FW, NX530, NX635, NX635, SX535WD, WorkForce 545, WorkForce 645";
54       longDescription = ''
55         This software is a filter program used with the Common UNIX Printing
56         System (CUPS) under Linux. It supplies high quality printing with
57         Seiko Epson Color Ink Jet Printers.
58         List of printers supported by this package:
59           Epson BX535WD Series
60           Epson BX630FW Series
61           Epson BX635FWD Series
62           Epson ME940FW Series
63           Epson NX530 Series
64           Epson SX535WD Series
65           Epson WorkForce 545 Series
66           Epson WorkForce 645 Series
67         To use the driver adjust your configuration.nix file:
68           services.printing = {
69             enable = true;
70             drivers = [ pkgs.epson-201106w ];
71           };
72       '';
73       license = with licenses; [ lgpl21 epson ];
74       platforms = platforms.linux;
75       maintainers = [ maintainers.nphilou ];
76     };
77   }