about summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-07-11 13:19:47 -0600
committerRandy Eckenrode <randy@largeandhighquality.com>2023-07-14 17:27:16 -0600
commit732e4469cbcfeef847f46c99f3cddb7b6558021d (patch)
tree8c8df22683baf6b30a00ae91fa9d0b9ba34f6f73 /pkgs/os-specific/darwin/apple-source-releases
parent2b9656eb4f55ab1d94da87cc94400b73a7b8cd5c (diff)
darwin.adv_cmds: fix build with clang 16
darwin.Libc conflicts with libc++ 16. adv_cmds only needs `msgcat.h`, so
provide only that in `buildInputs` instead of all of Libc.
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
index e44241171c60b..3ac338d5c619d 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
@@ -1,5 +1,17 @@
-{ lib, appleDerivation, xcbuild, ncurses, libutil, Libc }:
+{ stdenv, lib, appleDerivation, xcbuild, ncurses, libutil, Libc }:
 
+let
+  # Libc conflicts with libc++ 16, so provide only the header from it that’s needed to build.
+  msgcat = stdenv.mkDerivation {
+    pname = "Libc-msgcat";
+    version = lib.getVersion Libc;
+
+    buildCommand = ''
+      mkdir -p "$out/include"
+      ln -s ${lib.getDev Libc}/include/msgcat.h "$out/include/"
+    '';
+  };
+in
 appleDerivation {
   # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264
 
@@ -44,7 +56,7 @@ appleDerivation {
   '';
 
   nativeBuildInputs = [ xcbuild ];
-  buildInputs = [ ncurses libutil Libc ];
+  buildInputs = [ ncurses libutil msgcat ];
 
   meta = {
     platforms = lib.platforms.darwin;