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