1{ stdenv, buildPythonPackage, pythonOlder, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }: 2buildPythonPackage rec { 3 version = "2.3.2"; 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 = "1ljymmcscyp3bz33kjbhf99k04fbama87vg4069gbgj6lnxjpzav"; 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}