1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, pytestcov
6, pytest_xdist
7, pytest-django
8, mock
9, django
10}:
11
12buildPythonPackage rec {
13 pname = "diskcache";
14 version = "4.1.0";
15
16 src = fetchFromGitHub {
17 owner = "grantjenks";
18 repo = "python-diskcache";
19 rev = "v${version}";
20 sha256 = "0xy2vpk4hixb4gg871d9sx9wxdz8pi0pmnfdwg4bf8jqfjg022w8";
21 };
22
23 checkInputs = [
24 pytest
25 pytestcov
26 pytest_xdist
27 pytest-django
28 mock
29 ];
30
31 disabled = lib.versionAtLeast django.version "2.0";
32
33 checkPhase = ''
34 pytest
35 '';
36
37 meta = with lib; {
38 description = "Disk and file backed persistent cache";
39 homepage = "http://www.grantjenks.com/docs/diskcache/";
40 license = licenses.asl20;
41 maintainers = [ maintainers.costrouc ];
42 };
43}