2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-01-05 17:05:55 +00:00
|
|
|
, aioredis
|
|
|
|
, asgiref
|
|
|
|
, buildPythonPackage
|
|
|
|
, channels
|
|
|
|
, fetchPypi
|
|
|
|
, hiredis
|
|
|
|
, msgpack
|
|
|
|
, pythonOlder
|
|
|
|
, redis
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "channels-redis";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "3.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "channels_redis";
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-eOSi8rKnRP5ah4SOw2te5J9SLGgIzv5sWDZj0NUx+qg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ redis hiredis ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ channels msgpack aioredis asgiref ];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
# Fails with : ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 6379)
|
|
|
|
# (even with a local Redis instance running)
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s/msgpack~=0.6.0/msgpack/" setup.py
|
|
|
|
sed -i "s/aioredis~=1.0/aioredis/" setup.py
|
|
|
|
'';
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
pythonImportsCheck = [ "channels_redis" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/django/channels_redis/";
|
|
|
|
description = "Redis-backed ASGI channel layer implementation";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|