Merge pull request #136897 from pshirshov/br9020cdw
This commit is contained in:
commit
0f05da42d6
3 changed files with 109 additions and 0 deletions
|
@ -8822,6 +8822,12 @@
|
|||
githubId = 33375;
|
||||
name = "Peter Sanford";
|
||||
};
|
||||
pshirshov = {
|
||||
email = "pshirshov@eml.cc";
|
||||
github = "pshirshov";
|
||||
githubId = 295225;
|
||||
name = "Pavel Shirshov";
|
||||
};
|
||||
psibi = {
|
||||
email = "sibi@psibi.in";
|
||||
github = "psibi";
|
||||
|
|
99
pkgs/misc/cups/drivers/brother/dcp9020cdw/default.nix
Normal file
99
pkgs/misc/cups/drivers/brother/dcp9020cdw/default.nix
Normal file
|
@ -0,0 +1,99 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, cups
|
||||
, dpkg
|
||||
, gnused
|
||||
, makeWrapper
|
||||
, ghostscript
|
||||
, file
|
||||
, a2ps
|
||||
, coreutils
|
||||
, gnugrep
|
||||
, which
|
||||
, gawk
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.1.2";
|
||||
model = "dcp9020cdw";
|
||||
in
|
||||
rec {
|
||||
driver = stdenv.mkDerivation {
|
||||
pname = "${model}-lpr";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.brother.com/welcome/dlf100441/dcp9020cdwlpr-${version}-1.i386.deb";
|
||||
sha256 = "1z6nma489s0a0b0a8wyg38yxanz4k99dg29fyjs4jlprsvmwk56y";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
||||
buildInputs = [ cups ghostscript a2ps gawk ];
|
||||
unpackPhase = "dpkg-deb -x $src $out";
|
||||
|
||||
installPhase = ''
|
||||
substituteInPlace $out/opt/brother/Printers/${model}/lpd/filter${model} \
|
||||
--replace /opt "$out/opt"
|
||||
|
||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
$out/opt/brother/Printers/${model}/lpd/br${model}filter
|
||||
|
||||
mkdir -p $out/lib/cups/filter/
|
||||
ln -s $out/opt/brother/Printers/${model}/lpd/filter${model} $out/lib/cups/filter/brother_lpdwrapper_${model}
|
||||
|
||||
wrapProgram $out/opt/brother/Printers/${model}/lpd/filter${model} \
|
||||
--prefix PATH ":" ${lib.makeBinPath [
|
||||
gawk
|
||||
ghostscript
|
||||
a2ps
|
||||
file
|
||||
gnused
|
||||
gnugrep
|
||||
coreutils
|
||||
which
|
||||
]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.brother.com/";
|
||||
description = "Brother ${model} printer driver";
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=gb&lang=en&prod=${model}_eu&os=128";
|
||||
maintainers = with maintainers; [ pshirshov ];
|
||||
};
|
||||
};
|
||||
|
||||
cupswrapper = stdenv.mkDerivation {
|
||||
pname = "${model}-cupswrapper";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.brother.com/welcome/dlf100443/dcp9020cdwcupswrapper-${version}-1.i386.deb";
|
||||
sha256 = "04yqm1qv9p4hgp1p6mqq4siygl4056s6flv6kqln8mvmcr8zaq1s";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
||||
buildInputs = [ cups ghostscript a2ps gawk ];
|
||||
unpackPhase = "dpkg-deb -x $src $out";
|
||||
|
||||
installPhase = ''
|
||||
for f in $out/opt/brother/Printers/${model}/cupswrapper/cupswrapper${model}; do
|
||||
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ coreutils ghostscript gnugrep gnused ]}
|
||||
done
|
||||
|
||||
mkdir -p $out/share/cups/model
|
||||
ln -s $out/opt/brother/Printers/${model}/cupswrapper/brother_${model}_printer_en.ppd $out/share/cups/model/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.brother.com/";
|
||||
description = "Brother ${model} printer CUPS wrapper driver";
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=gb&lang=en&prod=${model}_eu&os=128";
|
||||
maintainers = with maintainers; [ pshirshov ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -31533,6 +31533,10 @@ with pkgs;
|
|||
|
||||
cups-bjnp = callPackage ../misc/cups/drivers/cups-bjnp { };
|
||||
|
||||
dcp9020cdwlpr = (pkgsi686Linux.callPackage ../misc/cups/drivers/brother/dcp9020cdw { }).driver;
|
||||
|
||||
dcp9020cdw-cupswrapper = (callPackage ../misc/cups/drivers/brother/dcp9020cdw { }).cupswrapper;
|
||||
|
||||
cups-brother-hl1110 = pkgsi686Linux.callPackage ../misc/cups/drivers/hl1110 { };
|
||||
|
||||
cups-brother-hl1210w = pkgsi686Linux.callPackage ../misc/cups/drivers/hl1210w { };
|
||||
|
|
Loading…
Reference in a new issue