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.
This commit is contained in:
Randy Eckenrode 2023-07-11 13:19:47 -06:00
parent 2b9656eb4f
commit 732e4469cb
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -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 thats 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;