Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ appleDerivation {
cp IOKitUser-*/IODataQueueClient.h $dest
cp IOKitUser-*/IOKitLib.h $dest
cp IOKitUser-*/iokitmig.h $dest
cp ${xnu}/Library/PrivateFrameworks/IOKit.framework/Versions/A/Headers/*.h $dest
cp ${xnu}/Library/Frameworks/IOKit.framework/Versions/A/Headers/*.h $dest

# audio: complete
cp IOAudioFamily-*/IOAudioDefines.h $dest/audio
Expand Down Expand Up @@ -128,7 +128,7 @@ appleDerivation {
# pwr_mgt: complete
cp IOKitUser-*/pwr_mgt.subproj/IOPMKeys.h $dest/pwr_mgt
cp IOKitUser-*/pwr_mgt.subproj/IOPMLib.h $dest/pwr_mgt
cp ${xnu}/Library/PrivateFrameworks/IOKit.framework/Versions/A/Headers/pwr_mgt/*.h $dest/pwr_mgt
cp ${xnu}/Library/Frameworks/IOKit.framework/Versions/A/Headers/pwr_mgt/*.h $dest/pwr_mgt
cp IOKitUser-*/pwr_mgt.subproj/IOPMLibPrivate.h $dest/pwr_mgt # Private

# sbp2: complete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,30 @@ appleDerivation {

nativeBuildInputs = [ cpio ];

installPhase = ''
export NIX_ENFORCE_PURITY=

mkdir -p $out/lib $out/include
NIX_ENFORCE_PURITY = false;

# Set up our include directories
(cd ${xnu}/include && find . -name '*.h' -or -name '*.defs' | cpio -pdm $out/include)
cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/Availability*.h $out/include
cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdarg.h $out/include
installPhase = ''
(cd ${xnu}/include
find . -type f -not \( -path "./*_HEADERS*" -or -path "./LIBSYSCALL*" \) \
| cpio -pdm --quiet $out/include

(cd LIBSYSCALL
find . -type f | cpio -pdm --quiet $out/include
)
# NOTE: here echo is a must to xargs in bootstrap-tools.
(cd EXTERNAL_HEADERS && (xargs -n1 echo | cpio -pdm --quiet $out/include) <<<"
AssertMacros.h
Availability.h
AvailabilityInternal.h
AvailabilityMacros.h
")
(cd LIBSYSCALL_WRAPPERS && (xargs -n1 echo | cpio -pdm --quiet $out/include) <<<"
gethostuuid.h
libproc.h
spawn.h
strings.h
")
)

for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} \
${libclosure} ${CarbonHeaders} ${libdispatch} ${ncurses.dev} \
Expand Down Expand Up @@ -86,6 +101,8 @@ appleDerivation {
EOF

# The startup object files
mkdir $out/lib

cp ${Csu}/lib/* $out/lib

cp -vr \
Expand Down Expand Up @@ -113,6 +130,9 @@ appleDerivation {
-change "$resolv_libSystem" /usr/lib/libSystem.dylib \
$out/lib/libresolv.9.dylib
ln -s libresolv.9.dylib $out/lib/libresolv.dylib

# self-link /usr for using -sysroot
ln -s . $out/usr
'';

appleHeaders = builtins.readFile ./headers.txt;
Expand Down
Loading