nixpkgs/pkgs/development/python-modules/aria2p/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

89 lines
1.7 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
2024-03-17 20:49:44 +00:00
, pdm-backend
, appdirs
, loguru
, requests
, setuptools
, toml
, websocket-client
, asciimatics
, pyperclip
, aria2
, fastapi
2024-03-17 20:49:44 +00:00
, psutil
, pytest-xdist
, pytestCheckHook
, responses
, uvicorn
2020-01-18 13:25:36 +00:00
}:
buildPythonPackage rec {
pname = "aria2p";
version = "0.12.0";
2020-01-18 13:25:36 +00:00
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "pawamoy";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-WlbZP2+qUSyfmeFFiuarXI3VaNZvD9cnOef/WM+J0OE=";
2020-01-18 13:25:36 +00:00
};
2020-08-25 03:07:09 +01:00
nativeBuildInputs = [
2024-03-17 20:49:44 +00:00
pdm-backend
];
2020-01-18 13:25:36 +00:00
propagatedBuildInputs = [
appdirs
loguru
requests
setuptools # for pkg_resources
toml
websocket-client
];
passthru.optional-dependencies = {
tui = [ asciimatics pyperclip ];
};
preCheck = ''
2020-01-18 13:25:36 +00:00
export HOME=$TMPDIR
'';
nativeCheckInputs = [
aria2
fastapi
pytest-xdist
pytestCheckHook
responses
2024-03-17 20:49:44 +00:00
psutil
uvicorn
] ++ passthru.optional-dependencies.tui;
2020-01-18 13:25:36 +00:00
disabledTests = [
# require a running display server
"test_add_downloads_torrents_and_metalinks"
"test_add_downloads_uris"
# require a running aria2 server
2024-03-17 20:49:44 +00:00
"test_cli_autoclear_commands"
"test_get_files_method"
"test_pause_subcommand"
"test_resume_method"
];
2020-01-18 13:25:36 +00:00
pythonImportsCheck = [ "aria2p" ];
2020-01-18 13:25:36 +00:00
meta = with lib; {
2020-01-18 13:25:36 +00:00
homepage = "https://github.com/pawamoy/aria2p";
changelog = "https://github.com/pawamoy/aria2p/blob/${src.rev}/CHANGELOG.md";
2020-01-18 13:25:36 +00:00
description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
mainProgram = "aria2p";
2020-01-18 13:25:36 +00:00
license = licenses.isc;
maintainers = with maintainers; [ koral ];
};
}