about summary refs log tree commit diff
path: root/pkgs/development/python-modules/uptime/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/uptime/default.nix')
-rw-r--r--pkgs/development/python-modules/uptime/default.nix25
1 files changed, 18 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/uptime/default.nix b/pkgs/development/python-modules/uptime/default.nix
index 7dd3710b81d36..d20bd4dc5506c 100644
--- a/pkgs/development/python-modules/uptime/default.nix
+++ b/pkgs/development/python-modules/uptime/default.nix
@@ -1,23 +1,34 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  pythonOlder,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "uptime";
   version = "3.0.1";
-  format = "setuptools";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0wr9jkixprlywz0plyn5p42a5fd31aiwvjrxdvj7r02vfxa04c3w";
+    hash = "sha256-fDACVHdbgHzkbj3LzaMKo7miBLnFenrB557m2+OUKXM=";
   };
 
+  build-system = [ setuptools ];
+
+  # Tests are not shipped
+  doCheck = false;
+
+  pythonImportsCheck = [ "uptime" ];
+
   meta = with lib; {
-    homepage = "https://github.com/Cairnarvon/uptime";
     description = "Cross-platform way to retrieve system uptime and boot time";
+    homepage = "https://github.com/Cairnarvon/uptime";
     license = licenses.bsd2;
     maintainers = with maintainers; [ rob ];
   };
-
 }