Commit fcbf9c64 authored by Yarny0's avatar Yarny0
Browse files

patch-ppd-files: use `meta` and `passthru` directly

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

Commits ba895a7d and
48034046 enabled
`makeSetupHook` to receive these attributes directly.
It seems advisable to use that instead of `.overrideAttrs`.
parent db24d86d
Loading
Loading
Loading
Loading
+12 −19
Original line number Diff line number Diff line
@@ -4,22 +4,15 @@
, callPackage
}:

let
  patchPpdFilesHook = makeSetupHook
    {
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
  {
  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";
    meta.maintainers = [ lib.maintainers.yarny ];
  }
)
  meta = {
    description = "setup hook to patch executable paths in ppd files";
    maintainers = [ lib.maintainers.yarny ];
  };
} ./patch-ppd-hook.sh