From f57da8ef0a9c4e4f4f003a92058b07f70b90fe72 Mon Sep 17 00:00:00 2001 From: vasile luta Date: Tue, 14 Apr 2020 09:51:32 +0300 Subject: [PATCH] tig: fix tig-completion's dependency on __git_complete tig recently updated it's bash-completion making it depend on __git-complete from git. Becase __git-complete is not automatically sourced tig bash completion fails. Also this PR makes tig completion load on-demand. --- .../version-management/git-and-tools/tig/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/tig/default.nix b/pkgs/applications/version-management/git-and-tools/tig/default.nix index 20d88b399c5a..cb03a9b42a25 100644 --- a/pkgs/applications/version-management/git-and-tools/tig/default.nix +++ b/pkgs/applications/version-management/git-and-tools/tig/default.nix @@ -31,10 +31,13 @@ stdenv.mkDerivation rec { make install make install-doc - substituteInPlace contrib/tig-completion.zsh \ - --replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/etc/bash_completion.d/tig-completion.bash" + # fixes tig-completion __git-complete dependency + sed -i '1s;^;source ${git}/share/bash-completion/completions/git\n;' contrib/tig-completion.bash - install -D contrib/tig-completion.bash $out/etc/bash_completion.d/tig-completion.bash + substituteInPlace contrib/tig-completion.zsh \ + --replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/share/bash-completion/completions/tig" + + install -D contrib/tig-completion.bash $out/share/bash-completion/completions/tig install -D contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig cp contrib/vim.tigrc $out/etc/