From f144fc5b96af309f1c50f540be0208568e33bf1f Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 7 Nov 2024 02:34:54 +0000 Subject: [PATCH] mpdecimal: use absolute library install names on Darwin Closes: #354088 --- pkgs/development/libraries/mpdecimal/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mpdecimal/default.nix b/pkgs/development/libraries/mpdecimal/default.nix index 1041100f9f8e..82643b197109 100644 --- a/pkgs/development/libraries/mpdecimal/default.nix +++ b/pkgs/development/libraries/mpdecimal/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, updateAutotoolsGnuConfigScriptsHook }: +{ lib, stdenv, fetchurl, autoreconfHook }: stdenv.mkDerivation rec { pname = "mpdecimal"; @@ -10,10 +10,16 @@ stdenv.mkDerivation rec { hash = "sha256-lCRFwyRbInMP1Bpnp8XCMdEcsbmTa5wPdjNPt9C0Row="; }; - nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; + nativeBuildInputs = [ autoreconfHook ]; configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ]; + postPatch = '' + # Use absolute library install names on Darwin. + substituteInPlace configure.ac \ + --replace-fail '-install_name @rpath/' "-install_name $out/lib/" + ''; + postInstall = '' mkdir -p $cxx/lib mv $out/lib/*c++* $cxx/lib