cups-kyocera (cups driver): use patchPpdFilesHook

The `sed` script in the `installPhase` is removed.
Instead, the setup hook `patchPpdFilesHook`
is used to patch the path to `rastertokpsl`.

The result should essentially be the same.
Comparing the generated ppd files showed no difference
(short of the package's hash in the absolute paths).
The new package also contains a `propagated-build-inputs`
file which propagates the package itself.
This ensures the package is available whenever
a ppd file is singled out by another package.

Yarny0 bf30b538 ef8566f3

+11 -6
+11 -6
pkgs/misc/cups/drivers/kyocera/default.nix
··· 1 - { stdenv, lib, fetchzip, cups }: 2 3 let 4 platform = ··· 23 sha256 = "0z1pbgidkibv4j21z0ys8cq1lafc6687syqa07qij2qd8zp15wiz"; 24 }; 25 26 installPhase = '' 27 tar -xvf ${platform}/Global/English.tar.gz 28 install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl ··· 33 34 mkdir -p $out/share/cups/model/Kyocera 35 cd English 36 - for i in *.ppd; do 37 - sed -i $i -e \ 38 - "s,/usr/lib/cups/filter/rastertokpsl,$out/lib/cups/filter/rastertokpsl,g" 39 - cp $i $out/share/cups/model/Kyocera 40 - done; 41 ''; 42 43 meta = with lib; { 44 description = "CUPS drivers for several Kyocera FS-{1020,1025,1040,1060,1120,1125} printers";
··· 1 + { lib 2 + , stdenv 3 + , cups 4 + , fetchzip 5 + , patchPpdFilesHook 6 + }: 7 8 let 9 platform = ··· 28 sha256 = "0z1pbgidkibv4j21z0ys8cq1lafc6687syqa07qij2qd8zp15wiz"; 29 }; 30 31 + nativeBuildInputs = [ patchPpdFilesHook ]; 32 + 33 installPhase = '' 34 tar -xvf ${platform}/Global/English.tar.gz 35 install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl ··· 40 41 mkdir -p $out/share/cups/model/Kyocera 42 cd English 43 + cp *.ppd $out/share/cups/model/Kyocera 44 ''; 45 + 46 + ppdFileCommands = [ "rastertokpsl" ]; 47 48 meta = with lib; { 49 description = "CUPS drivers for several Kyocera FS-{1020,1025,1040,1060,1120,1125} printers";