1{ lib
2, asgiref
3, buildPythonPackage
4, daphne
5, django
6, fetchFromGitHub
7, async-timeout
8, pytest-asyncio
9, pytest-django
10, pytestCheckHook
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "channels";
16 version = "4.0.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "django";
23 repo = pname;
24 rev = version;
25 hash = "sha256-n88MxwYQ4O2kBy/W0Zvi3FtIlhZQQRCssB/lYrFNvps=";
26 };
27
28 propagatedBuildInputs = [
29 asgiref
30 django
31 ];
32
33 passthru.optional-dependencies = {
34 daphne = [
35 daphne
36 ];
37 };
38
39 nativeCheckInputs = [
40 async-timeout
41 pytest-asyncio
42 pytest-django
43 pytestCheckHook
44 ] ++ passthru.optional-dependencies.daphne;
45
46 pythonImportsCheck = [
47 "channels"
48 ];
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 license = licenses.bsd3;
54 maintainers = with maintainers; [ fab ];
55 };
56}