summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rdbtools/default.nix
blob: 1dccccdc6aacdeda97f35cea2ba1b4e9b46f358f (plain)
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
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  setuptools,
  distutils,
  redis,
  unittestCheckHook,
}:

buildPythonPackage rec {
  pname = "rdbtools";
  version = "0.1.15";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "sripathikrishnan";
    repo = "redis-rdb-tools";
    tag = "rdbtools-${version}";
    hash = "sha256-6Ht8NuyvzbS7+MeJoVC/AtlXgKwtWwUQ+n5v+mtv/2g=";
  };

  patches = [
    # https://github.com/sripathikrishnan/redis-rdb-tools/pull/205
    ./0001-parser_tests-replace-self.assert_-with-specific-asse.patch
    ./0002-tests-self.assertEquals-self.assertEqual.patch

    # These seem to be broken
    ./0001-callback_tests-skip-test_all_dumps.patch
  ];

  build-system = [
    setuptools
  ];

  dependencies = [
    distutils
    redis
  ];

  nativeCheckInputs = [
    unittestCheckHook
  ];

  pythonImportsCheck = [ "rdbtools" ];

  meta = {
    description = "Parse Redis dump.rdb files, Analyze Memory, and Export Data to JSON";
    homepage = "https://github.com/sripathikrishnan/redis-rdb-tools";
    changelog = "https://github.com/sripathikrishnan/redis-rdb-tools/blob/rdbtools-${version}/CHANGES";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ offline ];
  };
}