2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, aioredis
|
|
|
|
, async_generator
|
|
|
|
, buildPythonPackage
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchPypi
|
2022-01-27 00:19:43 +00:00
|
|
|
, fetchpatch
|
2021-03-09 03:18:52 +00:00
|
|
|
, hypothesis
|
|
|
|
, lupa
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, redis
|
|
|
|
, six
|
|
|
|
, sortedcontainers
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fakeredis";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.7.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-yb0S5DAzbL0+GJ+uDpHrmZl7k+dtv91u1n+jUtxoTHE=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# redis 4.1.0 compatibility
|
|
|
|
# https://github.com/jamesls/fakeredis/pull/324
|
|
|
|
url = "https://github.com/jamesls/fakeredis/commit/8ef8dc6dacc9baf571d66a25ffbf0fadd7c70f78.patch";
|
|
|
|
sha256 = "sha256:03xlqmwq8nkzisrjk7y51j2jd6qdin8nbj5n9hc4wjabbvlgx4qr";
|
|
|
|
excludes = [
|
|
|
|
"setup.cfg"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aioredis
|
|
|
|
lupa
|
|
|
|
redis
|
|
|
|
six
|
|
|
|
sortedcontainers
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
async_generator
|
|
|
|
hypothesis
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"fakeredis"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "redis<4.1.0" "redis"
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Fake implementation of Redis API";
|
|
|
|
homepage = "https://github.com/jamesls/fakeredis";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|