diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/shells/fish | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/shells/fish')
| -rw-r--r-- | pkgs/shells/fish/default.nix | 10 | ||||
| -rw-r--r-- | pkgs/shells/fish/plugins/default.nix | 2 | ||||
| -rw-r--r-- | pkgs/shells/fish/plugins/forgit.nix | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index b2677715d514..a5754290426d 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; @@ -233,18 +234,17 @@ let sed -e "s|sed |${gnused}/bin/sed |" \ -i "$out/share/fish/functions/alias.fish" \ "$out/share/fish/functions/prompt_pwd.fish" - sed -i "s|nroff |${groff}/bin/nroff |" \ + sed -i "s|nroff|${groff}/bin/nroff|" \ "$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} diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix index 42252ccbe38c..0ce172ec489a 100644 --- a/pkgs/shells/fish/plugins/default.nix +++ b/pkgs/shells/fish/plugins/default.nix @@ -15,7 +15,7 @@ lib.makeScope newScope (self: with self; { foreign-env = callPackage ./foreign-env { }; - forgit-fish = callPackage ./forgit.nix { }; + forgit = callPackage ./forgit.nix { }; fzf-fish = callPackage ./fzf-fish.nix { }; diff --git a/pkgs/shells/fish/plugins/forgit.nix b/pkgs/shells/fish/plugins/forgit.nix index b905b7a25895..5fc647c73ee3 100644 --- a/pkgs/shells/fish/plugins/forgit.nix +++ b/pkgs/shells/fish/plugins/forgit.nix @@ -4,7 +4,11 @@ buildFishPlugin rec { pname = "forgit"; version = "unstable-2021-04-09"; - buildInputs = [ git fzf ]; + preFixup = '' + substituteInPlace $out/share/fish/vendor_conf.d/forgit.plugin.fish \ + --replace "fzf " "${fzf}/bin/fzf " \ + --replace "git " "${git}/bin/git " + ''; src = fetchFromGitHub { owner = "wfxr"; |
