1{ stdenv, buildPythonPackage, pythonOlder, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }:
2buildPythonPackage rec {
3 version = "3.2.10";
4 pname = "asgiref";
5
6 disabled = pythonOlder "3.5";
7
8 # PyPI tarball doesn't include tests directory
9 src = fetchFromGitHub {
10 owner = "django";
11 repo = pname;
12 rev = version;
13 sha256 = "1sj4yy2injaskwfi5pkb542jl8s6ljijnyra81gpw0pgd3d0bgxv";
14 };
15
16 propagatedBuildInputs = [ async-timeout ];
17
18 checkInputs = [ pytest pytest-asyncio ];
19
20 checkPhase = ''
21 py.test
22 '';
23
24 meta = with stdenv.lib; {
25 description = "Reference ASGI adapters and channel layers";
26 license = licenses.bsd3;
27 homepage = "https://github.com/django/asgiref";
28 };
29}