From 23cb6c155b89b060eb2004cd0e1951a4097a81fe Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 12 Jun 2023 09:13:47 -0400 Subject: darwin.Libc: stop vendoring headers from other packages A number of headers in Libc are being vendored from other packages. Instead of copying them from an earlier Libc, Libsystem now sources them from their respective packages (see below). This allows Libc_old to be dropped and avoids any potential clashes when building Libsystem. libmalloc: * malloc/malloc.h libplatform: * setjmp.h * ucontext.h * libkern/OSAtomic.h * libkern/OSCacheControl.h libpthread: * pthread*.h * sched.h * spawn.h syslog (vendored because only one file is needed): * asl.h xnu: * spawn.h (a different one from libpthread) * libproc.h --- .../darwin/apple-source-releases/Libc/default.nix | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix') diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix index 915d3a61f81..6ff3cec2f1e 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix @@ -1,4 +1,4 @@ -{ appleDerivation', stdenvNoCC, ed, unifdef, Libc_old, Libc_10-9 }: +{ appleDerivation', stdenvNoCC, ed, unifdef, Libc_10-9 }: appleDerivation' stdenvNoCC { nativeBuildInputs = [ ed unifdef ]; @@ -7,7 +7,6 @@ appleDerivation' stdenvNoCC { ./0001-Define-TARGET_OS_EMBEDDED-in-std-lib-io-if-not-defin.patch ]; - # TODO: asl.h actually comes from syslog project now installPhase = '' export SRCROOT=$PWD export DSTROOT=$out @@ -18,20 +17,6 @@ appleDerivation' stdenvNoCC { cp ${./CrashReporterClient.h} $out/include/CrashReporterClient.h cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include - - # Ugh Apple stopped releasing this stuff so we need an older one... - cp ${Libc_old}/include/spawn.h $out/include - cp ${Libc_old}/include/setjmp.h $out/include - cp ${Libc_old}/include/ucontext.h $out/include - cp ${Libc_old}/include/pthread*.h $out/include - cp ${Libc_old}/include/sched.h $out/include - cp -R ${Libc_old}/include/malloc $out/include - - mkdir -p $out/include/libkern - cp ${Libc_old}/include/asl.h $out/include - cp ${Libc_old}/include/libproc.h $out/include - cp ${Libc_old}/include/libkern/OSAtomic.h $out/include/libkern - cp ${Libc_old}/include/libkern/OSCacheControl.h $out/include/libkern ''; appleHeaders = builtins.readFile ./headers.txt; -- cgit 1.4.1