about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aria2p/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-26 23:38:55 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-26 23:38:55 +0000
commit02e12559a420f8c544b2facc4931904900a05518 (patch)
treeba39d8fa9e874b935d204e74accfed5caaccf0fa /nixpkgs/pkgs/development/python-modules/aria2p/default.nix
parent542f80867c380b0ac79250b6e5358dda8bc49e0d (diff)
parent3d085a399c436a41d875801619e8f976b8519196 (diff)
downloadnixlib-02e12559a420f8c544b2facc4931904900a05518.tar
nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.gz
nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.bz2
nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.lz
nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.xz
nixlib-02e12559a420f8c544b2facc4931904900a05518.tar.zst
nixlib-02e12559a420f8c544b2facc4931904900a05518.zip
Merge commit '3d085a399c436a41d875801619e8f976b8519196'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aria2p/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/aria2p/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aria2p/default.nix b/nixpkgs/pkgs/development/python-modules/aria2p/default.nix
new file mode 100644
index 000000000000..51b523c010aa
--- /dev/null
+++ b/nixpkgs/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 ];
+  };
+}