summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/channels-redis/default.nix
blob: 4de42e0353eb26181e5fd4d97f86ce52883419e3 (plain)
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
{
  lib,
  asgiref,
  buildPythonPackage,
  channels,
  cryptography,
  fetchFromGitHub,
  msgpack,
  setuptools,
  redis,
}:

buildPythonPackage rec {
  pname = "channels-redis";
  version = "4.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "django";
    repo = "channels_redis";
    tag = version;
    hash = "sha256-zn313s1rzypSR5D3iE/05PeBQkx/Se/yaA3NS9BY//Y=";
  };

  build-system = [ setuptools ];

  dependencies = [
    redis
    asgiref
    channels
    msgpack
  ];

  optional-dependencies = {
    cryptography = [ cryptography ];
  };

  # Fails with : ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 6379)
  # (even with a local Redis instance running)
  doCheck = false;

  pythonImportsCheck = [ "channels_redis" ];

  meta = {
    description = "Redis-backed ASGI channel layer implementation";
    homepage = "https://github.com/django/channels_redis/";
    changelog = "https://github.com/django/channels_redis/blob/${src.tag}/CHANGELOG.txt";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ mmai ];
  };
}