2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
|
|
|
, pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
|
|
|
, setuptools
|
2020-07-18 16:06:22 +00:00
|
|
|
, installShellFiles
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "0.11.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gita";
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "9+zuLAx9lMfltsBqjvsivJ5wPnStPfq11XgGMv/JDpY=";
|
|
|
|
rev = version;
|
2020-07-18 16:06:22 +00:00
|
|
|
repo = "gita";
|
|
|
|
owner = "nosarthur";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
for case in "\n" ""; do
|
|
|
|
substituteInPlace source/tests/test_main.py \
|
|
|
|
--replace "'gita$case'" "'source$case'"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-07-18 16:06:22 +00:00
|
|
|
git
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
git init
|
|
|
|
pytest tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
|
2020-09-25 04:45:31 +00:00
|
|
|
installShellCompletion --zsh --name gita ${src}/.gita-completion.zsh
|
2020-07-18 16:06:22 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A command-line tool to manage multiple git repos";
|
|
|
|
homepage = "https://github.com/nosarthur/gita";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ seqizz ];
|
|
|
|
};
|
|
|
|
}
|