Files
nixpkgs/pkgs/development/python-modules/aria2p/default.nix
T
aftix 9208cef238 python3Packages.aria2p: Change python3Packages.appdirs to python3Packages.platformdirs in dependencies
nixpkgs commit 5f91e2ea80 updated aria2p
from 0.12.0 to 0.12.1, breaking the build. The changelog for 0.12.1
(https://github.com/pawamoy/aria2p/blob/0.12.1/CHANGELOG.md) shows upstream
changed from the appdirs package to platformdirs, but this change
wasn't made in the above nixpkgs commit.
2025-02-14 18:46:53 -06:00

91 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
pdm-backend,
loguru,
platformdirs,
requests,
setuptools,
toml,
websocket-client,
asciimatics,
pyperclip,
aria2,
fastapi,
psutil,
pytest-xdist,
pytestCheckHook,
responses,
uvicorn,
}:
buildPythonPackage rec {
pname = "aria2p";
version = "0.12.1";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "pawamoy";
repo = pname;
tag = version;
hash = "sha256-JEXTCDfFjxI1hooiEQq0KIGGoS2F7fyzOM0GMl+Jr7w=";
};
build-system = [ pdm-backend ];
dependencies = [
loguru
platformdirs
requests
setuptools # for pkg_resources
toml
websocket-client
];
optional-dependencies = {
tui = [
asciimatics
pyperclip
];
};
preCheck = ''
export HOME=$TMPDIR
'';
nativeCheckInputs = [
aria2
fastapi
pytest-xdist
pytestCheckHook
responses
psutil
uvicorn
] ++ optional-dependencies.tui;
disabledTests = [
# require a running display server
"test_add_downloads_torrents_and_metalinks"
"test_add_downloads_uris"
# require a running aria2 server
"test_cli_autoclear_commands"
"test_get_files_method"
"test_pause_subcommand"
"test_resume_method"
];
pythonImportsCheck = [ "aria2p" ];
meta = with lib; {
homepage = "https://github.com/pawamoy/aria2p";
changelog = "https://github.com/pawamoy/aria2p/blob/${src.tag}/CHANGELOG.md";
description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
mainProgram = "aria2p";
license = licenses.isc;
maintainers = with maintainers; [ koral ];
};
}