From 6986cab64be7fa54b59ae5a55a5e2a92c009925f Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 24 Sep 2024 22:30:53 -0400 Subject: [PATCH] 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. --- pkgs/top-level/all-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7fc516291ee..0700ea0409d4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };