diff options
Diffstat (limited to 'pkgs/development/python-modules/asgiref/default.nix')
-rw-r--r-- | pkgs/development/python-modules/asgiref/default.nix | 20 |
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 223f53698e95..b30faa193649 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"; |