Skip to content

Commit

Permalink
gitAndTools.stgit: install completions
Browse files Browse the repository at this point in the history
  • Loading branch information
marsam committed Jul 8, 2020
1 parent b306720 commit ce6a518
Showing 1 changed file with 6 additions and 8 deletions.
@@ -1,4 +1,4 @@
{ stdenv, python3, python3Packages, fetchFromGitHub, git }:
{ stdenv, python3Packages, fetchFromGitHub, git, installShellFiles }:

python3Packages.buildPythonApplication rec {
pname = "stgit";
Expand All @@ -11,18 +11,16 @@ python3Packages.buildPythonApplication rec {
sha256 = "1r9y8qnl6kdvq61788pnfhhgyv2xrnyrizbhy4qz4l1bpqkwfr2r";
};

nativeBuildInputs = [ git ];
nativeBuildInputs = [ installShellFiles ];

makeFlags = [ "prefix=$$out" ];
checkInputs = [ git ];

postInstall = ''
mkdir -p "$out/etc/bash_completion.d/"
ln -s ../../share/stgit/completion/stgit-completion.bash "$out/etc/bash_completion.d/"
installShellCompletion $out/share/stgit/completion/stg.fish
installShellCompletion --name stg $out/share/stgit/completion/stgit.bash
installShellCompletion --name _stg $out/share/stgit/completion/stgit.zsh
'';

doCheck = false;
checkTarget = "test";

meta = with stdenv.lib; {
description = "A patch manager implemented on top of Git";
homepage = "http://procode.org/stgit/";
Expand Down

0 comments on commit ce6a518

Please sign in to comment.