Skip to content

Commit

Permalink
mfc5890cnlpr: init at 1.1.2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinRamm committed Mar 18, 2023
1 parent aeece9d commit e2871a5
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
75 changes: 75 additions & 0 deletions pkgs/misc/cups/drivers/mfc5890cnlpr/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ stdenv
, a2ps
, lib
, fetchurl
, dpkg
, makeWrapper
, coreutils
, file
, gawk
, ghostscript
, gnused
, pkgsi686Linux
}:

stdenv.mkDerivation rec {
pname = "mfc5890cnlpr";
version = "1.1.2-2";

src = fetchurl {
url = "https://download.brother.com/welcome/dlf006168/${pname}-${version}.i386.deb";
sha256 = "119h3s1p9pv83mrfv6cmxpc0v33xf8c9nw5clj9yafv3aizxy6dp";
};

unpackPhase = ''
dpkg-deb -x $src $out
'';

nativeBuildInputs = [
dpkg
makeWrapper
];

dontBuild = true;

installPhase = ''
dir=$out/usr/local/Brother/Printer/mfc5890cn
patchelf --set-interpreter ${pkgsi686Linux.glibc.out}/lib/ld-linux.so.2 $dir/lpd/brmfc5890cnfilter
wrapProgram $dir/inf/setupPrintcapij \
--prefix PATH : ${lib.makeBinPath [
coreutils
]}
substituteInPlace $dir/lpd/filtermfc5890cn \
--replace "/usr/" "$out/usr/"
wrapProgram $dir/lpd/filtermfc5890cn \
--prefix PATH : ${lib.makeBinPath [
a2ps
coreutils
file
ghostscript
gnused
]}
substituteInPlace $dir/lpd/psconvertij2 \
--replace '`which gs`' "${ghostscript}/bin/gs"
wrapProgram $dir/lpd/psconvertij2 \
--prefix PATH : ${lib.makeBinPath [
gnused
gawk
]}
'';

meta = with lib; {
description = "Brother MFC-5890CN LPR printer driver";
homepage = "http://www.brother.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ martinramm ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38691,6 +38691,8 @@ with pkgs;
mfcl8690cdwcupswrapper = callPackage ../misc/cups/drivers/mfcl8690cdwcupswrapper { };
mfcl8690cdwlpr = callPackage ../misc/cups/drivers/mfcl8690cdwlpr { };

mfc5890cnlpr = callPackage ../misc/cups/drivers/mfc5890cnlpr { };

mfc9140cdncupswrapper = callPackage ../misc/cups/drivers/mfc9140cdncupswrapper { };
mfc9140cdnlpr = callPackage ../misc/cups/drivers/mfc9140cdnlpr { };

Expand Down

0 comments on commit e2871a5

Please sign in to comment.