mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
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:
parent
335a9083b0
commit
ef8566f38b
@ -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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user