diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-02-26 23:32:33 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-02-26 23:32:33 +0000 |
commit | 1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5 (patch) | |
tree | cba73be7e3108dca51f75c9ec44a8bd61246b11a /nixpkgs/pkgs/misc/cups | |
parent | db8291322dd83add2250dd4480b46298655cbfba (diff) | |
parent | 1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff) | |
download | nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.gz nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.bz2 nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.lz nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.xz nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.zst nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.zip |
Merge commit '1233c8d9e9bc463899ed6a8cf0232e6bf36475ee'
Diffstat (limited to 'nixpkgs/pkgs/misc/cups')
-rw-r--r-- | nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix | 78 | ||||
-rw-r--r-- | nixpkgs/pkgs/misc/cups/filters.nix | 4 |
3 files changed, 81 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix index 51ef47fe4693..2df3cfe67334 100644 --- a/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix +++ b/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation rec { description = "Brother BrGenML1 LPR driver"; homepage = http://www.brother.com; platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.gpl2Plus; + license = stdenv.lib.licenses.unfreeRedistributable; maintainers = with stdenv.lib.maintainers; [ jraygauthier ]; }; } diff --git a/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix new file mode 100644 index 000000000000..001a3c1eac09 --- /dev/null +++ b/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix @@ -0,0 +1,78 @@ +{stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk}: + +let + version = "1.1.4-0"; + cupsdeb = fetchurl { + url = "https://download.brother.com/welcome/dlf007070/hl3140cwcupswrapper-${version}.i386.deb"; + sha256 = "a76281828ca6ee86c63034673577fadcf5f24e8ed003213bdbb6bf47a7aced6f"; + }; + srcdir = "hl3140cw_cupswrapper_GPL_source_${version}"; + cupssrc = fetchurl { + url = "https://download.brother.com/welcome/dlf006740/${srcdir}.tar.gz"; + sha256 = "1wp85rbvbar6rqqkaffymxjpls6jx9m9230dlrpqwy5akiaxf0rl"; + }; + lprdeb = fetchurl { + url = "https://support.brother.com/g/b/files/dlf/dlf007068/hl3140cwlpr-1.1.2-1.i386.deb"; + sha256 = "601f392b52ed7080f71b780181823bb8f6abfd0591146b452ba1f23e21f9f865"; + }; +in +stdenv.mkDerivation { + name = "cups-brother-hl3140cw"; + nativeBuildInputs = [ makeWrapper dpkg ]; + buildInputs = [ cups ghostscript a2ps ]; + + unpackPhase = '' + tar -xvf ${cupssrc} + ''; + + buildPhase = '' + gcc -Wall ${srcdir}/brcupsconfig/brcupsconfig.c -o brcupsconfpt1 + ''; + + installPhase = '' + # install lpr + dpkg-deb -x ${lprdeb} $out + + substituteInPlace $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \ + --replace /opt "$out/opt" + substituteInPlace $out/opt/brother/Printers/hl3140cw/inf/setupPrintcapij \ + --replace /opt "$out/opt" + + sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2 + + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/hl3140cw/lpd/brhl3140cwfilter + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/usr/bin/brprintconf_hl3140cw + + wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2 \ + --prefix PATH ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] } + + wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \ + --prefix PATH ":" ${ stdenv.lib.makeBinPath [ ghostscript a2ps file gnused coreutils ] } + + + dpkg-deb -x ${cupsdeb} $out + + substituteInPlace $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw \ + --replace /opt "$out/opt" + + mkdir -p $out/lib/cups/filter + ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw $out/lib/cups/filter/cupswrapperhl3140cw + + ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/brother_hl3140cw_printer_en.ppd $out/lib/cups/filter/brother_hl3140cw_printer_en.ppd + + cp brcupsconfpt1 $out/opt/brother/Printers/hl3140cw/cupswrapper/ + ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/brcupsconfpt1 $out/lib/cups/filter/brcupsconfpt1 + ln -s $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw $out/lib/cups/filter/brother_lpdwrapper_hl3140cw + + wrapProgram $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw \ + --prefix PATH ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] } + ''; + + meta = { + homepage = http://www.brother.com/; + description = "Brother hl3140cw printer driver"; + license = stdenv.lib.licenses.unfree; + platforms = stdenv.lib.platforms.linux; + downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=hl3140cw_us_eu&os=128"; + }; +} diff --git a/nixpkgs/pkgs/misc/cups/filters.nix b/nixpkgs/pkgs/misc/cups/filters.nix index 348b7c6550e2..3d2eafee1687 100644 --- a/nixpkgs/pkgs/misc/cups/filters.nix +++ b/nixpkgs/pkgs/misc/cups/filters.nix @@ -9,11 +9,11 @@ let in stdenv.mkDerivation rec { name = "cups-filters-${version}"; - version = "1.21.6"; + version = "1.22.0"; src = fetchurl { url = "https://openprinting.org/download/cups-filters/${name}.tar.xz"; - sha256 = "0k0x9p40bahq44189vy9zai2ia9i91h26chrddr0m9agzsy5s3k3"; + sha256 = "0gdv33g7dr1i7756n07zwgsv9b1i15rp7n1z1xr3n8f59br4fds4"; }; nativeBuildInputs = [ pkgconfig makeWrapper ]; |