2019-04-25 15:36:12 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
2020-05-28 08:56:10 +02:00
|
|
|
, fetchFromGitHub
|
2020-06-02 22:35:03 +02:00
|
|
|
, git
|
|
|
|
, pytest
|
2019-04-25 15:36:12 +02:00
|
|
|
, pyyaml
|
2019-10-12 14:47:43 +02:00
|
|
|
, setuptools
|
2020-05-28 08:56:10 +02:00
|
|
|
, installShellFiles
|
2019-04-25 15:36:12 +02:00
|
|
|
}:
|
2019-02-11 11:24:43 +01:00
|
|
|
|
2019-04-25 15:36:12 +02:00
|
|
|
buildPythonApplication rec {
|
2021-01-12 18:29:25 +01:00
|
|
|
version = "0.11.9";
|
2019-02-11 11:24:43 +01:00
|
|
|
pname = "gita";
|
|
|
|
|
2020-05-28 08:56:10 +02:00
|
|
|
src = fetchFromGitHub {
|
2021-01-12 18:29:25 +01:00
|
|
|
sha256 = "9+zuLAx9lMfltsBqjvsivJ5wPnStPfq11XgGMv/JDpY=";
|
|
|
|
rev = version;
|
2020-05-28 08:56:10 +02:00
|
|
|
repo = "gita";
|
|
|
|
owner = "nosarthur";
|
2019-02-11 11:24:43 +01:00
|
|
|
};
|
|
|
|
|
2019-04-25 15:36:12 +02:00
|
|
|
propagatedBuildInputs = [
|
2019-02-11 11:24:43 +01:00
|
|
|
pyyaml
|
2019-10-12 14:47:43 +02:00
|
|
|
setuptools
|
2019-02-11 11:24:43 +01:00
|
|
|
];
|
|
|
|
|
2020-05-28 08:56:10 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-06-02 22:35:03 +02:00
|
|
|
postUnpack = ''
|
|
|
|
for case in "\n" ""; do
|
|
|
|
substituteInPlace source/tests/test_main.py \
|
|
|
|
--replace "'gita$case'" "'source$case'"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [
|
2020-06-02 22:35:03 +02:00
|
|
|
git
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
git init
|
|
|
|
pytest tests
|
|
|
|
'';
|
|
|
|
|
2020-05-28 08:56:10 +02:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name gita ${src}/.gita-completion.bash
|
2020-09-02 18:54:19 +02:00
|
|
|
installShellCompletion --zsh --name gita ${src}/.gita-completion.zsh
|
2020-05-28 08:56:10 +02:00
|
|
|
'';
|
|
|
|
|
2019-02-11 11:24:43 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A command-line tool to manage multiple git repos";
|
2020-03-31 06:20:27 +02:00
|
|
|
homepage = "https://github.com/nosarthur/gita";
|
2019-02-11 11:24:43 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ seqizz ];
|
|
|
|
};
|
|
|
|
}
|