gitAndTools.gita: add bash completion

This commit is contained in:
Oleg Pykhalov
2020-06-02 22:31:09 +03:00
parent 880c9a8519
commit abf309e005
@@ -1,17 +1,20 @@
{ lib { lib
, buildPythonApplication , buildPythonApplication
, fetchPypi , fetchFromGitHub
, pyyaml , pyyaml
, setuptools , setuptools
, installShellFiles
}: }:
buildPythonApplication rec { buildPythonApplication rec {
version = "0.10.9"; version = "0.10.9";
pname = "gita"; pname = "gita";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; sha256 = "0wilyf4nnn2jyxrfqs8krya3zvhj6x36szsp9xhb6h08g1ihzp5i";
sha256 = "0fbzk9rj895s5fpbnsyy3gxwbf5spqycisx5cqwzxgm0n5qkz9dk"; rev = "v${version}";
repo = "gita";
owner = "nosarthur";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@@ -19,6 +22,12 @@ buildPythonApplication rec {
setuptools setuptools
]; ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
'';
meta = with lib; { meta = with lib; {
description = "A command-line tool to manage multiple git repos"; description = "A command-line tool to manage multiple git repos";
homepage = "https://github.com/nosarthur/gita"; homepage = "https://github.com/nosarthur/gita";