nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, aioredis
3, async_generator
4, buildPythonPackage
5, fetchPypi
6, hypothesis
7, lupa
8, pytest-asyncio
9, pytest-mock
10, pytestCheckHook
11, pythonOlder
12, redis
13, six
14, sortedcontainers
15}:
16
17buildPythonPackage rec {
18 pname = "fakeredis";
19 version = "1.7.5";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-STdcYwmB3UBF2akuJwn81Edskfkn4CKEk+76Yl5wUTM=";
27 };
28
29 postPatch = ''
30 substituteInPlace setup.cfg \
31 --replace "redis<4.2.0" "redis"
32 '';
33
34 propagatedBuildInputs = [
35 aioredis
36 lupa
37 redis
38 six
39 sortedcontainers
40 ];
41
42 checkInputs = [
43 async_generator
44 hypothesis
45 pytest-asyncio
46 pytest-mock
47 pytestCheckHook
48 ];
49
50 pythonImportsCheck = [
51 "fakeredis"
52 ];
53
54 meta = with lib; {
55 description = "Fake implementation of Redis API";
56 homepage = "https://github.com/jamesls/fakeredis";
57 license = with licenses; [ mit ];
58 maintainers = with maintainers; [ fab ];
59 };
60}