1{
2 lib,
3 python,
4 buildPythonPackage,
5 fetchFromGitLab,
6 isPy27,
7 jinja2,
8 pytest,
9}:
10
11buildPythonPackage rec {
12 pname = "debts";
13 version = "0.5";
14 format = "setuptools";
15
16 # pypi does not ship tests
17 src = fetchFromGitLab {
18 domain = "framagit.org";
19 owner = "almet";
20 repo = "debts";
21 rev = "d887bd8b340172d1c9bbcca6426529b8d1c2a241"; # no tags
22 sha256 = "1d66nka81mv9c07mki78lp5hdajqv4cq6aq2k7bh3mhkc5hwnwlg";
23 };
24
25 disabled = isPy27;
26
27 propagatedBuildInputs = [ jinja2 ];
28
29 nativeCheckInputs = [ pytest ];
30
31 # for some reason tests only work if the module is properly installed
32 checkPhase = ''
33 rm -r debts
34 export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
35 py.test tests
36 '';
37
38 meta = with lib; {
39 inherit (src.meta) homepage;
40 description = "Simple library and cli-tool to help you solve some debts settlement scenarios";
41 mainProgram = "debts";
42 license = licenses.beerware;
43 maintainers = [ maintainers.symphorien ];
44 };
45}