1{ 2 lib, 3 asgiref, 4 buildPythonPackage, 5 daphne, 6 django, 7 fetchFromGitHub, 8 async-timeout, 9 pytest-asyncio, 10 pytest-django, 11 pytestCheckHook, 12 pythonOlder, 13 setuptools, 14}: 15 16buildPythonPackage rec { 17 pname = "channels"; 18 version = "4.2.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "django"; 25 repo = "channels"; 26 tag = version; 27 hash = "sha256-JkmS+QVF1MTdLID+c686Fd8L3kA+AIr7sLCaAoABh+s="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 asgiref 34 django 35 ]; 36 37 optional-dependencies = { 38 daphne = [ daphne ]; 39 }; 40 41 nativeCheckInputs = [ 42 async-timeout 43 pytest-asyncio 44 pytest-django 45 pytestCheckHook 46 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 47 48 pythonImportsCheck = [ "channels" ]; 49 50 meta = with lib; { 51 description = "Brings event-driven capabilities to Django with a channel system"; 52 homepage = "https://github.com/django/channels"; 53 changelog = "https://github.com/django/channels/blob/${version}/CHANGELOG.txt"; 54 license = licenses.bsd3; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}