567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
46 lines
1000 B
Nix
46 lines
1000 B
Nix
{
|
|
lib,
|
|
python,
|
|
buildPythonPackage,
|
|
fetchFromGitLab,
|
|
isPy27,
|
|
jinja2,
|
|
pytest,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "debts";
|
|
version = "0.5";
|
|
format = "setuptools";
|
|
|
|
# pypi does not ship tests
|
|
src = fetchFromGitLab {
|
|
domain = "framagit.org";
|
|
owner = "almet";
|
|
repo = "debts";
|
|
rev = "d887bd8b340172d1c9bbcca6426529b8d1c2a241"; # no tags
|
|
sha256 = "1d66nka81mv9c07mki78lp5hdajqv4cq6aq2k7bh3mhkc5hwnwlg";
|
|
};
|
|
|
|
disabled = isPy27;
|
|
|
|
propagatedBuildInputs = [ jinja2 ];
|
|
|
|
nativeCheckInputs = [ pytest ];
|
|
|
|
# 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 = {
|
|
inherit (src.meta) homepage;
|
|
description = "Simple library and cli-tool to help you solve some debts settlement scenarios";
|
|
mainProgram = "debts";
|
|
license = lib.licenses.beerware;
|
|
maintainers = [ lib.maintainers.symphorien ];
|
|
};
|
|
}
|