2022-12-02 08:20:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, pdm-pep517
|
|
|
|
, appdirs
|
|
|
|
, loguru
|
|
|
|
, requests
|
|
|
|
, setuptools
|
|
|
|
, toml
|
|
|
|
, websocket-client
|
|
|
|
, asciimatics
|
|
|
|
, pyperclip
|
|
|
|
, aria2
|
|
|
|
, fastapi
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, responses
|
|
|
|
, uvicorn
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aria2p";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "0.11.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pawamoy";
|
|
|
|
repo = pname;
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-z74ej6J6Yh1aVsXR5fE+XhoCzCS+zfDxQL8gKFd7tBA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pdm-pep517
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
loguru
|
|
|
|
requests
|
|
|
|
setuptools # for pkg_resources
|
|
|
|
toml
|
|
|
|
websocket-client
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
tui = [ asciimatics pyperclip ];
|
|
|
|
};
|
|
|
|
|
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-02 08:20:57 +00:00
|
|
|
aria2
|
|
|
|
fastapi
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
uvicorn
|
|
|
|
] ++ passthru.optional-dependencies.tui;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
disabledTests = [
|
|
|
|
# require a running display server
|
|
|
|
"test_add_downloads_torrents_and_metalinks"
|
|
|
|
"test_add_downloads_uris"
|
|
|
|
# require a running aria2 server
|
|
|
|
"test_get_files_method"
|
|
|
|
"test_pause_subcommand"
|
|
|
|
"test_resume_method"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
pythonImportsCheck = [ "aria2p" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pawamoy/aria2p";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/pawamoy/aria2p/blob/${src.rev}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
}
|