2020-04-24 23:36:52 +00:00
|
|
|
{ coreutils, dpkg, fetchurl, file, ghostscript, gnugrep, gnused,
|
2021-01-17 00:15:33 +00:00
|
|
|
makeWrapper, perl, pkgs, lib, stdenv, which }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mfcl8690cdwlpr";
|
|
|
|
version = "1.3.0-0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.brother.com/welcome/dlf103241/${pname}-${version}.i386.deb";
|
|
|
|
sha256 = "0x8zd4b1psmw1znp2ibncs37xm5mljcy9yza2rx8jm8lp0a3l85v";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ dpkg makeWrapper ];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
dpkg-deb -x $src $out
|
|
|
|
|
|
|
|
dir=$out/opt/brother/Printers/mfcl8690cdw
|
|
|
|
filter=$dir/lpd/filter_mfcl8690cdw
|
|
|
|
|
|
|
|
substituteInPlace $filter \
|
|
|
|
--replace /usr/bin/perl ${perl}/bin/perl \
|
|
|
|
--replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir/\"; #" \
|
|
|
|
--replace "PRINTER =~" "PRINTER = \"mfcl8690cdw\"; #"
|
|
|
|
|
|
|
|
wrapProgram $filter \
|
2021-01-17 00:15:33 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
coreutils file ghostscript gnugrep gnused which
|
|
|
|
]}
|
|
|
|
|
|
|
|
# need to use i686 glibc here, these are 32bit proprietary binaries
|
|
|
|
interpreter=${pkgs.pkgsi686Linux.glibc}/lib/ld-linux.so.2
|
|
|
|
patchelf --set-interpreter "$interpreter" $dir/lpd/brmfcl8690cdwfilter
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Brother MFC-L8690CDW LPR printer driver";
|
|
|
|
homepage = "http://www.brother.com/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.unfree;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|