14 stdenv.mkDerivation rec {
15 pname = "mfcl2740dwcupswrapper";
19 url = "https://download.brother.com/welcome/dlf101726/${pname}-${version}.i386.deb";
20 sha256 = "078453e19f20ab6c7fc4d63c3e09f162f3d1410c04c23a294b6ffbd720b35ffb";
28 unpackPhase = "dpkg-deb -x $src $out";
31 basedir=${mfcl2740dwlpr}/opt/brother/Printers/MFCL2740DW
32 dir=$out/opt/brother/Printers/MFCL2740DW
34 substituteInPlace $dir/cupswrapper/brother_lpdwrapper_MFCL2740DW \
35 --replace /usr/bin/perl ${perl}/bin/perl \
36 --replace "basedir =~" "basedir = \"$basedir\"; #" \
37 --replace "PRINTER =~" "PRINTER = \"MFCL2740DW\"; #"
39 substituteInPlace $dir/cupswrapper/paperconfigml1 \
40 --replace /usr/bin/perl ${perl}/bin/perl
42 wrapProgram $dir/cupswrapper/brother_lpdwrapper_MFCL2740DW \
51 mkdir -p $out/lib/cups/filter
52 mkdir -p $out/share/cups/model
54 ln $dir/cupswrapper/brother_lpdwrapper_MFCL2740DW $out/lib/cups/filter
55 ln $dir/cupswrapper/brother-MFCL2740DW-cups-en.ppd $out/share/cups/model
59 description = "Brother MFC-L2740DW CUPS wrapper driver";
60 homepage = "http://www.brother.com/";
61 license = lib.licenses.gpl2Plus;