darwin.Libsystem: get asl.h from upstream syslog sources

This commit is contained in:
Randy Eckenrode 2023-06-12 01:12:50 -04:00
parent 489ed84733
commit d2b670291f
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9

View file

@ -1,4 +1,4 @@
{ lib, stdenv, buildPackages, fetchzip
{ lib, stdenv, buildPackages, fetchzip, fetchFromGitHub
, appleDerivation', xnu, Libc, Libm, libdispatch, Libinfo
, dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto
, copyfile, removefile, libresolvHeaders, libresolv, Libnotify, libmalloc, libplatform, libpthread
@ -30,6 +30,15 @@ let
fi
'';
};
# Libsystem needs `asl.h` from syslog. This is the version corresponding to the 10.12 SDK
# source release, but it hasnt changed in newer versions.
syslog.src = fetchFromGitHub {
owner = "apple-oss-distributions";
repo = "syslog";
rev = "syslog-349.50.5";
hash = "sha256-tXLW/TNsluhO1X9Rv3FANyzyOe5TE/hZz0gVo7JGvHA=";
};
in
appleDerivation' stdenv {
dontBuild = true;
@ -63,6 +72,9 @@ appleDerivation' stdenv {
(cd ${buildPackages.darwin.cctools.dev}/include/mach-o && find . -name '*.h' | copyHierarchy $out/include/mach-o)
# Copy `asl.h` from the syslog sources since it is no longer provided as part of Libc.
cp ${syslog.src}/libsystem_asl.tproj/include/asl.h $out/include
mkdir -p $out/include/os
cp ${darling.src}/src/libc/os/activity.h $out/include/os