about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/coredis/default.nix
blob: 1e3375b28bd1e07a25749ee890af7a7347ebf6c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ lib
, fetchFromGitHub
, buildPythonPackage
, async-timeout
, deprecated
, pympler
, wrapt
, pytestCheckHook
, redis
, pytest-asyncio
}:

buildPythonPackage rec {
  pname = "coredis";
  version = "4.14.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "alisaifee";
    repo = pname;
    rev = version;
    hash = "sha256-pHCQ5dePk2VhYNf/Ka+sovIn2OAVYHnLQhPFVjKmgb4=";
  };

  postPatch = ''
    substituteInPlace pytest.ini --replace "-K" ""
  '';

  propagatedBuildInputs = [
    async-timeout
    deprecated
    pympler
    wrapt
  ];

  pythonImportsCheck = [ "coredis" ];

  nativeCheckInputs = [
    pytestCheckHook
    redis
    pytest-asyncio
  ];

  # all other tests require docker
  pytestFlagsArray = [
    "tests/test_lru_cache.py"
    "tests/test_parsers.py"
    "tests/test_retry.py"
    "tests/test_utils.py"
  ];

  meta = with lib; {
    changelog = "https://github.com/alisaifee/coredis/blob/${src.rev}/HISTORY.rst";
    homepage = "https://github.com/alisaifee/coredis";
    description = "An async redis client with support for redis server, cluster & sentinel";
    license = licenses.mit;
    maintainers = with maintainers; [ netali ];
  };
}