From 159b90f118b5c54e3cf86bd134916728958f8f38 Mon Sep 17 00:00:00 2001
From: Robert Scott <code@humanleg.org.uk>
Date: Sat, 13 Nov 2021 20:47:45 +0000
Subject: [PATCH] python3Packages.python-jenkins: skip test failing on darwin

---
 .../development/python-modules/python-jenkins/default.nix | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pkgs/development/python-modules/python-jenkins/default.nix b/pkgs/development/python-modules/python-jenkins/default.nix
index 06a5d234ecf6..7c1d64fc827d 100644
--- a/pkgs/development/python-modules/python-jenkins/default.nix
+++ b/pkgs/development/python-modules/python-jenkins/default.nix
@@ -1,4 +1,5 @@
 { lib
+, stdenv
 , buildPythonPackage
 , fetchPypi
 , mock
@@ -22,6 +23,13 @@ buildPythonPackage rec {
     sha256 = "01jid5s09lr3kayr2h1z9n8h9nhyw3jxv9c4b5hrlxijknkqzvfy";
   };
 
+  # test uses timeout mechanism unsafe for use with the "spawn"
+  # multiprocessing backend used on macos
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace tests/test_jenkins_sockets.py \
+      --replace test_jenkins_open_no_timeout dont_test_jenkins_open_no_timeout
+  '';
+
   buildInputs = [ mock ];
   propagatedBuildInputs = [ pbr pyyaml setuptools six multi_key_dict requests ];