summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
diff options
context:
space:
mode:
authorDan Peebles <thetypesaretoobig@gmail.com>2015-02-08 01:53:52 -0500
committerDan Peebles <thetypesaretoobig@gmail.com>2015-02-08 01:53:52 -0500
commit29f265dfd28ce5567106a7a1df3bd6c1fbd8406f (patch)
tree3973e0a11ae1737f8d307ec07651cf5c12498210 /pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
parentf43c324cee6ed5fdbe679b70b71caaca1c4629a8 (diff)
downloadnixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.tar
nixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.tar.gz
nixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.tar.bz2
nixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.tar.lz
nixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.tar.xz
nixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.tar.zst
nixpkgs-29f265dfd28ce5567106a7a1df3bd6c1fbd8406f.zip
Add a big bundle of packages from apple source releases. Many of them only provide headers or stubs, but are what's needed for the upcoming pure-darwin stdenv, and don't do any harm for now.
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
new file mode 100644
index 00000000000..16cfa9e554b
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, appleDerivation, ed, unifdef, Libc_old }:
+
+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
+
+    # 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
+  '';
+}