summary refs log tree commit diff
path: root/pkgs/development/python-modules/diskcache/default.nix
blob: ed6007f87ed2cc916238aca2e715dffb6046fc47 (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
{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pytestcov
, pytest_xdist
, pytest-django
, mock
}:

buildPythonPackage rec {
  pname = "diskcache";
  version = "5.2.1";

  src = fetchFromGitHub {
    owner = "grantjenks";
    repo = "python-diskcache";
    rev = "v${version}";
    sha256 = "sha256-dWtEyyWpg0rxEwyhBdPyApzgS9o60HVGbtY76ELHvX8=";
  };

  checkInputs = [
    pytestCheckHook
    pytestcov
    pytest_xdist
    pytest-django
    mock
  ];

  # Darwin sandbox causes most tests to fail.
  doCheck = !stdenv.isDarwin;
  pythonImportsCheck = [ "diskcache" ];

  meta = with lib; {
    description = "Disk and file backed persistent cache";
    homepage = "http://www.grantjenks.com/docs/diskcache/";
    license = licenses.asl20;
    maintainers = [ maintainers.costrouc ];
  };
}