diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-01-24 15:39:34 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-01-24 15:39:34 +0000 |
commit | 1a60dd2adc7bc997efabc11274fc2d8f772731ae (patch) | |
tree | 604b7796977b9dc0a3b9ed7f29ede0bbee0a277b /pkgs/build-support/libredirect | |
parent | c0398d7617c0dee8fc7fde2101f3b3c8cef4e1c2 (diff) | |
parent | 2f14e11f3a545130409c520909a64b86e92f737d (diff) |
Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts: pkgs/development/python-modules/cupy/default.nix pkgs/development/python-modules/staticjinja/default.nix
Diffstat (limited to 'pkgs/build-support/libredirect')
-rw-r--r-- | pkgs/build-support/libredirect/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/libredirect/default.nix b/pkgs/build-support/libredirect/default.nix index 4c344a24b93bc..8f7df3386d14b 100644 --- a/pkgs/build-support/libredirect/default.nix +++ b/pkgs/build-support/libredirect/default.nix @@ -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 '' @@ -75,6 +75,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" |