patchRcPath hooks: use the passthru argument

This commit is contained in:
Shamrock Lee 2022-10-31 16:48:07 +00:00
parent a664ec27f4
commit 6386d79326

View file

@ -7,19 +7,18 @@ let
tests = import ./test { inherit callPackage; };
in
{
patchRcPathBash = (makeSetupHook
patchRcPathBash = makeSetupHook
{
name = "patch-rc-path-bash";
meta = with lib; {
description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script";
maintainers = with maintainers; [ ShamrockLee ];
};
} ./patch-rc-path-bash.sh).overrideAttrs (oldAttrs: {
passthru.tests = {
inherit (tests) test-bash;
};
});
patchRcPathCsh = (makeSetupHook
passthru.tests = {
inherit (tests) test-bash;
};
} ./patch-rc-path-bash.sh;
patchRcPathCsh = makeSetupHook
{
name = "patch-rc-path-csh";
substitutions = {
@ -29,24 +28,22 @@ in
description = "Setup-hook to inject source-time PATH prefix to a Csh script";
maintainers = with maintainers; [ ShamrockLee ];
};
} ./patch-rc-path-csh.sh).overrideAttrs (oldAttrs: {
passthru.tests = {
inherit (tests) test-csh;
};
});
patchRcPathFish = (makeSetupHook
passthru.tests = {
inherit (tests) test-csh;
};
} ./patch-rc-path-csh.sh;
patchRcPathFish = makeSetupHook
{
name = "patch-rc-path-fish";
meta = with lib; {
description = "Setup-hook to inject source-time PATH prefix to a Fish script";
maintainers = with maintainers; [ ShamrockLee ];
};
} ./patch-rc-path-fish.sh).overrideAttrs (oldAttrs: {
passthru.tests = {
inherit (tests) test-fish;
};
});
patchRcPathPosix = (makeSetupHook
passthru.tests = {
inherit (tests) test-fish;
};
} ./patch-rc-path-fish.sh;
patchRcPathPosix = makeSetupHook
{
name = "patch-rc-path-posix";
substitutions = {
@ -56,9 +53,8 @@ in
description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script";
maintainers = with maintainers; [ ShamrockLee ];
};
} ./patch-rc-path-posix.sh).overrideAttrs (oldAttrs: {
passthru.tests = {
inherit (tests) test-posix;
};
});
passthru.tests = {
inherit (tests) test-posix;
};
} ./patch-rc-path-posix.sh;
}