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 setuptools, 14}: 15 16buildPythonPackage rec { 17 pname = "channels"; 18 version = "4.3.1"; 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-dRKK6AQNlPdBQumbLmPyOTW96N/PJ9yUY6GYe5x/c+A="; 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 ] 47 ++ lib.flatten (builtins.attrValues optional-dependencies); 48 49 # won't run in sandbox 50 disabledTestPaths = [ 51 "tests/sample_project/tests/test_selenium.py" 52 ]; 53 54 pythonImportsCheck = [ "channels" ]; 55 56 meta = with lib; { 57 description = "Brings event-driven capabilities to Django with a channel system"; 58 homepage = "https://github.com/django/channels"; 59 changelog = "https://github.com/django/channels/blob/${version}/CHANGELOG.txt"; 60 license = licenses.bsd3; 61 maintainers = with maintainers; [ fab ]; 62 }; 63}