From 2c28e0dc18110736437e2a0b760aa933dd475ee0 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sun, 22 Aug 2021 19:40:05 +0200 Subject: [PATCH] cups-kyocera (cups driver): call {pre,post}Install Add `preInstall` and `postInstall` to the `installPhase` to permit package overrides to add commands to the install phase. Suggested by r-rmcgibbo bot in https://github.com/NixOS/nixpkgs/pull/133537#issuecomment-897437621 --- pkgs/misc/cups/drivers/kyocera/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/misc/cups/drivers/kyocera/default.nix b/pkgs/misc/cups/drivers/kyocera/default.nix index 12e6f5bb4bae..0a560e3188f6 100644 --- a/pkgs/misc/cups/drivers/kyocera/default.nix +++ b/pkgs/misc/cups/drivers/kyocera/default.nix @@ -31,6 +31,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ patchPpdFilesHook ]; installPhase = '' + runHook preInstall + tar -xvf ${platform}/Global/English.tar.gz install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl patchelf \ @@ -41,6 +43,8 @@ stdenv.mkDerivation { mkdir -p $out/share/cups/model/Kyocera cd English cp *.ppd $out/share/cups/model/Kyocera + + runHook postInstall ''; ppdFileCommands = [ "rastertokpsl" ];