at 23.11-beta 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, pdm-pep517 6, appdirs 7, loguru 8, requests 9, setuptools 10, toml 11, websocket-client 12, asciimatics 13, pyperclip 14, aria2 15, fastapi 16, pytest-xdist 17, pytestCheckHook 18, responses 19, uvicorn 20}: 21 22buildPythonPackage rec { 23 pname = "aria2p"; 24 version = "0.11.2"; 25 format = "pyproject"; 26 disabled = pythonOlder "3.6"; 27 28 src = fetchFromGitHub { 29 owner = "pawamoy"; 30 repo = pname; 31 rev = version; 32 hash = "sha256-z74ej6J6Yh1aVsXR5fE+XhoCzCS+zfDxQL8gKFd7tBA="; 33 }; 34 35 nativeBuildInputs = [ 36 pdm-pep517 37 ]; 38 39 propagatedBuildInputs = [ 40 appdirs 41 loguru 42 requests 43 setuptools # for pkg_resources 44 toml 45 websocket-client 46 ]; 47 48 passthru.optional-dependencies = { 49 tui = [ asciimatics pyperclip ]; 50 }; 51 52 preCheck = '' 53 export HOME=$TMPDIR 54 ''; 55 56 nativeCheckInputs = [ 57 aria2 58 fastapi 59 pytest-xdist 60 pytestCheckHook 61 responses 62 uvicorn 63 ] ++ passthru.optional-dependencies.tui; 64 65 disabledTests = [ 66 # require a running display server 67 "test_add_downloads_torrents_and_metalinks" 68 "test_add_downloads_uris" 69 # require a running aria2 server 70 "test_get_files_method" 71 "test_pause_subcommand" 72 "test_resume_method" 73 ]; 74 75 pythonImportsCheck = [ "aria2p" ]; 76 77 meta = with lib; { 78 homepage = "https://github.com/pawamoy/aria2p"; 79 changelog = "https://github.com/pawamoy/aria2p/blob/${src.rev}/CHANGELOG.md"; 80 description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC"; 81 license = licenses.isc; 82 maintainers = with maintainers; [ koral ]; 83 }; 84}