Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dbbbdfd3c2e4
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 40a03a8c6d74
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jan 24, 2020

  1. aria2p: init at 0.7.0

    k0ral authored and Jon committed Jan 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    40a03a8 View commit details
Showing with 45 additions and 0 deletions.
  1. +43 −0 pkgs/development/python-modules/aria2p/default.nix
  2. +2 −0 pkgs/top-level/python-packages.nix
43 changes: 43 additions & 0 deletions pkgs/development/python-modules/aria2p/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -187,6 +187,8 @@ in {

argon2_cffi = callPackage ../development/python-modules/argon2_cffi { };

aria2p = callPackage ../development/python-modules/aria2p { inherit (pkgs) aria2 poetry; };

arviz = callPackage ../development/python-modules/arviz { };

asana = callPackage ../development/python-modules/asana { };