16 stdenv.mkDerivation rec {
17 pname = "mfcl2740dwlpr";
21 url = "https://download.brother.com/welcome/dlf101727/${pname}-${version}.i386.deb";
22 sha256 = "10a2bc672bd54e718b478f3afc7e47d451557f7d5513167d3ad349a3d00bffaf";
30 unpackPhase = "dpkg-deb -x $src $out";
33 dir=$out/opt/brother/Printers/MFCL2740DW
35 substituteInPlace $dir/lpd/filter_MFCL2740DW \
36 --replace /usr/bin/perl ${perl}/bin/perl \
37 --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \
38 --replace "PRINTER =~" "PRINTER = \"MFCL2740DW\"; #"
40 wrapProgram $dir/lpd/filter_MFCL2740DW \
51 # need to use i686 glibc here, these are 32bit proprietary binaries
52 interpreter=${pkgsi686Linux.glibc}/lib/ld-linux.so.2
53 patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter
54 patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3
55 patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3
59 description = "Brother MFC-L2740DW lpr driver";
60 homepage = "http://www.brother.com/";
61 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
62 license = lib.licenses.unfree;