1{
2 lib,
3 asgiref,
4 buildPythonPackage,
5 channels,
6 cryptography,
7 fetchFromGitHub,
8 msgpack,
9 pythonOlder,
10 redis,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "channels-redis";
16 version = "4.2.1";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "django";
23 repo = "channels_redis";
24 tag = version;
25 hash = "sha256-jQkpuOQNU2KCWavXSE/n8gdpQhhAafQbZYfbX71Rcds=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 redis
32 asgiref
33 channels
34 msgpack
35 ];
36
37 optional-dependencies = {
38 cryptography = [ cryptography ];
39 };
40
41 # Fails with : ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 6379)
42 # (even with a local Redis instance running)
43 doCheck = false;
44
45 pythonImportsCheck = [ "channels_redis" ];
46
47 meta = with lib; {
48 description = "Redis-backed ASGI channel layer implementation";
49 homepage = "https://github.com/django/channels_redis/";
50 changelog = "https://github.com/django/channels_redis/blob/${version}/CHANGELOG.txt";
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ mmai ];
53 };
54}