libunwind: add a comment explaining the package situation
libunwind is unnecessary on Darwin because it is included in the SDK, but setting libunwind to `null` would cause evaluation errors. Additionally, some packages expect to locate libunwind via pkg-config. Set the top-level libunwind to the Darwin compatibility package, so those packages can find it and use it.
This commit is contained in:
@@ -21697,6 +21697,9 @@ with pkgs;
|
||||
};
|
||||
|
||||
libunwind =
|
||||
# Use the system unwinder in the SDK but provide a compatibility package to:
|
||||
# 1. avoid evaluation errors with setting `unwind` to `null`; and
|
||||
# 2. provide a `.pc` for compatibility with packages that expect to find libunwind that way.
|
||||
if stdenv.hostPlatform.isDarwin then darwin.libunwind
|
||||
else if stdenv.hostPlatform.system == "riscv32-linux" then llvmPackages.libunwind
|
||||
else callPackage ../development/libraries/libunwind { };
|
||||
|
||||
Reference in New Issue
Block a user