From d5b887231b63bcfd6ca787eed765178fa3796b29 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 17 Jan 2026 10:28:53 +0000 Subject: [PATCH] python3Packages.nifty8: fix matplotlib tests on darwin --- .../python-modules/nifty8/default.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/nifty8/default.nix b/pkgs/development/python-modules/nifty8/default.nix index 687306ee4658..46c05bb3f2f4 100644 --- a/pkgs/development/python-modules/nifty8/default.nix +++ b/pkgs/development/python-modules/nifty8/default.nix @@ -70,22 +70,16 @@ buildPythonPackage rec { openssh ]; - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ - # Fatal Python error: Aborted - # matplotlib/backend_bases.py", line 2654 in create_with_canvas - "test_optimize_kl_domain_expansion" - "test_plot_priorsamples" + # Prevents 'Fatal Python error: Aborted' on darwin during checkPhase + preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' + export MPLBACKEND="Agg" + ''; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # [XPASS(strict)] np.vdot inaccurate for single precision "test_vdot" ]; - disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ - # Fatal Python error: Aborted - # matplotlib/backend_bases.py", line 2654 in create_with_canvas - "test/test_plot.py" - ]; - __darwinAllowLocalNetworking = true; postCheck = lib.optionalString