diff options
-rw-r--r-- | lib/maintainers.nix | 1 | ||||
-rw-r--r-- | pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix | 47 | ||||
-rw-r--r-- | pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix | 45 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 3 |
4 files changed, 96 insertions, 0 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix index d9da0afcdb997..901875236f2aa 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -765,6 +765,7 @@ wscott = "Wayne Scott <wsc9tt@gmail.com>"; wyvie = "Elijah Rum <elijahrum@gmail.com>"; xaverdh = "Dominik Xaver Hörl <hoe.dom@gmx.de>"; + xeji = "xeji <xeji@cat3.de>"; xnwdd = "Guillermo NWDD <nwdd+nixos@no.team>"; xurei = "Olivier Bourdoux <olivier.bourdoux@gmail.com>"; xvapx = "Marti Serra <marti.serra.coscollano@gmail.com>"; diff --git a/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix b/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix new file mode 100644 index 0000000000000..d45b53b5b80bf --- /dev/null +++ b/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, dpkg, makeWrapper, coreutils, gnugrep, gnused, perl, mfcl2720dwlpr }: + +stdenv.mkDerivation rec { + name = "mfcl2720dwcupswrapper-${version}"; + version = "3.2.0-1"; + + src = fetchurl { + url = "http://download.brother.com/welcome/dlf101802/${name}.i386.deb"; + sha256 = "6d131926ce22c51b1854d2b91e426cc7ecbf5d6dabd698ef51a417090e35c598"; + }; + + nativeBuildInputs = [ dpkg makeWrapper ]; + + phases = [ "installPhase" ]; + + installPhase = '' + dpkg-deb -x $src $out + + basedir=${mfcl2720dwlpr}/opt/brother/Printers/MFCL2720DW + dir=$out/opt/brother/Printers/MFCL2720DW + + substituteInPlace $dir/cupswrapper/brother_lpdwrapper_MFCL2720DW \ + --replace /usr/bin/perl ${perl}/bin/perl \ + --replace "basedir =~" "basedir = \"$basedir\"; #" \ + --replace "PRINTER =~" "PRINTER = \"MFCL2720DW\"; #" + + substituteInPlace $dir/cupswrapper/paperconfigml1 \ + --replace /usr/bin/perl ${perl}/bin/perl + + wrapProgram $dir/cupswrapper/brother_lpdwrapper_MFCL2720DW \ + --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnugrep gnused ]} + + mkdir -p $out/lib/cups/filter + mkdir -p $out/share/cups/model + + ln $dir/cupswrapper/brother_lpdwrapper_MFCL2720DW $out/lib/cups/filter + ln $dir/cupswrapper/brother-MFCL2720DW-cups-en.ppd $out/share/cups/model + ''; + + meta = { + description = "Brother MFC-L2720DW CUPS wrapper driver"; + homepage = http://www.brother.com/; + license = stdenv.lib.licenses.gpl2; + platforms = [ "x86_64-linux" "i686-linux" ]; + maintainers = [ stdenv.lib.maintainers.xeji ]; + }; +} diff --git a/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix b/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix new file mode 100644 index 0000000000000..7791d71114b41 --- /dev/null +++ b/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix @@ -0,0 +1,45 @@ +{ pkgs, stdenv, fetchurl, dpkg, makeWrapper, coreutils, ghostscript, gnugrep, gnused, which, perl }: + +stdenv.mkDerivation rec { + name = "mfcl2720dwlpr-${version}"; + version = "3.2.0-1"; + + src = fetchurl { + url = "http://download.brother.com/welcome/dlf101801/${name}.i386.deb"; + sha256 = "088217e9ad118ec1e7f3d3f8f60f3bd839fe2c7d7c1136b249e9ac648dc742af"; + }; + + nativeBuildInputs = [ dpkg makeWrapper ]; + + phases = [ "installPhase" ]; + + installPhase = '' + dpkg-deb -x $src $out + + dir=$out/opt/brother/Printers/MFCL2720DW + + substituteInPlace $dir/lpd/filter_MFCL2720DW \ + --replace /usr/bin/perl ${perl}/bin/perl \ + --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \ + --replace "PRINTER =~" "PRINTER = \"MFCL2720DW\"; #" + + wrapProgram $dir/lpd/filter_MFCL2720DW \ + --prefix PATH : ${stdenv.lib.makeBinPath [ + coreutils ghostscript gnugrep gnused which + ]} + + # need to use i686 glibc here, these are 32bit proprietary binaries + interpreter=${pkgs.pkgsi686Linux.glibc}/lib/ld-linux.so.2 + patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter + patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3 + patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3 + ''; + + meta = { + description = "Brother MFC-L2720DW lpr driver"; + homepage = http://www.brother.com/; + license = stdenv.lib.licenses.unfree; + platforms = [ "x86_64-linux" "i686-linux" ]; + maintainers = [ stdenv.lib.maintainers.xeji ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 898647823ce4b..311a55bc02ed3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20293,6 +20293,9 @@ with pkgs; mfcl2700dncupswrapper = callPackage ../misc/cups/drivers/mfcl2700dncupswrapper { }; mfcl2700dnlpr = callPackage_i686 ../misc/cups/drivers/mfcl2700dnlpr { }; + mfcl2720dwcupswrapper = callPackage ../misc/cups/drivers/mfcl2720dwcupswrapper { }; + mfcl2720dwlpr = callPackage ../misc/cups/drivers/mfcl2720dwlpr { }; + samsung-unified-linux-driver_1_00_37 = callPackage ../misc/cups/drivers/samsung { }; samsung-unified-linux-driver_4_01_17 = callPackage ../misc/cups/drivers/samsung/4.01.17.nix { }; samsung-unified-linux-driver = callPackage ../misc/cups/drivers/samsung/4.00.39 { }; |