Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / aria2p / default.nix
blob01f81b316952b8f86ec65acb792a4fa966ed2e2f
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , pdm-backend
6 , appdirs
7 , loguru
8 , requests
9 , setuptools
10 , toml
11 , websocket-client
12 , asciimatics
13 , pyperclip
14 , aria2
15 , fastapi
16 , psutil
17 , pytest-xdist
18 , pytestCheckHook
19 , responses
20 , uvicorn
23 buildPythonPackage rec {
24   pname = "aria2p";
25   version = "0.12.0";
26   format = "pyproject";
27   disabled = pythonOlder "3.6";
29   src = fetchFromGitHub {
30     owner = "pawamoy";
31     repo = pname;
32     rev = "refs/tags/${version}";
33     hash = "sha256-WlbZP2+qUSyfmeFFiuarXI3VaNZvD9cnOef/WM+J0OE=";
34   };
36   nativeBuildInputs = [
37     pdm-backend
38   ];
40   propagatedBuildInputs = [
41     appdirs
42     loguru
43     requests
44     setuptools # for pkg_resources
45     toml
46     websocket-client
47   ];
49   passthru.optional-dependencies = {
50     tui = [ asciimatics pyperclip ];
51   };
53   preCheck = ''
54     export HOME=$TMPDIR
55   '';
57   nativeCheckInputs = [
58     aria2
59     fastapi
60     pytest-xdist
61     pytestCheckHook
62     responses
63     psutil
64     uvicorn
65   ] ++ passthru.optional-dependencies.tui;
67   disabledTests = [
68     # require a running display server
69     "test_add_downloads_torrents_and_metalinks"
70     "test_add_downloads_uris"
71     # require a running aria2 server
72     "test_cli_autoclear_commands"
73     "test_get_files_method"
74     "test_pause_subcommand"
75     "test_resume_method"
76   ];
78   pythonImportsCheck = [ "aria2p" ];
80   meta = with lib; {
81     homepage = "https://github.com/pawamoy/aria2p";
82     changelog = "https://github.com/pawamoy/aria2p/blob/${src.rev}/CHANGELOG.md";
83     description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
84     mainProgram = "aria2p";
85     license = licenses.isc;
86     maintainers = with maintainers; [ koral ];
87   };