mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 20:03:16 +00:00
fcbf9c6415
When I authored the nix file in335a9083b0
, `makeSetupHook` didn't know about `passthru` or `meta`. So I foisted these attributes on the derivation with `.overrideAttrs`. Commitsba895a7da8
and48034046bf
enabled `makeSetupHook` to receive these attributes directly. It seems advisable to use that instead of `.overrideAttrs`.
19 lines
391 B
Nix
19 lines
391 B
Nix
{ lib
|
|
, makeSetupHook
|
|
, which
|
|
, callPackage
|
|
}:
|
|
|
|
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
|