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