summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix b/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix
new file mode 100644
index 00000000000..cea5fc9a4e2
--- /dev/null
+++ b/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, appleDerivation }:
+
+appleDerivation {
+  phases = [ "unpackPhase" "installPhase" ];
+
+  # Not strictly necessary, since libSystem depends on it, but it's nice to be explicit so we
+  # can easily find out what's impure.
+  __propagatedImpureHostDeps = [
+    "/usr/lib/libauto.dylib"
+    "/usr/lib/libc++abi.dylib"
+    "/usr/lib/libc++.1.dylib"
+    "/usr/lib/libSystem.B.dylib"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/include/objc $out/lib
+    ln -s /usr/lib/libobjc.dylib $out/lib/libobjc.dylib
+    cp runtime/OldClasses.subproj/List.h $out/include/objc/List.h
+    cp runtime/NSObjCRuntime.h $out/include/objc/NSObjCRuntime.h
+    cp runtime/NSObject.h $out/include/objc/NSObject.h
+    cp runtime/Protocol.h $out/include/objc/Protocol.h
+    cp runtime/hashtable.h $out/include/objc/hashtable.h
+    cp runtime/hashtable2.h $out/include/objc/hashtable2.h
+    cp runtime/message.h $out/include/objc/message.h
+    cp runtime/objc-api.h $out/include/objc/objc-api.h
+    cp runtime/objc-auto.h $out/include/objc/objc-auto.h
+    cp runtime/objc-class.h $out/include/objc/objc-class.h
+    cp runtime/objc-exception.h $out/include/objc/objc-exception.h
+    cp runtime/objc-load.h $out/include/objc/objc-load.h
+    cp runtime/objc-runtime.h $out/include/objc/objc-runtime.h
+    cp runtime/objc-sync.h $out/include/objc/objc-sync.h
+    cp runtime/objc.h $out/include/objc/objc.h
+    cp runtime/runtime.h $out/include/objc/runtime.h
+  '';
+}