aeron-cpp: fix build on darwin

This commit is contained in:
flurie
2025-11-08 16:14:48 -05:00
parent c6fee0186b
commit 2a5661fe78

View File

@@ -4,6 +4,7 @@
cmake,
fetchFromGitHub,
fetchMavenArtifact,
fixDarwinDylibNames,
jdk11,
lib,
libbsd,
@@ -54,11 +55,16 @@ stdenv.mkDerivation {
];
nativeBuildInputs = [
autoPatchelfHook
cmake
jdk11
makeWrapper
patchelf
]
++ lib.optionals stdenv.isLinux [
autoPatchelfHook
]
++ lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];
configurePhase = ''
@@ -113,6 +119,12 @@ stdenv.mkDerivation {
runHook postInstall
'';
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
for lib in $out/lib/*.dylib; do
install_name_tool -change "@rpath/$(basename $lib)" "$lib" "$out/bin/aeronmd"
done
'';
meta = with lib; {
description = "Aeron Messaging C++ Library";
homepage = "https://aeron.io/";