diff options
author | hyperfekt <git@hyperfekt.net> | 2020-04-29 13:41:09 +0200 |
---|---|---|
committer | Cole Helbling <cole.e.helbling@outlook.com> | 2021-05-10 10:18:25 -0700 |
commit | 0ffab925ca40082fcaeab5984b759cf028a2819f (patch) | |
tree | 65fa4ce291a2fb8943373aa24c1905008ff56289 /pkgs/shells | |
parent | bab18ef95966b76b489422255c869390db521c6b (diff) |
fish: make python an optional dependency
Python is still used for tests, but does not become part of the closure. In addition, nowadays fish only ever uses Python via __fish_anypython, so using sed or propagating python isn't necessary anymore.
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/fish/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 61b2fe3032b24..a5754290426d8 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -19,6 +19,9 @@ , fishPlugins , procps +# used to generate autocompletions from manpages and for configuration editing in the browser +, usePython ? true + , runCommand , writeText , nixosTests @@ -200,12 +203,10 @@ let ''; # Required binaries during execution - # Python: Autocompletion generated from manpages and config editing propagatedBuildInputs = [ coreutils gnugrep gnused - python3 groff gettext ] ++ lib.optional (!stdenv.isDarwin) man-db; @@ -237,14 +238,13 @@ let "$out/share/fish/functions/__fish_print_help.fish" sed -e "s|clear;|${getBin ncurses}/bin/clear;|" \ -i "$out/share/fish/functions/fish_default_key_bindings.fish" - sed -e "s|python3|${getBin python3}/bin/python3|" \ - -i $out/share/fish/functions/{__fish_config_interactive.fish,fish_config.fish,fish_update_completions.fish} sed -i "s|/usr/local/sbin /sbin /usr/sbin||" \ $out/share/fish/completions/{sudo.fish,doas.fish} sed -e "s| awk | ${gawk}/bin/awk |" \ -i $out/share/fish/functions/{__fish_print_packages.fish,__fish_print_addresses.fish,__fish_describe_command.fish,__fish_complete_man.fish,__fish_complete_convert_options.fish} \ $out/share/fish/completions/{cwebp,adb,ezjail-admin,grunt,helm,heroku,lsusb,make,p4,psql,rmmod,vim-addons}.fish + '' + optionalString usePython '' cat > $out/share/fish/functions/__fish_anypython.fish <<EOF function __fish_anypython echo ${python3.interpreter} |