about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cachelib
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-07-09 21:52:36 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-07-09 16:09:10 -0700
commit956caf75d0660f59e779687ecffe47c8e72d7275 (patch)
tree3ae732463b4978fcac1882e76ca3460dd92fed72 /pkgs/development/python-modules/cachelib
parent8a76eaa305fe177770855564e99e6490e04c4582 (diff)
python3Packages.cachelib: enable tests
Diffstat (limited to 'pkgs/development/python-modules/cachelib')
-rw-r--r--pkgs/development/python-modules/cachelib/default.nix24
1 files changed, 20 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/cachelib/default.nix b/pkgs/development/python-modules/cachelib/default.nix
index 7721f5d7d5fcd..9521d3ee03b4a 100644
--- a/pkgs/development/python-modules/cachelib/default.nix
+++ b/pkgs/development/python-modules/cachelib/default.nix
@@ -1,14 +1,30 @@
-{ lib, buildPythonPackage, fetchPypi }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytest-xprocess
+, pytestCheckHook
+, pythonOlder
+}:
 
 buildPythonPackage rec {
   pname = "cachelib";
   version = "0.2.0";
+  disabled = pythonOlder "3.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "sha256-3LX6/mtrVEqqjQyssS1wu/m79ywEHxf8rRYY23vt6to=";
+  src = fetchFromGitHub {
+    owner = "pallets";
+    repo = pname;
+    rev = version;
+    sha256 = "1jh1ghvrv1mnw6mdq19s6x6fblz9qi0vskc6mjp0cxjpnxxblaml";
   };
 
+  checkInputs = [
+    pytest-xprocess
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "cachelib" ];
+
   meta = with lib; {
     homepage = "https://github.com/pallets/cachelib";
     description = "Collection of cache libraries in the same API interface";