diff options
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/cups/drivers/kyocera/default.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/misc/cups/drivers/kyocera/default.nix b/pkgs/misc/cups/drivers/kyocera/default.nix index 28b2a1281761e..12e6f5bb4baee 100644 --- a/pkgs/misc/cups/drivers/kyocera/default.nix +++ b/pkgs/misc/cups/drivers/kyocera/default.nix @@ -1,4 +1,9 @@ -{ stdenv, lib, fetchzip, cups }: +{ lib +, stdenv +, cups +, fetchzip +, patchPpdFilesHook +}: let platform = @@ -23,6 +28,8 @@ stdenv.mkDerivation { sha256 = "0z1pbgidkibv4j21z0ys8cq1lafc6687syqa07qij2qd8zp15wiz"; }; + nativeBuildInputs = [ patchPpdFilesHook ]; + installPhase = '' tar -xvf ${platform}/Global/English.tar.gz install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl @@ -33,13 +40,11 @@ stdenv.mkDerivation { mkdir -p $out/share/cups/model/Kyocera cd English - for i in *.ppd; do - sed -i $i -e \ - "s,/usr/lib/cups/filter/rastertokpsl,$out/lib/cups/filter/rastertokpsl,g" - cp $i $out/share/cups/model/Kyocera - done; + cp *.ppd $out/share/cups/model/Kyocera ''; + ppdFileCommands = [ "rastertokpsl" ]; + meta = with lib; { description = "CUPS drivers for several Kyocera FS-{1020,1025,1040,1060,1120,1125} printers"; homepage = "https://www.kyoceradocumentsolutions.ru/index/service_support/download_center.false.driver.FS1040._.EN.html#"; |