summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks/patch-rc-path-hooks
diff options
context:
space:
mode:
authorShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2022-10-31 16:48:07 +0000
committerShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2022-11-10 09:27:40 +0800
commit6386d793261ae917ae49bf95f587787c5b00db47 (patch)
treebddb9e8bfaf8c4474a4eac9192b14edeb2081542 /pkgs/build-support/setup-hooks/patch-rc-path-hooks
parenta664ec27f44b4c7f29c03eff8b60ca62f90b2f16 (diff)
downloadnixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.tar
nixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.tar.gz
nixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.tar.bz2
nixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.tar.lz
nixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.tar.xz
nixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.tar.zst
nixpkgs-6386d793261ae917ae49bf95f587787c5b00db47.zip
patchRcPath hooks: use the passthru argument
Diffstat (limited to 'pkgs/build-support/setup-hooks/patch-rc-path-hooks')
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix44
1 files changed, 20 insertions, 24 deletions
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix
index 73fbfa6e9b7..f16644528f0 100644
--- a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix
@@ -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;
 }