about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pid/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pid/default.nix')
-rw-r--r--pkgs/development/python-modules/pid/default.nix29
1 files changed, 20 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/pid/default.nix b/pkgs/development/python-modules/pid/default.nix
index de7856accabc5..b0bb834a302fb 100644
--- a/pkgs/development/python-modules/pid/default.nix
+++ b/pkgs/development/python-modules/pid/default.nix
@@ -1,28 +1,39 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, nose
+{
+  lib,
+  buildPythonPackage,
+  fetchpatch2,
+  fetchPypi,
+  pytestCheckHook,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "pid";
   version = "3.0.4";
-  format = "setuptools";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "0e33670e83f6a33ebb0822e43a609c3247178d4a375ff50a4689e266d853eb66";
   };
 
-  buildInputs = [ nose ];
+  patches = [
+    # apply c9d1550ba2ee73231f8e984d75d808c8cc103748 to remove nose dependency. change is in repo, but hasn't been released on pypi.
+    (fetchpatch2 {
+      url = "https://github.com/trbs/pid/commit/c9d1550ba2ee73231f8e984d75d808c8cc103748.patch";
+      hash = "sha256-2F31LlrJku1xzmI7P+QLyUZ8CzVHx25APp88qwWkZxw=";
+    })
+  ];
 
-  # No tests included
-  doCheck = false;
+  build-system = [ setuptools ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  doCheck = true;
 
   meta = with lib; {
     description = "Pidfile featuring stale detection and file-locking";
     homepage = "https://github.com/trbs/pid/";
     license = licenses.asl20;
   };
-
 }