cups-drv-rastertosag-gdi (cups driver): patch ppd bin paths

The `cups-drv-rastertosag-gdi` CUPS printer driver
package provides a filter executable `rastertosag-gdi`
and two ppd files that reference the filter file.
The commit at hand uses `patchPpdFilesHook` to
replace calls to the filter executable with
absolute paths to increase package purity.
This commit is contained in:
Yarny0 2021-07-07 20:25:53 +02:00
parent 335a9083b0
commit ef8566f38b

View File

@ -3,6 +3,7 @@
, fetchpatch
, cups
, python3Packages
, patchPpdFilesHook
}:
python3Packages.buildPythonApplication rec {
@ -20,7 +21,7 @@ python3Packages.buildPythonApplication rec {
})
];
format = "other";
nativeBuildInputs = [ (lib.getBin cups) ];
nativeBuildInputs = [ (lib.getBin cups) patchPpdFilesHook ];
# The source image also brings pre-built ppd files,
# but we prefer to generate from source where possible, so
# the following line generates ppd files from the drv file.
@ -35,6 +36,7 @@ python3Packages.buildPythonApplication rec {
ln -vst "${placeholder "out"}/lib/cups/filter/" "${placeholder "out"}/bin/rastertosag-gdi"
runHook postInstall
'';
ppdFileCommands = [ "rastertosag-gdi" ];
postFixup = ''
gzip -9nv "${placeholder "out"}/share/cups/model/rastertosag-gdi"/*.ppd
'';