depot/third_party/nixpkgs/pkgs/development/python-modules/channels-redis/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

60 lines
1.1 KiB
Nix

{ lib
, aioredis
, asgiref
, buildPythonPackage
, channels
, cryptography
, fetchFromGitHub
, hiredis
, msgpack
, pythonOlder
, redis
}:
buildPythonPackage rec {
pname = "channels-redis";
version = "4.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "django";
repo = "channels_redis";
rev = version;
hash = "sha256-YiLNrMRroa8T4uPNwa5ussFoFYjyg31waGpBGhAETmY=";
};
buildInputs = [
hiredis
redis
];
propagatedBuildInputs = [
aioredis
asgiref
channels
msgpack
];
passthru.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 = with lib; {
description = "Redis-backed ASGI channel layer implementation";
homepage = "https://github.com/django/channels_redis/";
license = licenses.bsd3;
maintainers = with maintainers; [ mmai ];
};
}