1 { coreutils, dpkg, fetchurl, gnugrep, gnused, makeWrapper,
2 mfcl8690cdwlpr, perl, lib, stdenv}:
4 stdenv.mkDerivation rec {
5 pname = "mfcl8690cdwcupswrapper";
9 url = "http://download.brother.com/welcome/dlf103250/${pname}-${version}.i386.deb";
10 sha256 = "1bl9r8mmj4vnanwpfjqgq3c9lf2v46wp5k6r2n9iqprf7ldd1kb2";
13 nativeBuildInputs = [ dpkg makeWrapper ];
20 basedir=${mfcl8690cdwlpr}/opt/brother/Printers/mfcl8690cdw
21 dir=$out/opt/brother/Printers/mfcl8690cdw
23 substituteInPlace $dir/cupswrapper/brother_lpdwrapper_mfcl8690cdw \
24 --replace /usr/bin/perl ${perl}/bin/perl \
25 --replace "basedir =~" "basedir = \"$basedir/\"; #" \
26 --replace "PRINTER =~" "PRINTER = \"mfcl8690cdw\"; #"
28 wrapProgram $dir/cupswrapper/brother_lpdwrapper_mfcl8690cdw \
29 --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
31 mkdir -p $out/lib/cups/filter
32 mkdir -p $out/share/cups/model
34 ln $dir/cupswrapper/brother_lpdwrapper_mfcl8690cdw $out/lib/cups/filter
35 ln $dir/cupswrapper/brother_mfcl8690cdw_printer_en.ppd $out/share/cups/model
39 description = "Brother MFC-L8690CDW CUPS wrapper driver";
40 homepage = "http://www.brother.com/";
41 license = lib.licenses.unfree;
42 platforms = lib.platforms.linux;