Merge pull request #89085 from wigust/gita
Update gitAndTools.gita and add bash completion
This commit is contained in:
commit
79cd1cc2d7
@ -1,17 +1,22 @@
|
||||
{ lib
|
||||
, buildPythonApplication
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, git
|
||||
, pytest
|
||||
, pyyaml
|
||||
, setuptools
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
version = "0.10.5";
|
||||
version = "0.10.9";
|
||||
pname = "gita";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1xggslmrrfszpl190klkc97fnl88gml1bnkmkzp6aimdch66g4jg";
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "0wilyf4nnn2jyxrfqs8krya3zvhj6x36szsp9xhb6h08g1ihzp5i";
|
||||
rev = "v${version}";
|
||||
repo = "gita";
|
||||
owner = "nosarthur";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -19,6 +24,29 @@ buildPythonApplication rec {
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postUnpack = ''
|
||||
for case in "\n" ""; do
|
||||
substituteInPlace source/tests/test_main.py \
|
||||
--replace "'gita$case'" "'source$case'"
|
||||
done
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
git
|
||||
pytest
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
git init
|
||||
pytest tests
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command-line tool to manage multiple git repos";
|
||||
homepage = "https://github.com/nosarthur/gita";
|
||||
|
Loading…
x
Reference in New Issue
Block a user