1{
2 lib,
3 callPackage,
4 makeSetupHook,
5 gnused,
6}:
7let
8 tests = import ./test { inherit callPackage; };
9in
10{
11 patchRcPathBash = makeSetupHook {
12 name = "patch-rc-path-bash";
13 meta = with lib; {
14 description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script";
15 maintainers = with maintainers; [ ShamrockLee ];
16 };
17 passthru.tests = {
18 inherit (tests) test-bash;
19 };
20 } ./patch-rc-path-bash.sh;
21 patchRcPathCsh = makeSetupHook {
22 name = "patch-rc-path-csh";
23 substitutions = {
24 sed = "${gnused}/bin/sed";
25 };
26 meta = with lib; {
27 description = "Setup-hook to inject source-time PATH prefix to a Csh script";
28 maintainers = with maintainers; [ ShamrockLee ];
29 };
30 passthru.tests = {
31 inherit (tests) test-csh;
32 };
33 } ./patch-rc-path-csh.sh;
34 patchRcPathFish = makeSetupHook {
35 name = "patch-rc-path-fish";
36 meta = with lib; {
37 description = "Setup-hook to inject source-time PATH prefix to a Fish script";
38 maintainers = with maintainers; [ ShamrockLee ];
39 };
40 passthru.tests = {
41 inherit (tests) test-fish;
42 };
43 } ./patch-rc-path-fish.sh;
44 patchRcPathPosix = makeSetupHook {
45 name = "patch-rc-path-posix";
46 substitutions = {
47 sed = "${gnused}/bin/sed";
48 };
49 meta = with lib; {
50 description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script";
51 maintainers = with maintainers; [ ShamrockLee ];
52 };
53 passthru.tests = {
54 inherit (tests) test-posix;
55 };
56 } ./patch-rc-path-posix.sh;
57}