python311Packages.moto: 4.2.6 -> 4.2.10
[NixPkgs.git] / pkgs / build-support / setup-hooks / patch-rc-path-hooks / default.nix
blobf16644528f002df00d197ad66a16cc0e061cbd41
1 { lib
2 , callPackage
3 , makeSetupHook
4 , gnused
5 }:
6 let
7   tests = import ./test { inherit callPackage; };
8 in
10   patchRcPathBash = makeSetupHook
11     {
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     {
23       name = "patch-rc-path-csh";
24       substitutions = {
25         sed = "${gnused}/bin/sed";
26       };
27       meta = with lib; {
28         description = "Setup-hook to inject source-time PATH prefix to a Csh script";
29         maintainers = with maintainers; [ ShamrockLee ];
30       };
31       passthru.tests = {
32         inherit (tests) test-csh;
33       };
34     } ./patch-rc-path-csh.sh;
35   patchRcPathFish = makeSetupHook
36     {
37       name = "patch-rc-path-fish";
38       meta = with lib; {
39         description = "Setup-hook to inject source-time PATH prefix to a Fish script";
40         maintainers = with maintainers; [ ShamrockLee ];
41       };
42       passthru.tests = {
43         inherit (tests) test-fish;
44       };
45     } ./patch-rc-path-fish.sh;
46   patchRcPathPosix = makeSetupHook
47     {
48       name = "patch-rc-path-posix";
49       substitutions = {
50         sed = "${gnused}/bin/sed";
51       };
52       meta = with lib; {
53         description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script";
54         maintainers = with maintainers; [ ShamrockLee ];
55       };
56       passthru.tests = {
57         inherit (tests) test-posix;
58       };
59     } ./patch-rc-path-posix.sh;