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

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

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

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

  disabled = lib.versionAtLeast django.version "2.0";

  checkPhase = ''
    pytest
  '';

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