From f6799dcd4ba8d5d0ac3da65a273e77fe01c94018 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 5 Jul 2023 06:51:54 +0900 Subject: [PATCH 1/4] python310Packages.matplotx: fix darwin build --- pkgs/development/python-modules/matplotx/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/matplotx/default.nix b/pkgs/development/python-modules/matplotx/default.nix index 7acb17c93667..fd477d7c259f 100644 --- a/pkgs/development/python-modules/matplotx/default.nix +++ b/pkgs/development/python-modules/matplotx/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , pytestCheckHook @@ -42,6 +43,9 @@ buildPythonPackage rec { }; checkInputs = passthru.optional-dependencies.all; + # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. + # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. + env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; nativeCheckInputs = [ pytestCheckHook @@ -61,4 +65,3 @@ buildPythonPackage rec { maintainers = with lib.maintainers; [ swflint ]; }; } - From fafd1a8123197c9d79367642541eed8af673e03b Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 5 Jul 2023 06:52:17 +0900 Subject: [PATCH 2/4] python310Packages.matplotx: move checkInputs to nativeCheckInputs --- pkgs/development/python-modules/matplotx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/matplotx/default.nix b/pkgs/development/python-modules/matplotx/default.nix index fd477d7c259f..f20812606869 100644 --- a/pkgs/development/python-modules/matplotx/default.nix +++ b/pkgs/development/python-modules/matplotx/default.nix @@ -42,14 +42,13 @@ buildPythonPackage rec { ]; }; - checkInputs = passthru.optional-dependencies.all; # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; nativeCheckInputs = [ pytestCheckHook - ]; + ] ++ passthru.optional-dependencies.all; disabledTestPaths = [ "tests/test_spy.py" # Requires meshzoo (non-free) and pytest-codeblocks (not packaged) @@ -65,3 +64,4 @@ buildPythonPackage rec { maintainers = with lib.maintainers; [ swflint ]; }; } + From d12dded201ac123407923ed457be06cdc0c5d28f Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 5 Jul 2023 01:30:58 +0900 Subject: [PATCH 3/4] python310Packages.perfplot: fix darwin build --- pkgs/development/python-modules/perfplot/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/perfplot/default.nix b/pkgs/development/python-modules/perfplot/default.nix index 96fa5309a81d..db8b4cd572b3 100644 --- a/pkgs/development/python-modules/perfplot/default.nix +++ b/pkgs/development/python-modules/perfplot/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , flit-core @@ -35,6 +36,10 @@ buildPythonPackage rec { rich ]; + # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. + # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. + env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; + nativeCheckInputs = [ pytestCheckHook ]; From ea6f9de7e04fe1e45121da6054a92d944c2034fa Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 5 Jul 2023 01:31:18 +0900 Subject: [PATCH 4/4] python310Packages.accupy: fix darwin build --- pkgs/development/python-modules/accupy/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/accupy/default.nix b/pkgs/development/python-modules/accupy/default.nix index dfe47d306811..7c6d33512bb7 100644 --- a/pkgs/development/python-modules/accupy/default.nix +++ b/pkgs/development/python-modules/accupy/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , pythonOlder @@ -56,6 +57,10 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; + # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase. + # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing. + env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg"; + # performance tests aren't useful to us and disabling them allows us to # decouple ourselves from an unnecessary build dep preCheck = ''