From 209591e7c78e025c50643c20aae06c4a5fbffeba Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 13 Nov 2023 08:30:44 -0500 Subject: suitesparse: fix build on x86_64-darwin SuitesParse can fail to build on x86_64-darwin if there is not enough space in its dylibs to change their install names to absolute paths. Ensure there is by passing `-headerpad_max_install_names` to the linker. --- pkgs/development/libraries/science/math/suitesparse/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/science/math/suitesparse/default.nix b/pkgs/development/libraries/science/math/suitesparse/default.nix index 67dfef186e7..dd2eb9478f7 100644 --- a/pkgs/development/libraries/science/math/suitesparse/default.nix +++ b/pkgs/development/libraries/science/math/suitesparse/default.nix @@ -60,6 +60,12 @@ stdenv.mkDerivation rec { ] ; + env = lib.optionalAttrs stdenv.isDarwin { + # Ensure that there is enough space for the `fixDarwinDylibNames` hook to + # update the install names of the output dylibs. + NIX_LDFLAGS = "-headerpad_max_install_names"; + }; + buildFlags = [ # Build individual shared libraries, not demos "library" -- cgit 1.4.1