nixos-config/packages/hll2380dw-cups.nix

45 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, makeWrapper, cups, dpkg, a2ps, ghostscript, gnugrep
, gnused, coreutils, file, perl, which }:
2020-06-06 19:24:59 -07:00
stdenv.mkDerivation rec {
pname = "hll2380dw-cups";
version = "3.2.0-1";
platform = "i386";
src = fetchurl {
url =
"https://download.brother.com/welcome/dlf101772/hll2380dwcupswrapper-${version}.i386.deb";
2020-06-06 19:24:59 -07:00
sha256 = "08g3kx5lgwzb3f9ypj8knmpkkj0h3kv1i4gd20rzjxrx6vx1wbpl";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ cups ghostscript dpkg a2ps ];
dontUnpack = true;
installPhase = ''
dpkg-deb -x $src $out
wrapProgram $out/opt/brother/Printers/HLL2380DW/cupswrapper/paperconfigml1 \
--prefix PATH : ${
lib.makeBinPath [ coreutils ghostscript gnugrep gnused ]
}
2020-06-06 19:24:59 -07:00
mkdir -p $out/lib/cups/filter/
2021-04-03 10:15:10 -07:00
ln -s $out/opt/brother/Printers/HLL2380DW/cupswrapper/brother_lpdwrapper_HLL2380DW \
2020-06-06 19:24:59 -07:00
$out/lib/cups/filter/brother_lpdwrapper_HLL2380DW
ln -s $out/opt/brother/Printers/HLL2380DW/paperconfigml1 \
$out/lib/cups/filter/
mkdir -p $out/share/cups/model
ln -s $out/opt/brother/Printers/HLL2380DW/cupswrapper/brother-HLL2380DW-cups-en.ppd $out/share/cups/model/
2021-04-03 10:15:10 -07:00
touch $out/HI
2020-06-06 19:24:59 -07:00
'';
meta = with lib; {
homepage = "http://www.brother.com/";
2020-06-06 19:24:59 -07:00
description = "Brother HL-L2380DW combined print driver";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
downloadPage =
"http://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2380dw_us&os=128";
2020-06-06 19:24:59 -07:00
};
}