patchRcPath hooks: use the passthru argument

+20 -24
+20 -24
pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix
··· 7 7 tests = import ./test { inherit callPackage; }; 8 8 in 9 9 { 10 - patchRcPathBash = (makeSetupHook 10 + patchRcPathBash = makeSetupHook 11 11 { 12 12 name = "patch-rc-path-bash"; 13 13 meta = with lib; { 14 14 description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script"; 15 15 maintainers = with maintainers; [ ShamrockLee ]; 16 16 }; 17 - } ./patch-rc-path-bash.sh).overrideAttrs (oldAttrs: { 18 - passthru.tests = { 19 - inherit (tests) test-bash; 20 - }; 21 - }); 22 - patchRcPathCsh = (makeSetupHook 17 + passthru.tests = { 18 + inherit (tests) test-bash; 19 + }; 20 + } ./patch-rc-path-bash.sh; 21 + patchRcPathCsh = makeSetupHook 23 22 { 24 23 name = "patch-rc-path-csh"; 25 24 substitutions = { ··· 29 28 description = "Setup-hook to inject source-time PATH prefix to a Csh script"; 30 29 maintainers = with maintainers; [ ShamrockLee ]; 31 30 }; 32 - } ./patch-rc-path-csh.sh).overrideAttrs (oldAttrs: { 33 - passthru.tests = { 34 - inherit (tests) test-csh; 35 - }; 36 - }); 37 - patchRcPathFish = (makeSetupHook 31 + passthru.tests = { 32 + inherit (tests) test-csh; 33 + }; 34 + } ./patch-rc-path-csh.sh; 35 + patchRcPathFish = makeSetupHook 38 36 { 39 37 name = "patch-rc-path-fish"; 40 38 meta = with lib; { 41 39 description = "Setup-hook to inject source-time PATH prefix to a Fish script"; 42 40 maintainers = with maintainers; [ ShamrockLee ]; 43 41 }; 44 - } ./patch-rc-path-fish.sh).overrideAttrs (oldAttrs: { 45 - passthru.tests = { 46 - inherit (tests) test-fish; 47 - }; 48 - }); 49 - patchRcPathPosix = (makeSetupHook 42 + passthru.tests = { 43 + inherit (tests) test-fish; 44 + }; 45 + } ./patch-rc-path-fish.sh; 46 + patchRcPathPosix = makeSetupHook 50 47 { 51 48 name = "patch-rc-path-posix"; 52 49 substitutions = { ··· 56 53 description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script"; 57 54 maintainers = with maintainers; [ ShamrockLee ]; 58 55 }; 59 - } ./patch-rc-path-posix.sh).overrideAttrs (oldAttrs: { 60 - passthru.tests = { 61 - inherit (tests) test-posix; 62 - }; 63 - }); 56 + passthru.tests = { 57 + inherit (tests) test-posix; 58 + }; 59 + } ./patch-rc-path-posix.sh; 64 60 }