chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / mf / mfcj880dwcupswrapper / package.nix
blob5fbc3948f03250ddcdf164c5e63ad5a62e945353
1 { lib, stdenv, fetchurl, mfcj880dwlpr, makeWrapper, bash }:
3 stdenv.mkDerivation rec {
4   pname = "mfcj880dw-cupswrapper";
5   version = "1.0.0-0";
7   src = fetchurl {
8     url = "https://download.brother.com/welcome/dlf102044/mfcj880dw_cupswrapper_GPL_source_${version}.tar.gz";
9     hash = "sha256-vykf4x1kr+rvtbDmBvS6+AxB2AAJ40syt31W91npz5Q=";
10   };
12   nativeBuildInputs = [ makeWrapper ];
13   buildInputs = [
14     bash # shebang
15   ];
17   makeFlags = [ "-C" "brcupsconfig" "all" ];
19   installPhase = ''
20     runHook preInstall
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
35     runHook postInstall
36     '';
38   meta = with lib; {
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 ];
45   };