mpdecimal: use absolute library install names on Darwin

Closes: #354088
This commit is contained in:
Emily
2024-11-07 02:38:08 +00:00
parent a886e49239
commit f144fc5b96
@@ -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