1 { lib, stdenv, fetchurl, mfcj880dwlpr, makeWrapper, bash }:
3 stdenv.mkDerivation rec {
4 pname = "mfcj880dw-cupswrapper";
8 url = "https://download.brother.com/welcome/dlf102044/mfcj880dw_cupswrapper_GPL_source_${version}.tar.gz";
9 hash = "sha256-vykf4x1kr+rvtbDmBvS6+AxB2AAJ40syt31W91npz5Q=";
12 nativeBuildInputs = [ makeWrapper ];
17 makeFlags = [ "-C" "brcupsconfig" "all" ];
22 TARGETFOLDER=$out/opt/brother/Printers/mfcj880dw/cupswrapper
23 mkdir -p $TARGETFOLDER
24 cp PPD/brother_mfcj880dw_printer_en.ppd $TARGETFOLDER
25 cp brcupsconfig/brcupsconfpt1 $TARGETFOLDER
26 cp cupswrapper/cupswrappermfcj880dw $TARGETFOLDER
27 sed -i -e '26,306d' $TARGETFOLDER/cupswrappermfcj880dw
28 substituteInPlace $TARGETFOLDER/cupswrappermfcj880dw \
29 --replace-fail "\$ppd_file_name" "$TARGETFOLDER/brother_mfcj880dw_printer_en.ppd"
31 CPUSFILTERFOLDER=$out/lib/cups/filter
32 mkdir -p $TARGETFOLDER $CPUSFILTERFOLDER
33 ln -s ${mfcj880dwlpr}/lib/cups/filter/brother_lpdwrapper_mfcj880dw $out/lib/cups/filter/brother_lpdwrapper_mfcj880dw
39 homepage = "http://www.brother.com/";
40 description = "Brother MFC-J880DW CUPS wrapper driver";
41 license = with licenses; gpl2;
42 platforms = with platforms; linux;
43 downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj880dw_us_eu_as&os=128";
44 maintainers = with maintainers; [ _6543 ];