nixpkgs/pkgs/development/python-modules/redis/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.2 KiB
Nix
Raw Normal View History

2021-12-29 01:43:40 +00:00
{ lib
, fetchPypi
, buildPythonPackage
, pythonOlder
# propagates
, async-timeout
2021-12-29 01:43:40 +00:00
, deprecated
, importlib-metadata
, packaging
, typing-extensions
# extras: hiredis
, hiredis
# extras: ocsp
, cryptography
, pyopenssl
2021-12-29 01:43:40 +00:00
, requests
}:
2019-08-01 18:55:36 +00:00
2017-09-28 12:00:01 +00:00
buildPythonPackage rec {
pname = "redis";
2022-03-31 12:52:22 +00:00
version = "4.2.1";
2021-12-29 01:43:40 +00:00
format = "setuptools";
disabled = pythonOlder "3.6";
2017-09-28 12:00:01 +00:00
src = fetchPypi {
inherit pname version;
2022-03-31 12:52:22 +00:00
sha256 = "sha256-/kVROIEinb7mEGILnggXsfSMR7pjWHAyD9RKcSIEu90=";
2017-09-28 12:00:01 +00:00
};
2021-12-29 01:43:40 +00:00
propagatedBuildInputs = [
async-timeout
2021-12-29 01:43:40 +00:00
deprecated
packaging
typing-extensions
2021-12-29 01:43:40 +00:00
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
passthru.extras-require = {
hidredis = [
hiredis
];
ocsp = [
cryptography
pyopenssl
requests
];
};
2021-12-29 01:43:40 +00:00
pythonImportsCheck = [
"redis"
"redis.client"
"redis.cluster"
"redis.connection"
"redis.exceptions"
"redis.sentinel"
"redis.utils"
];
2017-09-28 12:00:01 +00:00
# tests require a running redis
doCheck = false;
2019-08-01 18:55:36 +00:00
meta = with lib; {
2017-09-28 12:00:01 +00:00
description = "Python client for Redis key-value store";
homepage = "https://pypi.python.org/pypi/redis/";
2019-08-01 18:55:36 +00:00
license = with licenses; [ mit ];
2017-09-28 12:00:01 +00:00
};
}