From a574d9963e2b06b0c7d4be50563bec1198ff87b6 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 16 Nov 2025 23:58:12 +0800 Subject: [PATCH] libamplsolver: fix build on aarch64-darwin --- pkgs/by-name/li/libamplsolver/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/li/libamplsolver/package.nix b/pkgs/by-name/li/libamplsolver/package.nix index 3ad35f748471..62fd07444840 100644 --- a/pkgs/by-name/li/libamplsolver/package.nix +++ b/pkgs/by-name/li/libamplsolver/package.nix @@ -25,6 +25,10 @@ stdenv.mkDerivation { }) ]; + # Allow install_name_tool rewrite paths on darwin. + # error: install_name_tool: changing install names or rpaths can't be redone for: /nix/store/...-libamplsolver-.../lib/libamplsolver.dylib (for architecture arm64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names) + NIX_LDFLAGS = lib.optional stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; + installPhase = '' runHook preInstall pushd sys.$(uname -m).$(uname -s)