10 if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
11 else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
12 else throw "Unsupported system: ${stdenv.hostPlatform.system}";
14 libPath = lib.makeLibraryPath [ cups ];
18 pname = "cups-kyocera";
25 url = "https://web.archive.org/web/20220709011705/https://cdn.kyostatics.net/dlc/ru/driver/all/linuxdrv_1_1203_fs-1x2xmfp.-downloadcenteritem-Single-File.downloadcenteritem.tmp/LinuxDrv_1.1203_FS-1x2xMFP.zip";
26 sha256 = "0z1pbgidkibv4j21z0ys8cq1lafc6687syqa07qij2qd8zp15wiz";
29 nativeBuildInputs = [ patchPpdFilesHook ];
34 tar -xvf ${platform}/Global/English.tar.gz
35 install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl
37 --set-rpath ${libPath} \
38 --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
39 $out/lib/cups/filter/rastertokpsl
41 mkdir -p $out/share/cups/model/Kyocera
43 cp *.ppd $out/share/cups/model/Kyocera
48 ppdFileCommands = [ "rastertokpsl" ];
51 description = "CUPS drivers for several Kyocera FS-{1020,1025,1040,1060,1120,1125} printers";
52 homepage = "https://www.kyoceradocumentsolutions.ru/index/service_support/download_center.false.driver.FS1040._.EN.html#";
53 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
54 license = licenses.unfree;
55 maintainers = [ maintainers.vanzef ];
56 platforms = platforms.linux;