Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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}: 14 15buildPythonPackage rec { 16 pname = "channels"; 17 version = "4.0.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "django"; 24 repo = pname; 25 rev = version; 26 hash = "sha256-n88MxwYQ4O2kBy/W0Zvi3FtIlhZQQRCssB/lYrFNvps="; 27 }; 28 29 propagatedBuildInputs = [ 30 asgiref 31 django 32 ]; 33 34 passthru.optional-dependencies = { 35 daphne = [ daphne ]; 36 }; 37 38 nativeCheckInputs = [ 39 async-timeout 40 pytest-asyncio 41 pytest-django 42 pytestCheckHook 43 ] ++ passthru.optional-dependencies.daphne; 44 45 pythonImportsCheck = [ "channels" ]; 46 47 meta = with lib; { 48 description = "Brings event-driven capabilities to Django with a channel system"; 49 homepage = "https://github.com/django/channels"; 50 license = licenses.bsd3; 51 maintainers = with maintainers; [ fab ]; 52 }; 53}