acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / mf / mfcl8690cdwlpr / package.nix
blobf290b9563cc75effe71e83cffbc5735502fd1f8f
1 { coreutils, dpkg, fetchurl, file, ghostscript, gnugrep, gnused,
2 makeWrapper, perl, pkgs, lib, stdenv, which }:
4 stdenv.mkDerivation rec {
5   pname = "mfcl8690cdwlpr";
6   version = "1.3.0-0";
8   src = fetchurl {
9     url = "http://download.brother.com/welcome/dlf103241/${pname}-${version}.i386.deb";
10     sha256 = "0x8zd4b1psmw1znp2ibncs37xm5mljcy9yza2rx8jm8lp0a3l85v";
11   };
13   nativeBuildInputs = [ dpkg makeWrapper ];
15   dontUnpack = true;
17   installPhase = ''
18     dpkg-deb -x $src $out
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\"; #"
28     wrapProgram $filter \
29       --prefix PATH : ${lib.makeBinPath [
30       coreutils file ghostscript gnugrep gnused which
31       ]}
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
36   '';
38   meta = {
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;
43     maintainers = [ ];
44     platforms = [ "x86_64-linux" "i686-linux" ];
45   };