about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix b/nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix
index 2aa92cc3e21f..c7ed502e7a41 100644
--- a/nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pytest-forked/default.nix
@@ -1,7 +1,10 @@
 { lib
+, stdenv
 , buildPythonPackage
 , pythonOlder
+, pythonAtLeast
 , fetchFromGitHub
+, fetchpatch2
 , setuptools
 , setuptools-scm
 , wheel
@@ -25,6 +28,15 @@ buildPythonPackage rec {
     hash = "sha256-owkGwF5WQ17/CXwTsIYJ2AgktekRB4qhtsDxR0LCI/k=";
   };
 
+  patches = [
+    (fetchpatch2 {
+      # https://github.com/pytest-dev/pytest-forked/actions
+      name = "pytest8-compat.patch";
+      url = "https://github.com/pytest-dev/pytest-forked/commit/b2742322d39ebda97d5170922520f3bb9c73f614.patch";
+      hash = "sha256-tTRW0p3tOotQMtjjJ6RUKdynsAnKRz0RAV8gAUHiNNA=";
+    })
+  ];
+
   nativeBuildInputs = [
     setuptools
     setuptools-scm
@@ -44,6 +56,12 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  disabledTests = if (pythonAtLeast "3.12" && stdenv.isDarwin && stdenv.isx86_64) then [
+    # non reproducible test failure on hydra, works on community builder
+    # https://hydra.nixos.org/build/252537267
+    "test_xfail"
+  ] else null;
+
   setupHook = ./setup-hook.sh;
 
   meta = {