nixpkgs-suyu/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
Shea Levy 8b9b9fad31 Revert "Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs""
Revert a revert of a merge that shouldn't have been in master but was intentionally in staging.

Next time I'll do this right after the revert instead of so far down the line...

This reverts commit 9adad8612b.
2016-08-24 07:35:30 -04:00

32 lines
1.2 KiB
Nix

{ stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }:
appleDerivation {
phases = [ "unpackPhase" "installPhase" ];
buildInputs = [ ed unifdef ];
# TODO: asl.h actually comes from syslog project now
installPhase = ''
export SRCROOT=$PWD
export DSTROOT=$out
export PUBLIC_HEADERS_FOLDER_PATH=include
export PRIVATE_HEADERS_FOLDER_PATH=include
bash xcodescripts/headers.sh
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
'';
}