diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2022-10-17 22:49:33 +0200 |
---|---|---|
committer | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2022-10-18 08:12:03 +0200 |
commit | 1f89b89ec8867da75c8165d232240601cb49568f (patch) | |
tree | 9360ceea84654ca4698feee7c6d7e79015d3efda /pkgs/shells | |
parent | b6fb8db7b7c6aea5a822e41a25776454bdb299ce (diff) |
wrapFish: use `writeShellApplication` and add `runtimeInputs`
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/fish/wrapper.nix | 25 |
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 + " "$@" + ''; +}) |