2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
python,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitLab,
|
|
|
|
isPy27,
|
|
|
|
jinja2,
|
|
|
|
pytest,
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "debts";
|
|
|
|
version = "0.5";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
# pypi does not ship tests
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "framagit.org";
|
|
|
|
owner = "almet";
|
|
|
|
repo = "debts";
|
|
|
|
rev = "d887bd8b340172d1c9bbcca6426529b8d1c2a241"; # no tags
|
|
|
|
sha256 = "1d66nka81mv9c07mki78lp5hdajqv4cq6aq2k7bh3mhkc5hwnwlg";
|
|
|
|
};
|
|
|
|
|
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ jinja2 ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
# for some reason tests only work if the module is properly installed
|
|
|
|
checkPhase = ''
|
|
|
|
rm -r debts
|
|
|
|
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
|
|
|
|
py.test tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "A simple library and cli-tool to help you solve some debts settlement scenarios";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "debts";
|
2020-07-18 16:06:22 +00:00
|
|
|
license = licenses.beerware;
|
|
|
|
maintainers = [ maintainers.symphorien ];
|
|
|
|
};
|
|
|
|
}
|