about summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-10-19 05:24:28 +0200
committerJan Tojnar <jtojnar@gmail.com>2022-10-19 05:24:28 +0200
commit457f28f6f85eea1b1671d62d2abe39297c9c90f7 (patch)
tree3c6e68534e7bfcde19893c830af7498b0606e6d2 /pkgs/shells
parenta25e03e76ae1e0367419db1de009e1139d08de68 (diff)
parent1aa7d4e6c61526606d9e26f939cdb60ec8f45fcd (diff)
Merge branch 'master' into staging-next
; Conflicts:
;	pkgs/development/tools/codespell/default.nix

codespell 2.2.2 switched to pyproject & setuptools_scm:
https://github.com/codespell-project/codespell/pull/2523
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/fish/wrapper.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/pkgs/shells/fish/wrapper.nix b/pkgs/shells/fish/wrapper.nix
index c5c55bb71103d..75213809821f2 100644
--- a/pkgs/shells/fish/wrapper.nix
+++ b/pkgs/shells/fish/wrapper.nix
@@ -1,4 +1,4 @@
-{ lib, writeShellScriptBin, fish, writeTextFile }:
+{ lib, writeShellApplication, fish, writeTextFile }:
 
 lib.makeOverridable ({
   completionDirs ? [],
@@ -6,7 +6,8 @@ lib.makeOverridable ({
   confDirs ? [],
   pluginPkgs ? [],
   localConfig ? "",
-  shellAliases ? {}
+  shellAliases ? {},
+  runtimeInputs ? []
 }:
 
 let
@@ -37,11 +38,15 @@ let
     ++ (map (vendorDir "conf") pluginPkgs)
     ++ (map (vendorDir "conf") [ localFishConfig shellAliasesFishConfig ]);
 
-in writeShellScriptBin "fish" ''
-  ${fish}/bin/fish --init-command "
-    set --prepend fish_complete_path ${lib.escapeShellArgs complPath}
-    set --prepend fish_function_path ${lib.escapeShellArgs funcPath}
-    set --local fish_conf_source_path ${lib.escapeShellArgs confPath}
-    for c in \$fish_conf_source_path/*; source \$c; end
-  " "$@"
-'')
+in writeShellApplication {
+  inherit runtimeInputs;
+  name = "fish";
+  text = ''
+    ${fish}/bin/fish --init-command "
+      set --prepend fish_complete_path ${lib.escapeShellArgs complPath}
+      set --prepend fish_function_path ${lib.escapeShellArgs funcPath}
+      set --local fish_conf_source_path ${lib.escapeShellArgs confPath}
+      for c in \$fish_conf_source_path/*; source \$c; end
+    " "$@"
+  '';
+})