From 17ab68093c5f577ab4959e8cbea2d47e5f48cf65 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Wed, 14 Aug 2024 21:07:20 -0700 Subject: [PATCH] python3Packages.h5py: fix on x86_64-darwin --- pkgs/development/python-modules/h5py/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index 80eb055a1d6d..13a464dccb4c 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -1,6 +1,7 @@ { lib, fetchPypi, + fetchpatch, buildPythonPackage, pythonOlder, setuptools, @@ -39,6 +40,11 @@ buildPythonPackage rec { # Unlock an overly strict locking of mpi4py version (seems not to be necessary). # See also: https://github.com/h5py/h5py/pull/2418/files#r1589372479 ./mpi4py-requirement.patch + # Fix 16-bit float dtype and tests on darwin (remove in next release) + (fetchpatch { + url = "https://github.com/h5py/h5py/commit/a27a1f49ce92d985e14b8a24fa80d30e5174add2.patch"; + hash = "sha256-7TcmNSJucknq+Vnv4ViT6S0nWeH1+krarWxq6WXLYEA="; + }) ]; # avoid strict pinning of numpy, can't be replaced with pythonRelaxDepsHook, @@ -99,9 +105,5 @@ buildPythonPackage rec { homepage = "http://www.h5py.org/"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ doronbehar ]; - # When importing `h5py` during the build, we get: - # - # ValueError: Not a datatype (not a datatype) - broken = stdenv.isDarwin && stdenv.isx86_64; }; }