1{ lib
2, aioredis
3, buildPythonPackage
4, fetchFromGitHub
5, hypothesis
6, lupa
7, poetry-core
8, pytest-asyncio
9, pytestCheckHook
10, pytest-mock
11, pythonOlder
12, redis
13, six
14, sortedcontainers
15}:
16
17buildPythonPackage rec {
18 pname = "fakeredis";
19 version = "2.12.1";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "dsoftwareinc";
26 repo = "fakeredis-py";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-WF3dITWCrTQDORfaGWPpJBQFkPrUN6faHohjvBuOW7I=";
29 };
30
31 nativeBuildInputs = [
32 poetry-core
33 ];
34
35 propagatedBuildInputs = [
36 redis
37 six
38 sortedcontainers
39 ];
40
41 nativeCheckInputs = [
42 hypothesis
43 pytest-asyncio
44 pytest-mock
45 pytestCheckHook
46 ];
47
48 passthru.optional-dependencies = {
49 lua = [
50 lupa
51 ];
52 aioredis = [
53 aioredis
54 ];
55 };
56
57 pythonImportsCheck = [
58 "fakeredis"
59 ];
60
61 meta = with lib; {
62 description = "Fake implementation of Redis API";
63 homepage = "https://github.com/dsoftwareinc/fakeredis-py";
64 changelog = "https://github.com/cunla/fakeredis-py/releases/tag/v${version}";
65 license = with licenses; [ mit ];
66 maintainers = with maintainers; [ fab ];
67 };
68}