From 4a1054fc6eb9800a680d5aa01e7b886a4f047d63 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 9 Jun 2026 16:07:29 +0000 Subject: [PATCH] python3Packages.boost-histogram: disable crashing tests on darwin --- .../boost-histogram/default.nix | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/boost-histogram/default.nix b/pkgs/development/python-modules/boost-histogram/default.nix index bc57ed4a927d..3ee69a0dea7f 100644 --- a/pkgs/development/python-modules/boost-histogram/default.nix +++ b/pkgs/development/python-modules/boost-histogram/default.nix @@ -28,17 +28,18 @@ hypothesis, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "boost-histogram"; version = "1.7.2"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "scikit-hep"; repo = "boost-histogram"; - tag = "v${version}"; - hash = "sha256-nDNSLpmQ3YOo/nEkHfvsE0l9yATzQnrlunX1qWupbLQ="; + tag = "v${finalAttrs.version}"; fetchSubmodules = true; + hash = "sha256-nDNSLpmQ3YOo/nEkHfvsE0l9yATzQnrlunX1qWupbLQ="; }; nativeBuildInputs = [ cmake ]; @@ -67,19 +68,24 @@ buildPythonPackage rec { pytestFlags = [ "--benchmark-disable" ]; - disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ - # Segfaults: boost_histogram/_internal/hist.py", line 799 in sum - # Fatal Python error: Segmentation fault - "test_numpy_conversion_4" - ]; + disabledTests = + lib.optionals stdenv.hostPlatform.isDarwin [ + # Trace/BPT trap: 5 + "test_round_trip_3d_histogram_json" + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ + # Segfaults: boost_histogram/_internal/hist.py", line 799 in sum + # Fatal Python error: Segmentation fault + "test_numpy_conversion_4" + ]; pythonImportsCheck = [ "boost_histogram" ]; meta = { description = "Python bindings for the C++14 Boost::Histogram library"; homepage = "https://github.com/scikit-hep/boost-histogram"; - changelog = "https://github.com/scikit-hep/boost-histogram/releases/tag/${src.tag}"; + changelog = "https://github.com/scikit-hep/boost-histogram/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ veprbl ]; }; -} +})