patch-ppd-files: use meta and passthru directly

When I authored the nix file in
335a9083b0,
`makeSetupHook` didn't know about `passthru` or `meta`.
So I foisted these attributes on the
derivation with `.overrideAttrs`.

Commits ba895a7da8 and
48034046bf enabled
`makeSetupHook` to receive these attributes directly.
It seems advisable to use that instead of `.overrideAttrs`.
This commit is contained in:
Yarny0 2023-03-31 19:32:33 +02:00
parent db24d86dd8
commit fcbf9c6415

View file

@ -4,22 +4,15 @@
, callPackage
}:
let
patchPpdFilesHook = makeSetupHook
{
name = "patch-ppd-files";
substitutions.which = lib.attrsets.getBin which;
substitutions.awkscript = ./patch-ppd-lines.awk;
}
./patch-ppd-hook.sh;
in
patchPpdFilesHook.overrideAttrs (
lib.trivial.flip
lib.attrsets.recursiveUpdate
{
passthru.tests.test = callPackage ./test.nix {};
meta.description = "setup hook to patch executable paths in ppd files";
meta.maintainers = [ lib.maintainers.yarny ];
}
)
makeSetupHook {
name = "patch-ppd-files";
substitutions = {
which = lib.getBin which;
awkscript = ./patch-ppd-lines.awk;
};
passthru.tests.test = callPackage ./test.nix {};
meta = {
description = "setup hook to patch executable paths in ppd files";
maintainers = [ lib.maintainers.yarny ];
};
} ./patch-ppd-hook.sh