(hopefully) fix fish
This commit is contained in:
parent
359d902425
commit
c6a74dd184
3 changed files with 18 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
|||
# Set up path
|
||||
fish_add_path --path --prepend '@bat@/bin'
|
||||
fish_add_path --path --prepend '@eza@/bin'
|
||||
|
||||
# Abbreviations
|
||||
abbr --add --global -- flake-update 'nix flake lock --update-input'
|
||||
abbr --add --global -- ns 'nix shell'
|
||||
|
|
|
@ -4,16 +4,22 @@
|
|||
...
|
||||
}: {
|
||||
# TODO: Fix once https://github.com/viperML/wrapper-manager/issues/14 is resolved
|
||||
wrappers.fish = {
|
||||
basePackage = pkgs.runCommandNoCC "fish-binary" {} ''
|
||||
wrappers.fish = let
|
||||
inherit (pkgs) runCommandNoCC;
|
||||
in {
|
||||
basePackage = runCommandNoCC "fish-binary" {} ''
|
||||
install -D -m555 ${lib.getExe pkgs.fish} "$out/bin/fish"
|
||||
'';
|
||||
extraWrapperFlags = "--inherit-argv0";
|
||||
|
||||
prependFlags = [
|
||||
prependFlags = let
|
||||
# Can't use pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
||||
config-fish = runCommandNoCC "config.fish" { inherit (pkgs) bat eza; } ''
|
||||
substituteAll ${./config.fish} "$out"
|
||||
'';
|
||||
in [
|
||||
"-C"
|
||||
"source ${./config.fish}"
|
||||
"source ${config-fish}"
|
||||
];
|
||||
|
||||
pathAdd = with pkgs; [bat eza];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue