diff options
author | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2023-03-31 19:32:33 +0200 |
---|---|---|
committer | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2023-04-11 16:58:18 +0200 |
commit | fcbf9c6415e9936475d05e6f1090793367b0f2ff (patch) | |
tree | 3aae106fe7eca92482a8ca121741030831c7c03b /pkgs/build-support/setup-hooks | |
parent | db24d86dd8a4769c50d6b7295e81aa280cd93f35 (diff) |
patch-ppd-files: use `meta` and `passthru` directly
When I authored the nix file in 335a9083b02d2a7034dd98c8641f019e85e50426, `makeSetupHook` didn't know about `passthru` or `meta`. So I foisted these attributes on the derivation with `.overrideAttrs`. Commits ba895a7da8f86c6f924fc96026d8f1cb1ea2af1e and 48034046bf6271d44f7dea4c1ba97196b3b105a7 enabled `makeSetupHook` to receive these attributes directly. It seems advisable to use that instead of `.overrideAttrs`.
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r-- | pkgs/build-support/setup-hooks/patch-ppd-files/default.nix | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix b/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix index b3c7b19f37325..854f857020aaa 100644 --- a/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix +++ b/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix @@ -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 |