about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/diskcache/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/diskcache/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/diskcache/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/diskcache/default.nix b/nixpkgs/pkgs/development/python-modules/diskcache/default.nix
new file mode 100644
index 000000000000..8b968c3272fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/diskcache/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pytestcov
+, pytest_xdist
+, pytest-django
+, mock
+, django
+}:
+
+buildPythonPackage rec {
+  pname = "diskcache";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "grantjenks";
+    repo = "python-diskcache";
+    rev = "v${version}";
+    sha256 = "0xwqw60dbn1x2294galcs08vm6ydcr677lr8slqz8a3ry6sgkhn9";
+  };
+
+  checkInputs = [
+    pytestCheckHook
+    pytestcov
+    pytest_xdist
+    pytest-django
+    mock
+  ];
+
+  # Darwin sandbox causes most tests to fail.
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "Disk and file backed persistent cache";
+    homepage = "http://www.grantjenks.com/docs/diskcache/";
+    license = licenses.asl20;
+    maintainers = [ maintainers.costrouc ];
+  };
+}