1 { coreutils, dpkg, fetchurl, file, ghostscript, gnugrep, gnused,
2 makeWrapper, perl, pkgs, lib, stdenv, which }:
4 stdenv.mkDerivation rec {
5 pname = "mfcl8690cdwlpr";
9 url = "http://download.brother.com/welcome/dlf103241/${pname}-${version}.i386.deb";
10 sha256 = "0x8zd4b1psmw1znp2ibncs37xm5mljcy9yza2rx8jm8lp0a3l85v";
13 nativeBuildInputs = [ dpkg makeWrapper ];
20 dir=$out/opt/brother/Printers/mfcl8690cdw
21 filter=$dir/lpd/filter_mfcl8690cdw
23 substituteInPlace $filter \
24 --replace /usr/bin/perl ${perl}/bin/perl \
25 --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir/\"; #" \
26 --replace "PRINTER =~" "PRINTER = \"mfcl8690cdw\"; #"
29 --prefix PATH : ${lib.makeBinPath [
30 coreutils file ghostscript gnugrep gnused which
33 # need to use i686 glibc here, these are 32bit proprietary binaries
34 interpreter=${pkgs.pkgsi686Linux.glibc}/lib/ld-linux.so.2
35 patchelf --set-interpreter "$interpreter" $dir/lpd/brmfcl8690cdwfilter
39 description = "Brother MFC-L8690CDW LPR printer driver";
40 homepage = "http://www.brother.com/";
41 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
42 license = lib.licenses.unfree;
44 platforms = [ "x86_64-linux" "i686-linux" ];