about summary refs log tree commit diff
path: root/nixpkgs/pkgs/shells/fish
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-22 15:01:47 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-22 16:57:59 +0000
commit633cab0ecb07627706c6b523e219490f019eaab5 (patch)
tree4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/shells/fish
parentffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff)
parent432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff)
downloadnixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts:
#	nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix
#	nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix
#	nixpkgs/pkgs/applications/window-managers/sway/default.nix
#	nixpkgs/pkgs/build-support/rust/default.nix
#	nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/shells/fish')
-rw-r--r--nixpkgs/pkgs/shells/fish/default.nix10
-rw-r--r--nixpkgs/pkgs/shells/fish/plugins/default.nix2
-rw-r--r--nixpkgs/pkgs/shells/fish/plugins/forgit.nix6
3 files changed, 11 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/shells/fish/default.nix b/nixpkgs/pkgs/shells/fish/default.nix
index b2677715d514..a5754290426d 100644
--- a/nixpkgs/pkgs/shells/fish/default.nix
+++ b/nixpkgs/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/nixpkgs/pkgs/shells/fish/plugins/default.nix b/nixpkgs/pkgs/shells/fish/plugins/default.nix
index 42252ccbe38c..0ce172ec489a 100644
--- a/nixpkgs/pkgs/shells/fish/plugins/default.nix
+++ b/nixpkgs/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/nixpkgs/pkgs/shells/fish/plugins/forgit.nix b/nixpkgs/pkgs/shells/fish/plugins/forgit.nix
index b905b7a25895..5fc647c73ee3 100644
--- a/nixpkgs/pkgs/shells/fish/plugins/forgit.nix
+++ b/nixpkgs/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";