summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorkoral <chahine.moreau@gmail.com>2020-01-18 14:25:36 +0100
committerJon <jonringer@users.noreply.github.com>2020-01-24 13:15:45 -0800
commit40a03a8c6d743ef5a13337f9869019411e15296d (patch)
tree695bbc1329fe07772c77dabd7331f87d9cdfac41 /pkgs/development
parentdbbbdfd3c2e4fa633efc13be48efe28829d7e5d1 (diff)
downloadnixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.tar
nixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.tar.gz
nixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.tar.bz2
nixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.tar.lz
nixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.tar.xz
nixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.tar.zst
nixpkgs-40a03a8c6d743ef5a13337f9869019411e15296d.zip
aria2p: init at 0.7.0
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/aria2p/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aria2p/default.nix b/pkgs/development/python-modules/aria2p/default.nix
new file mode 100644
index 00000000000..51b523c010a
--- /dev/null
+++ b/pkgs/development/python-modules/aria2p/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
+, aria2, poetry, pytest, pytestcov, pytest_xdist, responses
+, asciimatics, loguru, requests, setuptools, websocket_client
+}:
+
+buildPythonPackage rec {
+  pname = "aria2p";
+  version = "0.7.0";
+  format = "pyproject";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "pawamoy";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1inak3y2win58zbzykfzy6xp00f276sqsz69h2nfsd93mpr74wf6";
+  };
+  
+  nativeBuildInputs = [ poetry ];
+
+  preBuild = ''
+    export HOME=$TMPDIR
+  '';
+
+  checkInputs = [ aria2 responses pytest pytestcov pytest_xdist ];
+
+  # 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"
+  '';
+
+  propagatedBuildInputs = [ asciimatics loguru requests setuptools websocket_client ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/pawamoy/aria2p";
+    description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
+    license = licenses.isc;
+    maintainers = with maintainers; [ koral ];
+  };
+}