2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-12-28 21:47:16 +00:00
|
|
|
, aioredis
|
|
|
|
, asgiref
|
|
|
|
, buildPythonPackage
|
|
|
|
, channels
|
|
|
|
, fetchPypi
|
|
|
|
, hiredis
|
|
|
|
, msgpack
|
|
|
|
, pythonOlder
|
|
|
|
, redis
|
2019-09-23 11:23:00 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "channels-redis";
|
2020-12-28 21:47:16 +00:00
|
|
|
version = "3.2.0";
|
2019-09-23 11:23:00 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "channels_redis";
|
2020-12-28 21:47:16 +00:00
|
|
|
sha256 = "1rjs9irnq59yr6zwc9k6nnw6xrmr48dakrm25m0gcwskn1iimcrg";
|
2019-09-23 11:23:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ redis hiredis ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ channels msgpack aioredis asgiref ];
|
|
|
|
|
2020-12-28 21:47:16 +00:00
|
|
|
# Fails with : ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 6379)
|
|
|
|
# (even with a local Redis instance running)
|
|
|
|
doCheck = false;
|
2019-09-23 11:23:00 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s/msgpack~=0.6.0/msgpack/" setup.py
|
|
|
|
sed -i "s/aioredis~=1.0/aioredis/" setup.py
|
|
|
|
'';
|
|
|
|
|
2020-12-28 21:47:16 +00:00
|
|
|
pythonImportsCheck = [ "channels_redis" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/django/channels_redis/";
|
2019-09-23 11:23:00 +01:00
|
|
|
description = "Redis-backed ASGI channel layer implementation";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|