summary refs log tree commit diff
path: root/pkgs/development/python-modules/asgiref
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-02-20 02:28:40 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-02-22 01:46:11 +0100
commitb49db62f9d2863f67d5d6e8bbe4b68db48eff5a8 (patch)
tree7851476bc15c5e1eea3037b17d4eddc6582ef9da /pkgs/development/python-modules/asgiref
parent2bdee9b0c3877ff8d95239ff80c6bcb1ad8fa213 (diff)
downloadnixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.tar
nixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.tar.gz
nixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.tar.bz2
nixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.tar.lz
nixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.tar.xz
nixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.tar.zst
nixpkgs-b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8.zip
pythonPackages.asgiref: correct dependencies and enable tests
Diffstat (limited to 'pkgs/development/python-modules/asgiref')
-rw-r--r--pkgs/development/python-modules/asgiref/default.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/asgiref/default.nix b/pkgs/development/python-modules/asgiref/default.nix
index 223f53698e9..b30faa19364 100644
--- a/pkgs/development/python-modules/asgiref/default.nix
+++ b/pkgs/development/python-modules/asgiref/default.nix
@@ -1,15 +1,23 @@
-{ stdenv, buildPythonPackage, fetchurl, six }:
+{ stdenv, buildPythonPackage, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }:
 buildPythonPackage rec {
   version = "2.1.5";
   pname = "asgiref";
-  name = "${pname}-${version}";
 
-  src = fetchurl {
-    url = "mirror://pypi/a/asgiref/${name}.tar.gz";
-    sha256 = "1a46196df28c67e046a54cc537ce5a8f6a59eb68649f54680d7e4fc3b113ab1b";
+  # PyPI tarball doesn't include tests directory
+  src = fetchFromGitHub {
+    owner = "django";
+    repo = pname;
+    rev = version;
+    sha256 = "1khhgg9cwjh4lax5c9aacp42a8sj0icdbrbzwp53if7f1irva58l";
   };
 
-  propagatedBuildInputs = [ six ];
+  propagatedBuildInputs = [ async-timeout ];
+
+  checkInputs = [ pytest pytest-asyncio ];
+
+  checkPhase = ''
+    py.test
+  '';
 
   meta = with stdenv.lib; {
     description = "Reference ASGI adapters and channel layers";