diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index 192fe6d7158b..26b2a38984ed 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -35,20 +35,19 @@ buildPythonPackage rec { pythonRelaxDeps = [ "mpi4py" ]; - # avoid strict pinning of numpy and mpi4py, can't be replaced with - # pythonRelaxDepsHook, see: https://github.com/NixOS/nixpkgs/issues/327941 + # Avoid strict pinning of Numpy, can't be replaced with pythonRelaxDepsHook, + # as these are build time dependencies. See: + # https://github.com/NixOS/nixpkgs/issues/327941 postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "numpy >=2.0.0, <3" "numpy" - substituteInPlace setup.py \ - --replace-fail "mpi4py ==3.1.4" "mpi4py" \ - --replace-fail "mpi4py ==4.0.1" "mpi4py" \ - --replace-fail "mpi4py ==3.1.6" "mpi4py" ''; env = { HDF5_DIR = "${hdf5}"; HDF5_MPI = if mpiSupport then "ON" else "OFF"; + # See discussion at https://github.com/h5py/h5py/issues/2560 + H5PY_SETUP_REQUIRES = 0; }; postConfigure = ''