mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 22:21:26 +00:00
libredirect: fix build for aarch64-darwin (PR #156460)
This commit is contained in:
parent
fde0b2e2f2
commit
4bde5a3a68
@ -44,7 +44,7 @@ else stdenv.mkDerivation rec {
|
||||
-isystem ${llvmPackages_13.clang.libc}/include \
|
||||
-isystem ${llvmPackages_13.libclang.lib}/lib/clang/*/include \
|
||||
-L${llvmPackages_13.clang.libc}/lib \
|
||||
-Wl,-install_name,$out/lib/$libName \
|
||||
-Wl,-install_name,$libName \
|
||||
-Wall -std=c99 -O3 -fPIC libredirect.c \
|
||||
-ldl -shared -o "$libName"
|
||||
'' else if stdenv.isDarwin then ''
|
||||
@ -73,6 +73,12 @@ else stdenv.mkDerivation rec {
|
||||
|
||||
install -vD "$libName" "$out/lib/$libName"
|
||||
|
||||
'' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
||||
# dylib will be rejected unless dylib rpath gets explictly set
|
||||
install_name_tool \
|
||||
-change $libName $out/lib/$libName \
|
||||
$out/lib/$libName
|
||||
'' + ''
|
||||
# Provide a setup hook that injects our library into every process.
|
||||
mkdir -p "$hook/nix-support"
|
||||
cat <<SETUP_HOOK > "$hook/nix-support/setup-hook"
|
||||
|
Loading…
Reference in New Issue
Block a user