summary refs log tree commit diff
path: root/pkgs/development/python-modules/channels/default.nix
blob: 2d6f0d0091690a242b96bef5f64944bec03331ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, asgiref
, buildPythonPackage
, daphne
, django
, fetchFromGitHub
, pytest-asyncio
, pytest-django
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "channels";
  version = "4.0.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "django";
    repo = pname;
    rev = version;
    hash = "sha256-n88MxwYQ4O2kBy/W0Zvi3FtIlhZQQRCssB/lYrFNvps=";
  };

  propagatedBuildInputs = [
    asgiref
    django
  ];

  passthru.optional-dependencies = {
    daphne = [
      daphne
    ];
  };

  checkInputs = [
    pytest-asyncio
    pytest-django
    pytestCheckHook
  ] ++ passthru.optional-dependencies.daphne;

  pythonImportsCheck = [
    "channels"
  ];

  meta = with lib; {
    description = "Brings event-driven capabilities to Django with a channel system";
    homepage = "https://github.com/django/channels";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab ];
  };
}