From 47773e13ef5f3cc75f9854e073863a5e73cd2236 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:31:01 +0100 Subject: [PATCH 1/2] patchPpdFilesHook: `share/ppds` -> `share/ppd` This was an oversight in commit 335a9083b02d2a7034dd98c8641f019e85e50426 . The Wikipedia article referenced there https://en.wikipedia.org/wiki/PostScript_Printer_Description#CUPS clearly states that ppd file locations are `/usr/share/ppd/` or `/usr/share/cups/model/`. Even the version of that article from that commit's time says so. I don't know what dark force made me consistently change that to `/usr/share/ppds/`. *sigh*. --- pkgs/by-name/pa/patchPpdFilesHook/patch-ppd-hook.sh | 6 +++--- pkgs/by-name/pa/patchPpdFilesHook/test.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/pa/patchPpdFilesHook/patch-ppd-hook.sh b/pkgs/by-name/pa/patchPpdFilesHook/patch-ppd-hook.sh index 822714636415..ad86cc7aac50 100644 --- a/pkgs/by-name/pa/patchPpdFilesHook/patch-ppd-hook.sh +++ b/pkgs/by-name/pa/patchPpdFilesHook/patch-ppd-hook.sh @@ -5,7 +5,7 @@ fixupOutputHooks+=(_patchPpdFileCommands4fixupOutputHooks) # Install a hook for the `fixupPhase`: # If the variable `ppdFileCommands` contains a list of # executable names, the hook calls `patchPpdFileCommands` -# on each output's `/share/cups/model` and `/share/ppds` +# on each output's `/share/cups/model` and `/share/ppd` # directories in order to replace calls to those executables. _patchPpdFileCommands4fixupOutputHooks () { @@ -13,8 +13,8 @@ _patchPpdFileCommands4fixupOutputHooks () { if [[ -d $prefix/share/cups/model ]]; then patchPpdFileCommands "$prefix/share/cups/model" $ppdFileCommands fi - if [[ -d $prefix/share/ppds ]]; then - patchPpdFileCommands "$prefix/share/ppds" $ppdFileCommands + if [[ -d $prefix/share/ppd ]]; then + patchPpdFileCommands "$prefix/share/ppd" $ppdFileCommands fi } diff --git a/pkgs/by-name/pa/patchPpdFilesHook/test.nix b/pkgs/by-name/pa/patchPpdFilesHook/test.nix index ae49114a296a..9ee1feb9f22d 100644 --- a/pkgs/by-name/pa/patchPpdFilesHook/test.nix +++ b/pkgs/by-name/pa/patchPpdFilesHook/test.nix @@ -33,10 +33,10 @@ stdenv.mkDerivation { ppdFileCommands = [ "cmp" ]; preFixup = '' install -D "${input}" "${placeholder "out"}/share/cups/model/test.ppd" - install -D "${input}" "${placeholder "out"}/share/ppds/test.ppd" + install -D "${input}" "${placeholder "out"}/share/ppd/test.ppd" ''; postFixup = '' diff --color --report-identical-files "${output}" "${placeholder "out"}/share/cups/model/test.ppd" - diff --color --report-identical-files "${output}" "${placeholder "out"}/share/ppds/test.ppd" + diff --color --report-identical-files "${output}" "${placeholder "out"}/share/ppd/test.ppd" ''; } From 39dc238759bbc151d2c9e2506552c2c779d6a911 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:38:23 +0100 Subject: [PATCH 2/2] patchPpdFilesHook: use `getExe'` in test --- pkgs/by-name/pa/patchPpdFilesHook/test.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pa/patchPpdFilesHook/test.nix b/pkgs/by-name/pa/patchPpdFilesHook/test.nix index 9ee1feb9f22d..30a8b62ff743 100644 --- a/pkgs/by-name/pa/patchPpdFilesHook/test.nix +++ b/pkgs/by-name/pa/patchPpdFilesHook/test.nix @@ -1,4 +1,5 @@ { + lib, replaceVars, diffutils, stdenv, @@ -6,6 +7,8 @@ }: let + inherit (lib.meta) getExe'; + input = replaceVars ./test.ppd { keep = "cmp"; patch = "cmp"; @@ -15,9 +18,9 @@ let output = replaceVars ./test.ppd { keep = "cmp"; - patch = "${diffutils}/bin/cmp"; + patch = getExe' diffutils "cmp"; pathkeep = "/bin/cmp"; - pathpatch = "${diffutils}/bin/cmp"; + pathpatch = getExe' diffutils "cmp"; }; in