summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-daemon/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/python-daemon/default.nix')
-rw-r--r--pkgs/development/python-modules/python-daemon/default.nix31
1 files changed, 24 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/python-daemon/default.nix b/pkgs/development/python-modules/python-daemon/default.nix
index 93c05106404..e33aee6c1c9 100644
--- a/pkgs/development/python-modules/python-daemon/default.nix
+++ b/pkgs/development/python-modules/python-daemon/default.nix
@@ -1,20 +1,37 @@
-{ lib, buildPythonPackage, fetchPypi, mock, testscenarios, docutils, lockfile }:
+{ lib, buildPythonPackage, fetchPypi
+, docutils
+, lockfile
+, mock
+, pytest
+, testscenarios
+, twine
+}:
 
 buildPythonPackage rec {
   pname = "python-daemon";
-  version = "2.2.3";
+  version = "2.2.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "affeca9e5adfce2666a63890af9d6aff79f670f7511899edaddca7f96593cc25";
+    sha256 = "57c84f50a04d7825515e4dbf3a31c70cc44414394a71608dee6cfde469e81766";
   };
 
-  # A test fail within chroot builds.
-  doCheck = false;
-
-  buildInputs = [ mock testscenarios ];
+  nativeBuildInputs = [ twine ];
   propagatedBuildInputs = [ docutils lockfile ];
 
+  checkInputs = [ pytest mock testscenarios ];
+  checkPhase = ''
+    pytest -k 'not detaches_process_context \
+                and not standard_stream_file_descriptors'
+  '';
+
+  pythonImportsCheck = [
+    "daemon"
+    "daemon.daemon"
+    "daemon.pidfile"
+    "daemon.runner"
+  ];
+
   meta = with lib; {
     description = "Library to implement a well-behaved Unix daemon process";
     homepage = "https://pagure.io/python-daemon/";