about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aria2p
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/python-modules/aria2p
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aria2p')
-rw-r--r--nixpkgs/pkgs/development/python-modules/aria2p/default.nix75
1 files changed, 58 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aria2p/default.nix b/nixpkgs/pkgs/development/python-modules/aria2p/default.nix
index 2a7e6cb0df95..e505ac015bca 100644
--- a/nixpkgs/pkgs/development/python-modules/aria2p/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/aria2p/default.nix
@@ -1,41 +1,82 @@
-{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
-, aria2, poetry, pytest, pytest-cov, pytest-xdist, responses
-, asciimatics, loguru, requests, setuptools, websocket-client
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, pdm-pep517
+, appdirs
+, loguru
+, requests
+, setuptools
+, toml
+, websocket-client
+, asciimatics
+, pyperclip
+, aria2
+, fastapi
+, pytest-xdist
+, pytestCheckHook
+, responses
+, uvicorn
 }:
 
 buildPythonPackage rec {
   pname = "aria2p";
-  version = "0.9.1";
+  version = "0.11.2";
   format = "pyproject";
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "pawamoy";
     repo = pname;
-    rev = "v${version}";
-    sha256 = "1s4kad6jnfz9p64gkqclkfq2x2bn8dbc0hyr86d1545bgn7pz672";
+    rev = version;
+    hash = "sha256-z74ej6J6Yh1aVsXR5fE+XhoCzCS+zfDxQL8gKFd7tBA=";
   };
 
-  nativeBuildInputs = [ poetry ];
+  nativeBuildInputs = [
+    pdm-pep517
+  ];
 
-  preBuild = ''
+  propagatedBuildInputs = [
+    appdirs
+    loguru
+    requests
+    setuptools # for pkg_resources
+    toml
+    websocket-client
+  ];
+
+  passthru.optional-dependencies = {
+    tui = [ asciimatics pyperclip ];
+  };
+
+  preCheck = ''
     export HOME=$TMPDIR
   '';
 
-  checkInputs = [ aria2 responses pytest pytest-cov pytest-xdist ];
+  nativeCheckInputs = [
+    aria2
+    fastapi
+    pytest-xdist
+    pytestCheckHook
+    responses
+    uvicorn
+  ] ++ passthru.optional-dependencies.tui;
 
-  # Tests are not all stable/deterministic,
-  # they rely on actually running an aria2c daemon and communicating with it,
-  # race conditions and deadlocks were observed,
-  # thus the corresponding tests are disabled
-  checkPhase = ''
-    pytest -nauto -k "not test_api and not test_cli and not test_interface"
-  '';
+  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"
+  ];
 
-  propagatedBuildInputs = [ asciimatics loguru requests setuptools websocket-client ];
+  pythonImportsCheck = [ "aria2p" ];
 
   meta = with lib; {
     homepage = "https://github.com/pawamoy/aria2p";
+    changelog = "https://github.com/pawamoy/aria2p/blob/${src.rev}/CHANGELOG.md";
     description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
     license = licenses.isc;
     maintainers = with maintainers; [ koral ];