Merge pull request #25654 from 4z3/mfcl2700dn

Add support for Brother MFC-L2700DN

authored by Jörg Thalheim and committed by GitHub 30223dd3 01ec484a

+91
+44
pkgs/misc/cups/drivers/mfcl2700dncupswrapper/default.nix
··· 1 + { coreutils, dpkg, fetchurl, gnugrep, gnused, makeWrapper, mfcl2700dnlpr, perl, stdenv }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "mfcl2700dncupswrapper-${meta.version}"; 5 + 6 + src = fetchurl { 7 + url = "http://download.brother.com/welcome/dlf102086/${name}.i386.deb"; 8 + sha256 = "07w48mah0xbv4h8vsh1qd5cd4b463bx8y6gc5x9pfgsxsy6h6da1"; 9 + }; 10 + 11 + nativeBuildInputs = [ dpkg makeWrapper ]; 12 + 13 + phases = [ "installPhase" ]; 14 + 15 + installPhase = '' 16 + dpkg-deb -x $src $out 17 + 18 + basedir=${mfcl2700dnlpr}/opt/brother/Printers/MFCL2700DN 19 + dir=$out/opt/brother/Printers/MFCL2700DN 20 + 21 + substituteInPlace $dir/cupswrapper/brother_lpdwrapper_MFCL2700DN \ 22 + --replace /usr/bin/perl ${perl}/bin/perl \ 23 + --replace "basedir =~" "basedir = \"$basedir\"; #" \ 24 + --replace "PRINTER =~" "PRINTER = \"MFCL2700DN\"; #" 25 + 26 + wrapProgram $dir/cupswrapper/brother_lpdwrapper_MFCL2700DN \ 27 + --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnugrep gnused ]} 28 + 29 + mkdir -p $out/lib/cups/filter 30 + mkdir -p $out/share/cups/model 31 + 32 + ln $dir/cupswrapper/brother_lpdwrapper_MFCL2700DN $out/lib/cups/filter 33 + ln $dir/cupswrapper/brother-MFCL2700DN-cups-en.ppd $out/share/cups/model 34 + ''; 35 + 36 + meta = { 37 + description = "Brother MFC-L2700DN CUPS wrapper driver"; 38 + homepage = "http://www.brother.com/"; 39 + license = stdenv.lib.licenses.gpl2Plus; 40 + maintainers = [ stdenv.lib.maintainers.tv ]; 41 + platforms = stdenv.lib.platforms.linux; 42 + version = "3.2.0-1"; 43 + }; 44 + }
+44
pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix
··· 1 + { coreutils, dpkg, fetchurl, ghostscript, gnugrep, gnused, makeWrapper, perl, stdenv, which }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "mfcl2700dnlpr-${meta.version}"; 5 + 6 + src = fetchurl { 7 + url = "http://download.brother.com/welcome/dlf102085/${name}.i386.deb"; 8 + sha256 = "170qdzxlqikzvv2wphvfb37m19mn13az4aj88md87ka3rl5knk4m"; 9 + }; 10 + 11 + nativeBuildInputs = [ dpkg makeWrapper ]; 12 + 13 + phases = [ "installPhase" ]; 14 + 15 + installPhase = '' 16 + dpkg-deb -x $src $out 17 + 18 + dir=$out/opt/brother/Printers/MFCL2700DN 19 + 20 + substituteInPlace $dir/lpd/filter_MFCL2700DN \ 21 + --replace /usr/bin/perl ${perl}/bin/perl \ 22 + --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \ 23 + --replace "PRINTER =~" "PRINTER = \"MFCL2700DN\"; #" 24 + 25 + wrapProgram $dir/lpd/filter_MFCL2700DN \ 26 + --prefix PATH : ${stdenv.lib.makeBinPath [ 27 + coreutils ghostscript gnugrep gnused which 28 + ]} 29 + 30 + interpreter=$(cat $NIX_CC/nix-support/dynamic-linker) 31 + patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter 32 + patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3 33 + patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3 34 + ''; 35 + 36 + meta = { 37 + description = "Brother MFC-L2700DN LPR driver"; 38 + homepage = "http://www.brother.com/"; 39 + license = stdenv.lib.licenses.unfree; 40 + maintainers = [ stdenv.lib.maintainers.tv ]; 41 + platforms = [ "i686-linux" ]; 42 + version = "3.2.0-1"; 43 + }; 44 + }
+3
pkgs/top-level/all-packages.nix
··· 18756 18756 mfcj6510dw-cupswrapper = callPackage ../misc/cups/drivers/mfcj6510dwcupswrapper { }; 18757 18757 mfcj6510dwlpr = callPackage_i686 ../misc/cups/drivers/mfcj6510dwlpr { }; 18758 18758 18759 + mfcl2700dncupswrapper = callPackage ../misc/cups/drivers/mfcl2700dncupswrapper { }; 18760 + mfcl2700dnlpr = callPackage_i686 ../misc/cups/drivers/mfcl2700dnlpr { }; 18761 + 18759 18762 samsung-unified-linux-driver_1_00_37 = callPackage ../misc/cups/drivers/samsung { }; 18760 18763 samsung-unified-linux-driver_4_01_17 = callPackage ../misc/cups/drivers/samsung/4.01.17.nix { }; 18761 18764 samsung-unified-linux-driver = callPackage ../misc/cups/drivers/samsung/4.00.39 { };