about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pretend
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-03-10 12:51:30 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-05-03 09:08:30 +0200
commitde6f14d3d855d331c8516d12b7288aa0ddcb27f3 (patch)
treeca7d2ebe3e650072a4974d6bb71fda4700db8694 /pkgs/development/python-modules/pretend
parent3c7466715aa2ed6be4cc17519ab065bb659f28b5 (diff)
python3Packages.pretend: enable tests
Diffstat (limited to 'pkgs/development/python-modules/pretend')
-rw-r--r--pkgs/development/python-modules/pretend/default.nix29
1 files changed, 23 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/pretend/default.nix b/pkgs/development/python-modules/pretend/default.nix
index 87e0e6613b1dd..0134b0dc36a4b 100644
--- a/pkgs/development/python-modules/pretend/default.nix
+++ b/pkgs/development/python-modules/pretend/default.nix
@@ -1,19 +1,36 @@
-{ lib, buildPythonPackage, fetchPypi }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+}:
 
 buildPythonPackage rec {
   pname = "pretend";
   version = "1.0.9";
+  format = "setuptools";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "c90eb810cde8ebb06dafcb8796f9a95228ce796531bc806e794c2f4649aa1b10";
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "alex";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-OqMfeIMFNBBLq6ejR3uOCIHZ9aA4zew7iefVlAsy1JQ=";
   };
 
-  # No tests in archive
-  doCheck = false;
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "pretend"
+  ];
 
   meta = with lib; {
+    description = "Module for stubbing";
     homepage = "https://github.com/alex/pretend";
     license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
   };
 }