19 url = "https://download.brother.com/welcome/dlf007070/hl3140cwcupswrapper-${version}.i386.deb";
20 sha256 = "a76281828ca6ee86c63034673577fadcf5f24e8ed003213bdbb6bf47a7aced6f";
22 srcdir = "hl3140cw_cupswrapper_GPL_source_${version}";
24 url = "https://download.brother.com/welcome/dlf006740/${srcdir}.tar.gz";
25 sha256 = "1wp85rbvbar6rqqkaffymxjpls6jx9m9230dlrpqwy5akiaxf0rl";
28 url = "https://support.brother.com/g/b/files/dlf/dlf007068/hl3140cwlpr-1.1.2-1.i386.deb";
29 sha256 = "601f392b52ed7080f71b780181823bb8f6abfd0591146b452ba1f23e21f9f865";
33 pname = "cups-brother-hl3140cw";
50 gcc -Wall ${srcdir}/brcupsconfig/brcupsconfig.c -o brcupsconfpt1
55 dpkg-deb -x ${lprdeb} $out
57 substituteInPlace $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \
58 --replace /opt "$out/opt"
59 substituteInPlace $out/opt/brother/Printers/hl3140cw/inf/setupPrintcapij \
60 --replace /opt "$out/opt"
62 sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2
64 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 $out/opt/brother/Printers/hl3140cw/lpd/brhl3140cwfilter
65 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 $out/usr/bin/brprintconf_hl3140cw
67 wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2 \
76 wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \
88 dpkg-deb -x ${cupsdeb} $out
90 substituteInPlace $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw \
91 --replace /opt "$out/opt"
93 mkdir -p $out/lib/cups/filter
94 ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw $out/lib/cups/filter/cupswrapperhl3140cw
96 ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/brother_hl3140cw_printer_en.ppd $out/lib/cups/filter/brother_hl3140cw_printer_en.ppd
98 cp brcupsconfpt1 $out/opt/brother/Printers/hl3140cw/cupswrapper/
99 ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/brcupsconfpt1 $out/lib/cups/filter/brcupsconfpt1
100 ln -s $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw $out/lib/cups/filter/brother_lpdwrapper_hl3140cw
102 wrapProgram $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw \
113 homepage = "http://www.brother.com/";
114 description = "Brother hl3140cw printer driver";
115 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
116 license = lib.licenses.unfree;
117 platforms = lib.platforms.linux;
118 downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=hl3140cw_us_eu&os=128";