forked from mirrors/nixpkgs
wrapFish: use writeShellApplication
and add runtimeInputs
This commit is contained in:
parent
b6fb8db7b7
commit
1f89b89ec8
|
@ -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
|
||||
" "$@"
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue