Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / aria2p / default.nix
blob2bb950beb282ea729cf914b7c6c15cd1ea376907
1 { lib, buildPythonPackage, fetchFromGitHub, pythonOlder
2 , aria2, poetry, pytest, pytestcov, pytest_xdist, responses
3 , asciimatics, loguru, requests, setuptools, websocket_client
4 }:
6 buildPythonPackage rec {
7   pname = "aria2p";
8   version = "0.9.1";
9   format = "pyproject";
10   disabled = pythonOlder "3.6";
12   src = fetchFromGitHub {
13     owner = "pawamoy";
14     repo = pname;
15     rev = "v${version}";
16     sha256 = "1s4kad6jnfz9p64gkqclkfq2x2bn8dbc0hyr86d1545bgn7pz672";
17   };
19   nativeBuildInputs = [ poetry ];
21   preBuild = ''
22     export HOME=$TMPDIR
23   '';
25   checkInputs = [ aria2 responses pytest pytestcov pytest_xdist ];
27   # Tests are not all stable/deterministic,
28   # they rely on actually running an aria2c daemon and communicating with it,
29   # race conditions and deadlocks were observed,
30   # thus the corresponding tests are disabled
31   checkPhase = ''
32     pytest -nauto -k "not test_api and not test_cli and not test_interface"
33   '';
35   propagatedBuildInputs = [ asciimatics loguru requests setuptools websocket_client ];
37   meta = with lib; {
38     homepage = "https://github.com/pawamoy/aria2p";
39     description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
40     license = licenses.isc;
41     maintainers = with maintainers; [ koral ];
42   };