@ -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
" $ o u t / s h a r e / f i s h / f u n c t i o n s / _ _ f i s h _ p r i n t _ h e l p . f i s h "
sed - e " s | c l e a r ; | ${ getBin ncurses } / b i n / c l e a r ; | " \
- i " $ o u t / s h a r e / f i s h / f u n c t i o n s / f i s h _ d e f a u l t _ k e y _ b i n d i n g s . f i s h "
sed - e " s | p y t h o n 3 | ${ getBin python3 } / b i n / p y t h o n 3 | " \
- i $ out/share/fish/functions / { __fish_config_interactive . fish , fish_config . fish , fish_update_completions . fish }
sed - i " s | / u s r / l o c a l / s b i n / s b i n / u s r / s b i n | | " \
$ out/share/fish/completions / { sudo . fish , doas . fish }
sed - e " s | a w k | ${ gawk } / b i n / a w k | " \
- 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
'' + o p t i o n a l S t r i n g u s e P y t h o n ''
cat > $ out/share/fish/functions/__fish_anypython.fish < < EOF
function __fish_anypython
echo $ { python3 . interpreter }