mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
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.
This commit is contained in:
parent
f43c324cee
commit
29f265dfd2
|
@ -0,0 +1,18 @@
|
|||
--- CF-855.17/CFRuntime.c 2014-11-26 21:29:48.000000000 -0800
|
||||
+++ CF-855.17/CFRuntime.c.new 2014-11-26 21:30:01.000000000 -0800
|
||||
@@ -756,6 +756,7 @@
|
||||
extern void __CFErrorInitialize(void);
|
||||
extern void __CFTreeInitialize(void);
|
||||
extern void __CFURLInitialize(void);
|
||||
+extern void __CFPreferencesDomainInitialize(void);
|
||||
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
|
||||
extern void __CFMachPortInitialize(void);
|
||||
#endif
|
||||
@@ -1015,6 +1016,7 @@
|
||||
__CFErrorInitialize();
|
||||
__CFTreeInitialize();
|
||||
__CFURLInitialize();
|
||||
+ __CFPreferencesDomainInitialize();
|
||||
|
||||
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_WINDOWS
|
||||
__CFBundleInitialize();
|
|
@ -0,0 +1,22 @@
|
|||
--- CF-855.17/CoreFoundation.h 2015-01-03 00:17:41.000000000 -0500
|
||||
+++ CF-855.17/CoreFoundation.h.new 2015-01-03 00:18:35.000000000 -0500
|
||||
@@ -72,6 +72,7 @@
|
||||
#include <CoreFoundation/CFDictionary.h>
|
||||
#include <CoreFoundation/CFError.h>
|
||||
#include <CoreFoundation/CFLocale.h>
|
||||
+#include <CoreFoundation/CFMachPort.h>
|
||||
#include <CoreFoundation/CFNumber.h>
|
||||
#include <CoreFoundation/CFNumberFormatter.h>
|
||||
#include <CoreFoundation/CFPreferences.h>
|
||||
|
||||
--- CF-855.17/Makefile 2015-01-03 00:32:52.000000000 -0500
|
||||
+++ CF-855.17/Makefile.new 2015-01-03 00:33:07.000000000 -0500
|
||||
@@ -9,7 +9,7 @@
|
||||
HFILES = $(wildcard *.h)
|
||||
INTERMEDIATE_HFILES = $(addprefix $(OBJBASE)/CoreFoundation/,$(HFILES))
|
||||
|
||||
-PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h
|
||||
+PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMachPort.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h
|
||||
|
||||
PRIVATE_HEADERS=CFBundlePriv.h CFCharacterSetPriv.h CFError_Private.h CFLogUtilities.h CFPriv.h CFRuntime.h CFStorage.h CFStreamAbstract.h CFStreamPriv.h CFStreamInternal.h CFStringDefaultEncoding.h CFStringEncodingConverter.h CFStringEncodingConverterExt.h CFUniChar.h CFUnicodeDecomposition.h CFUnicodePrecomposition.h ForFoundationOnly.h CFBurstTrie.h CFICULogging.h
|
||||
|
41
pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
Normal file
41
pkgs/os-specific/darwin/apple-source-releases/CF/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, appleDerivation, icu, dyld, libdispatch, launchd, libclosure }:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ dyld icu libdispatch launchd libclosure ];
|
||||
|
||||
patches = [ ./add-cf-initialize.patch ./add-cfmachport.patch ];
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "/usr/bin/clang" "clang" \
|
||||
--replace "-arch i386 " "" \
|
||||
--replace "/usr/bin/" "" \
|
||||
--replace "/usr/sbin/" "" \
|
||||
--replace "/bin/" "" \
|
||||
--replace "INSTALLNAME=/System" "INSTALLNAME=$out" \
|
||||
--replace "install_name_tool -id /System" "install_name_tool -id $out" \
|
||||
--replace "-licucore.A" "-licui18n -licuuc" \
|
||||
--replace 'chown -RH -f root:wheel $(DSTBASE)/CoreFoundation.framework' "" \
|
||||
--replace 'chmod -RH' 'chmod -R'
|
||||
|
||||
replacement=''$'#define __PTK_FRAMEWORK_COREFOUNDATION_KEY5 55\n#define _pthread_getspecific_direct(key) pthread_getspecific((key))\n#define _pthread_setspecific_direct(key, val) pthread_setspecific((key), (val))'
|
||||
|
||||
substituteInPlace CFPlatform.c --replace "#include <pthread/tsd_private.h>" "$replacement"
|
||||
|
||||
substituteInPlace CFRunLoop.c --replace "#include <pthread/private.h>" ""
|
||||
|
||||
substituteInPlace CFURLPriv.h \
|
||||
--replace "#include <CoreFoundation/CFFileSecurity.h>" "" \
|
||||
--replace "#include <CoreFoundation/CFURLEnumerator.h>" "" \
|
||||
--replace "CFFileSecurityRef" "void *" \
|
||||
--replace "CFURLEnumeratorResult" "void *" \
|
||||
--replace "CFURLEnumeratorRef" "void *"
|
||||
|
||||
export DSTROOT=$out
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mv $out/System/* $out
|
||||
rmdir $out/System
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp MacTypes.h $out/include
|
||||
cp ConditionalMacros.h $out/include
|
||||
|
||||
substituteInPlace $out/include/MacTypes.h \
|
||||
--replace "CarbonCore/" ""
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/CommonCrypto
|
||||
cp include/* $out/include/CommonCrypto
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, appleDerivation, unifdef }:
|
||||
|
||||
appleDerivation {
|
||||
buildinputs = [ unifdef ];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
preInstall = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "rsync -a --exclude=.svn --exclude=.git" "cp -r"
|
||||
|
||||
substituteInPlace Standard/Commands.in \
|
||||
--replace "/bin/sh" "bash" \
|
||||
--replace "/usr/bin/compress" "compress" \
|
||||
--replace "/usr/bin/gzip" "gzip" \
|
||||
--replace "/bin/pax" "pax" \
|
||||
--replace "/usr/bin/tar" "tar" \
|
||||
--replace "xcrun -find" "echo" \
|
||||
--replace '$(Install_Program_Group) -s' '$(Install_Program_Group)' \
|
||||
--replace '$(Install_Program_Mode) -s' '$(Install_Program_Mode)'
|
||||
|
||||
substituteInPlace ReleaseControl/Common.make \
|
||||
--replace "/tmp" "$TMPDIR"
|
||||
|
||||
substituteInPlace ReleaseControl/BSDCommon.make \
|
||||
--replace '$(shell xcrun -find -sdk $(SDKROOT) cc)' "cc"
|
||||
|
||||
export DSTROOT=$out
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
postUnpack = ''
|
||||
substituteInPlace $sourceRoot/Makefile \
|
||||
--replace "/usr/lib" "/lib" \
|
||||
--replace "/usr/local/lib" "/lib" \
|
||||
--replace "/usr/bin" "" \
|
||||
--replace "/bin/" ""
|
||||
'';
|
||||
|
||||
# Mac OS didn't support rpaths back before 10.5, and this package intentionally builds stubs targeting versions prior to that
|
||||
NIX_DONT_SET_RPATH = "1";
|
||||
NIX_NO_SELF_RPATH = "1";
|
||||
|
||||
installPhase = ''
|
||||
export DSTROOT=$out
|
||||
make install
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Apple's common startup stubs for darwin";
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
187
pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
Normal file
187
pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix
Normal file
|
@ -0,0 +1,187 @@
|
|||
{ stdenv, appleDerivation, IOKitSrcs, xnu }:
|
||||
|
||||
# Someday it'll make sense to split these out into their own packages, but today is not that day.
|
||||
appleDerivation {
|
||||
srcs = stdenv.lib.attrValues IOKitSrcs;
|
||||
sourceRoot = ".";
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
__propagatedImpureHostDeps = [
|
||||
"/System/Library/Frameworks/IOKit.framework/IOKit"
|
||||
"/System/Library/Frameworks/IOKit.framework/Resources"
|
||||
"/System/Library/Frameworks/IOKit.framework/Versions"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
###### IMPURITIES
|
||||
mkdir -p $out/Library/Frameworks/IOKit.framework
|
||||
pushd $out/Library/Frameworks/IOKit.framework
|
||||
ln -s /System/Library/Frameworks/IOKit.framework/IOKit
|
||||
ln -s /System/Library/Frameworks/IOKit.framework/Resources
|
||||
popd
|
||||
|
||||
###### HEADERS
|
||||
|
||||
export dest=$out/Library/Frameworks/IOKit.framework/Headers
|
||||
mkdir -p $dest
|
||||
|
||||
pushd $dest
|
||||
mkdir audio avc DV firewire graphics hid hidsystem i2c kext ndrvsupport
|
||||
mkdir network ps pwr_mgt sbp2 scsi serial storage stream usb video
|
||||
popd
|
||||
|
||||
# root: complete
|
||||
cp IOKitUser-907.100.13/IOCFBundle.h $dest
|
||||
cp IOKitUser-907.100.13/IOCFPlugIn.h $dest
|
||||
cp IOKitUser-907.100.13/IOCFSerialize.h $dest
|
||||
cp IOKitUser-907.100.13/IOCFUnserialize.h $dest
|
||||
cp IOKitUser-907.100.13/IOCFURLAccess.h $dest
|
||||
cp IOKitUser-907.100.13/IODataQueueClient.h $dest
|
||||
cp IOKitUser-907.100.13/IOKitLib.h $dest
|
||||
cp IOKitUser-907.100.13/iokitmig.h $dest
|
||||
cp ${xnu}/Library/PrivateFrameworks/IOKit.framework/Versions/A/Headers/*.h $dest
|
||||
|
||||
# audio: complete
|
||||
cp IOAudioFamily-197.4.2/IOAudioDefines.h $dest/audio
|
||||
cp IOKitUser-907.100.13/audio.subproj/IOAudioLib.h $dest/audio
|
||||
cp IOAudioFamily-197.4.2/IOAudioTypes.h $dest/audio
|
||||
|
||||
# avc: complete
|
||||
cp IOFireWireAVC-422.4.0/IOFireWireAVC/IOFireWireAVCConsts.h $dest/avc
|
||||
cp IOFireWireAVC-422.4.0/IOFireWireAVCLib/IOFireWireAVCLib.h $dest/avc
|
||||
|
||||
# DV: complete
|
||||
cp IOFWDVComponents-207.4.1/DVFamily.h $dest/DV
|
||||
|
||||
# firewire: complete
|
||||
cp IOFireWireFamily-455.4.0/IOFireWireFamily.kmodproj/IOFireWireFamilyCommon.h $dest/firewire
|
||||
cp IOFireWireFamily-455.4.0/IOFireWireLib.CFPlugInProj/IOFireWireLib.h $dest/firewire
|
||||
cp IOFireWireFamily-455.4.0/IOFireWireLib.CFPlugInProj/IOFireWireLibIsoch.h $dest/firewire
|
||||
cp IOFireWireFamily-455.4.0/IOFireWireFamily.kmodproj/IOFWIsoch.h $dest/firewire
|
||||
|
||||
# graphics: missing AppleGraphicsDeviceControlUserCommand.h
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOAccelClientConnect.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOAccelSurfaceConnect.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOAccelTypes.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOFramebufferShared.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOGraphicsEngine.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOGraphicsInterface.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOGraphicsInterfaceTypes.h $dest/graphics
|
||||
cp IOKitUser-907.100.13/graphics.subproj/IOGraphicsLib.h $dest/graphics
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/graphics/IOGraphicsTypes.h $dest/graphics
|
||||
|
||||
# hid: complete
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDBase.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDDevice.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDDevicePlugIn.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDElement.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDLib.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDManager.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDQueue.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDTransaction.h $dest/hid
|
||||
cp IOKitUser-907.100.13/hid.subproj/IOHIDValue.h $dest/hid
|
||||
cp IOHIDFamily-503.215.2/IOHIDFamily/IOHIDKeys.h $dest/hid
|
||||
cp IOHIDFamily-503.215.2/IOHIDFamily/IOHIDUsageTables.h $dest/hid
|
||||
cp IOHIDFamily-503.215.2/IOHIDLib/IOHIDLibObsolete.h $dest/hid
|
||||
|
||||
# hidsystem: complete
|
||||
cp IOHIDFamily-503.215.2/IOHIDSystem/IOKit/hidsystem/ev_keymap.h $dest/hidsystem
|
||||
cp IOKitUser-907.100.13/hidsystem.subproj/event_status_driver.h $dest/hidsystem
|
||||
cp IOKitUser-907.100.13/hidsystem.subproj/IOHIDLib.h $dest/hidsystem
|
||||
cp IOHIDFamily-503.215.2/IOHIDSystem/IOKit/hidsystem/IOHIDParameter.h $dest/hidsystem
|
||||
cp IOHIDFamily-503.215.2/IOHIDSystem/IOKit/hidsystem/IOHIDShared.h $dest/hidsystem
|
||||
cp IOHIDFamily-503.215.2/IOHIDSystem/IOKit/hidsystem/IOHIDTypes.h $dest/hidsystem
|
||||
cp IOHIDFamily-503.215.2/IOHIDSystem/IOKit/hidsystem/IOLLEvent.h $dest/hidsystem
|
||||
|
||||
|
||||
# i2c: complete
|
||||
cp IOGraphics-471.92.1/IOGraphicsFamily/IOKit/i2c/IOI2CInterface.h $dest/i2c
|
||||
|
||||
# kext: complete
|
||||
cp IOKitUser-907.100.13/kext.subproj/KextManager.h $dest/kext
|
||||
|
||||
# ndrvsupport: complete
|
||||
cp IOGraphics-471.92.1/IONDRVSupport/IOKit/ndrvsupport/IOMacOSTypes.h $dest/ndrvsupport
|
||||
cp IOGraphics-471.92.1/IONDRVSupport/IOKit/ndrvsupport/IOMacOSVideo.h $dest/ndrvsupport
|
||||
|
||||
# network: complete
|
||||
cp IONetworkingFamily-100/IOEthernetController.h $dest/network
|
||||
cp IONetworkingFamily-100/IOEthernetInterface.h $dest/network
|
||||
cp IONetworkingFamily-100/IOEthernetStats.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkController.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkData.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkInterface.h $dest/network
|
||||
cp IOKitUser-907.100.13/network.subproj/IONetworkLib.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkMedium.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkStack.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkStats.h $dest/network
|
||||
cp IONetworkingFamily-100/IONetworkUserClient.h $dest/network
|
||||
|
||||
# ps: missing IOUPSPlugIn.h
|
||||
cp IOKitUser-907.100.13/ps.subproj/IOPowerSources.h $dest/ps
|
||||
cp IOKitUser-907.100.13/ps.subproj/IOPSKeys.h $dest/ps
|
||||
|
||||
# pwr_mgt: complete
|
||||
cp IOKitUser-907.100.13/pwr_mgt.subproj/IOPMKeys.h $dest/pwr_mgt
|
||||
cp IOKitUser-907.100.13/pwr_mgt.subproj/IOPMLib.h $dest/pwr_mgt
|
||||
cp ${xnu}/Library/PrivateFrameworks/IOKit.framework/Versions/A/Headers/pwr_mgt/*.h $dest/pwr_mgt
|
||||
cp IOKitUser-907.100.13/pwr_mgt.subproj/IOPMLibPrivate.h $dest/pwr_mgt # Private
|
||||
|
||||
# sbp2: complete
|
||||
cp IOFireWireSBP2-426.4.1/IOFireWireSBP2Lib/IOFireWireSBP2Lib.h $dest/sbp2
|
||||
|
||||
# scsi: omitted for now
|
||||
|
||||
# serial: complete
|
||||
cp IOSerialFamily-64.1.1/IOSerialFamily.kmodproj/IOSerialKeys.h $dest/serial
|
||||
cp IOSerialFamily-64.1.1/IOSerialFamily.kmodproj/ioss.h $dest/serial
|
||||
|
||||
# storage: complete
|
||||
# Needs ata subdirectory
|
||||
cp IOStorageFamily-172/IOAppleLabelScheme.h $dest/storage
|
||||
cp IOStorageFamily-172/IOApplePartitionScheme.h $dest/storage
|
||||
cp IOBDStorageFamily-14/IOBDBlockStorageDevice.h $dest/storage
|
||||
cp IOBDStorageFamily-14/IOBDMedia.h $dest/storage
|
||||
cp IOBDStorageFamily-14/IOBDMediaBSDClient.h $dest/storage
|
||||
cp IOBDStorageFamily-14/IOBDTypes.h $dest/storage
|
||||
cp IOStorageFamily-172/IOBlockStorageDevice.h $dest/storage
|
||||
cp IOStorageFamily-172/IOBlockStorageDriver.h $dest/storage
|
||||
cp IOCDStorageFamily-51/IOCDBlockStorageDevice.h $dest/storage
|
||||
cp IOCDStorageFamily-51/IOCDMedia.h $dest/storage
|
||||
cp IOCDStorageFamily-51/IOCDMediaBSDClient.h $dest/storage
|
||||
cp IOCDStorageFamily-51/IOCDPartitionScheme.h $dest/storage
|
||||
cp IOCDStorageFamily-51/IOCDTypes.h $dest/storage
|
||||
cp IODVDStorageFamily-35/IODVDBlockStorageDevice.h $dest/storage
|
||||
cp IODVDStorageFamily-35/IODVDMedia.h $dest/storage
|
||||
cp IODVDStorageFamily-35/IODVDMediaBSDClient.h $dest/storage
|
||||
cp IODVDStorageFamily-35/IODVDTypes.h $dest/storage
|
||||
cp IOStorageFamily-172/IOFDiskPartitionScheme.h $dest/storage
|
||||
cp IOStorageFamily-172/IOFilterScheme.h $dest/storage
|
||||
cp IOFireWireSerialBusProtocolTransport-251.0.1/IOFireWireStorageCharacteristics.h $dest/storage
|
||||
cp IOStorageFamily-172/IOGUIDPartitionScheme.h $dest/storage
|
||||
cp IOStorageFamily-172/IOMedia.h $dest/storage
|
||||
cp IOStorageFamily-172/IOMediaBSDClient.h $dest/storage
|
||||
cp IOStorageFamily-172/IOPartitionScheme.h $dest/storage
|
||||
cp IOStorageFamily-172/IOStorage.h $dest/storage
|
||||
cp IOStorageFamily-172/IOStorageCardCharacteristics.h $dest/storage
|
||||
cp IOStorageFamily-172/IOStorageDeviceCharacteristics.h $dest/storage
|
||||
cp IOStorageFamily-172/IOStorageProtocolCharacteristics.h $dest/storage
|
||||
|
||||
# stream: missing altogether
|
||||
|
||||
# usb: complete
|
||||
cp IOUSBFamily-630.4.5/IOUSBFamily/Headers/IOUSBLib.h $dest/usb
|
||||
cp IOUSBFamily-630.4.5/IOUSBUserClient/Headers/IOUSBUserClient.h $dest/usb
|
||||
cp IOUSBFamily-560.4.2/IOUSBFamily/Headers/USB.h $dest/usb # This file is empty in 630.4.5!
|
||||
cp IOUSBFamily-630.4.5/IOUSBFamily/Headers/USBSpec.h $dest/usb
|
||||
|
||||
# video: missing altogether
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
maintainers = with maintainers; [ joelteon copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{ stdenv, appleDerivation, ed, unifdef }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ ed unifdef ];
|
||||
|
||||
installPhase = ''
|
||||
export SRCROOT=$PWD
|
||||
export DSTROOT=$out
|
||||
export PUBLIC_HEADERS_FOLDER_PATH=include
|
||||
export PRIVATE_HEADERS_FOLDER_PATH=include
|
||||
bash xcodescripts/headers.sh
|
||||
'';
|
||||
}
|
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
substituteInPlace xcodescripts/install_files.sh \
|
||||
--replace "/usr/local/" "/" \
|
||||
--replace "/usr/" "/" \
|
||||
--replace '-o "$INSTALL_OWNER" -g "$INSTALL_GROUP"' "" \
|
||||
--replace "ln -h" "ln -n"
|
||||
|
||||
export DSTROOT=$out
|
||||
sh xcodescripts/install_files.sh
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
|
||||
cp Source/Intel/math.h $out/include
|
||||
cp Source/Intel/fenv.h $out/include
|
||||
cp Source/complex.h $out/include
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp notify.h $out/include
|
||||
cp notify_keys.h $out/include
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
{ stdenv, appleDerivation, cpio, bootstrap_cmds, xnu, Libc, Libm, libdispatch, cctools, Libinfo,
|
||||
dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto, copyfile,
|
||||
removefile, libresolv, Libnotify, libpthread, mDNSResponder, launchd, version }:
|
||||
|
||||
appleDerivation rec {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ cpio libpthread ];
|
||||
|
||||
systemlibs = [ "cache"
|
||||
"commonCrypto"
|
||||
"compiler_rt"
|
||||
"copyfile"
|
||||
"corecrypto"
|
||||
"dispatch"
|
||||
"dyld"
|
||||
"keymgr"
|
||||
"kxld"
|
||||
"launch"
|
||||
"macho"
|
||||
"quarantine"
|
||||
"removefile"
|
||||
"system_asl"
|
||||
"system_blocks"
|
||||
# "system_c" # special re-export here to hide newer functions
|
||||
"system_configuration"
|
||||
"system_dnssd"
|
||||
"system_info"
|
||||
# "system_kernel" # special re-export here to hide newer functions
|
||||
"system_m"
|
||||
"system_malloc"
|
||||
"system_network"
|
||||
"system_notify"
|
||||
"system_platform"
|
||||
"system_pthread"
|
||||
"system_sandbox"
|
||||
"system_stats"
|
||||
"unc"
|
||||
"unwind"
|
||||
"xpc"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
export NIX_ENFORCE_PURITY=
|
||||
|
||||
mkdir -p $out/lib $out/include
|
||||
|
||||
# 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
|
||||
|
||||
for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \
|
||||
${libdispatch} ${ncurses} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
|
||||
${Libnotify} ${mDNSResponder} ${launchd}; do
|
||||
(cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
|
||||
done
|
||||
|
||||
(cd ${cctools}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
|
||||
|
||||
cat <<EOF > $out/include/TargetConditionals.h
|
||||
#ifndef __TARGETCONDITIONALS__
|
||||
#define __TARGETCONDITIONALS__
|
||||
#define TARGET_OS_MAC 1
|
||||
#define TARGET_OS_WIN32 0
|
||||
#define TARGET_OS_UNIX 0
|
||||
#define TARGET_OS_EMBEDDED 0
|
||||
#define TARGET_OS_IPHONE 0
|
||||
#define TARGET_IPHONE_SIMULATOR 0
|
||||
#define TARGET_OS_LINUX 0
|
||||
|
||||
#define TARGET_CPU_PPC 0
|
||||
#define TARGET_CPU_PPC64 0
|
||||
#define TARGET_CPU_68K 0
|
||||
#define TARGET_CPU_X86 0
|
||||
#define TARGET_CPU_X86_64 1
|
||||
#define TARGET_CPU_ARM 0
|
||||
#define TARGET_CPU_MIPS 0
|
||||
#define TARGET_CPU_SPARC 0
|
||||
#define TARGET_CPU_ALPHA 0
|
||||
#define TARGET_RT_MAC_CFM 0
|
||||
#define TARGET_RT_MAC_MACHO 1
|
||||
#define TARGET_RT_LITTLE_ENDIAN 1
|
||||
#define TARGET_RT_BIG_ENDIAN 0
|
||||
#define TARGET_RT_64_BIT 1
|
||||
#endif /* __TARGETCONDITIONALS__ */
|
||||
EOF
|
||||
|
||||
# The startup object files
|
||||
cp ${Csu}/lib/* $out/lib
|
||||
|
||||
# selectively re-export functions from libsystem_c and libsystem_kernel
|
||||
# to provide a consistent interface across OSX verions
|
||||
mkdir -p $out/lib/system
|
||||
ld -macosx_version_min 10.7 -arch x86_64 -dylib \
|
||||
-o $out/lib/system/libsystem_c.dylib \
|
||||
/usr/lib/libSystem.dylib \
|
||||
-reexported_symbols_list ${./system_c_symbols}
|
||||
|
||||
ld -macosx_version_min 10.7 -arch x86_64 -dylib \
|
||||
-o $out/lib/system/libsystem_kernel.dylib \
|
||||
/usr/lib/libSystem.dylib \
|
||||
-reexported_symbols_list ${./system_kernel_symbols}
|
||||
|
||||
# Set up the actual library link
|
||||
clang -c -o CompatibilityHacks.o -Os CompatibilityHacks.c
|
||||
clang -c -o init.o -Os init.c
|
||||
ld -macosx_version_min 10.7 \
|
||||
-arch x86_64 \
|
||||
-dylib \
|
||||
-o $out/lib/libSystem.dylib \
|
||||
CompatibilityHacks.o init.o \
|
||||
-compatibility_version 1.0 \
|
||||
-current_version ${version} \
|
||||
-reexport_library $out/lib/system/libsystem_c.dylib \
|
||||
-reexport_library $out/lib/system/libsystem_kernel.dylib \
|
||||
${stdenv.lib.concatStringsSep " "
|
||||
(map (l: "-reexport_library /usr/lib/system/lib${l}.dylib") systemlibs)}
|
||||
|
||||
# Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
|
||||
for name in c dbm dl info m mx poll proc pthread rpcsvc gcc_s.10.4 gcc_s.10.5; do
|
||||
ln -s libSystem.dylib $out/lib/lib$name.dylib
|
||||
done
|
||||
|
||||
# This probably doesn't belong here, but we want to stay similar to glibc, which includes resolv internally...
|
||||
cp ${libresolv}/lib/libresolv.9.dylib $out/lib/libresolv.9.dylib
|
||||
resolv_libSystem=$(otool -L "$out/lib/libresolv.9.dylib" | tail -n +3 | grep -o "$NIX_STORE.*-\S*") || true
|
||||
echo $libs
|
||||
|
||||
chmod +w $out/lib/libresolv.9.dylib
|
||||
install_name_tool \
|
||||
-id $out/lib/libresolv.9.dylib \
|
||||
-change "$resolv_libSystem" $out/lib/libSystem.dylib \
|
||||
-delete_rpath ${libresolv}/lib \
|
||||
$out/lib/libresolv.9.dylib
|
||||
ln -s libresolv.9.dylib $out/lib/libresolv.dylib
|
||||
|
||||
otool -L $out/lib/libresolv.dylib
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The Mac OS libc/libSystem (impure symlinks to binaries with pure headers)";
|
||||
maintainers = with maintainers; [ copumpkin gridaphobe ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,929 @@
|
|||
_NDR_record
|
||||
_____old_semwait_signal_nocancel
|
||||
_____sigwait_nocancel
|
||||
____kernelVersionNumber
|
||||
____kernelVersionString
|
||||
___accept
|
||||
___accept_nocancel
|
||||
___access_extended
|
||||
___aio_suspend_nocancel
|
||||
___bind
|
||||
___bsdthread_create
|
||||
___bsdthread_register
|
||||
___bsdthread_terminate
|
||||
___carbon_delete
|
||||
___chmod
|
||||
___chmod_extended
|
||||
___chud
|
||||
___close_nocancel
|
||||
___commpage_gettimeofday
|
||||
___connect
|
||||
___connect_nocancel
|
||||
___copyfile
|
||||
___delete
|
||||
___disable_threadsignal
|
||||
___error
|
||||
___exit
|
||||
___fchmod
|
||||
___fchmod_extended
|
||||
___fcntl
|
||||
___fcntl_nocancel
|
||||
___fork
|
||||
___fsgetpath
|
||||
___fstat64_extended
|
||||
___fstat_extended
|
||||
___fsync_nocancel
|
||||
___get_remove_counter
|
||||
___getattrlist
|
||||
___getdirentries64
|
||||
___gethostuuid
|
||||
___getlcid
|
||||
___getlogin
|
||||
___getpeername
|
||||
___getpid
|
||||
___getrlimit
|
||||
___getsgroups
|
||||
___getsockname
|
||||
___gettid
|
||||
___gettimeofday
|
||||
___getwgroups
|
||||
___guarded_open_np
|
||||
___identitysvc
|
||||
___inc_remove_counter
|
||||
___initgroups
|
||||
___ioctl
|
||||
___iopolicysys
|
||||
___kdebug_trace
|
||||
___kernelVersionNumber
|
||||
___kernelVersionString
|
||||
___kill
|
||||
___lchown
|
||||
___libkernel_init
|
||||
___listen
|
||||
___lseek
|
||||
___lstat64_extended
|
||||
___lstat_extended
|
||||
___mac_execve
|
||||
___mac_get_fd
|
||||
___mac_get_file
|
||||
___mac_get_lcid
|
||||
___mac_get_lctx
|
||||
___mac_get_link
|
||||
___mac_get_mount
|
||||
___mac_get_pid
|
||||
___mac_get_proc
|
||||
___mac_getfsstat
|
||||
___mac_mount
|
||||
___mac_set_fd
|
||||
___mac_set_file
|
||||
___mac_set_lctx
|
||||
___mac_set_link
|
||||
___mac_set_proc
|
||||
___mac_syscall
|
||||
___mkdir_extended
|
||||
___mkfifo_extended
|
||||
___mmap
|
||||
___mprotect
|
||||
___msgctl
|
||||
___msgrcv_nocancel
|
||||
___msgsnd_nocancel
|
||||
___msgsys
|
||||
___msync
|
||||
___msync_nocancel
|
||||
___munmap
|
||||
___old_semwait_signal
|
||||
___open
|
||||
___open_dprotected_np
|
||||
___open_extended
|
||||
___open_nocancel
|
||||
___pipe
|
||||
___poll_nocancel
|
||||
___posix_spawn
|
||||
___pread_nocancel
|
||||
___proc_info
|
||||
___process_policy
|
||||
___psynch_cvbroad
|
||||
___psynch_cvclrprepost
|
||||
___psynch_cvsignal
|
||||
___psynch_cvwait
|
||||
___psynch_mutexdrop
|
||||
___psynch_mutexwait
|
||||
___psynch_rw_downgrade
|
||||
___psynch_rw_longrdlock
|
||||
___psynch_rw_rdlock
|
||||
___psynch_rw_unlock
|
||||
___psynch_rw_unlock2
|
||||
___psynch_rw_upgrade
|
||||
___psynch_rw_wrlock
|
||||
___psynch_rw_yieldwrlock
|
||||
___pthread_canceled
|
||||
___pthread_chdir
|
||||
___pthread_fchdir
|
||||
___pthread_kill
|
||||
___pthread_markcancel
|
||||
___pthread_sigmask
|
||||
___ptrace
|
||||
___pwrite_nocancel
|
||||
___read_nocancel
|
||||
___readv_nocancel
|
||||
___recvfrom
|
||||
___recvfrom_nocancel
|
||||
___recvmsg
|
||||
___recvmsg_nocancel
|
||||
___rename
|
||||
___rmdir
|
||||
___sandbox_me
|
||||
___sandbox_mm
|
||||
___sandbox_ms
|
||||
___sandbox_msp
|
||||
___select
|
||||
___select_nocancel
|
||||
___sem_open
|
||||
___sem_wait_nocancel
|
||||
___semctl
|
||||
___semsys
|
||||
___semwait_signal
|
||||
___semwait_signal_nocancel
|
||||
___sendmsg
|
||||
___sendmsg_nocancel
|
||||
___sendto
|
||||
___sendto_nocancel
|
||||
___setattrlist
|
||||
___setlcid
|
||||
___setlogin
|
||||
___setregid
|
||||
___setreuid
|
||||
___setrlimit
|
||||
___setsgroups
|
||||
___settid
|
||||
___settid_with_pid
|
||||
___settimeofday
|
||||
___setwgroups
|
||||
___shared_region_check_np
|
||||
___shared_region_map_and_slide_np
|
||||
___shm_open
|
||||
___shmctl
|
||||
___shmsys
|
||||
___sigaction
|
||||
___sigaltstack
|
||||
___sigreturn
|
||||
___sigsuspend
|
||||
___sigsuspend_nocancel
|
||||
___sigwait
|
||||
___socketpair
|
||||
___stack_snapshot
|
||||
___stat64_extended
|
||||
___stat_extended
|
||||
___syscall
|
||||
___syscall_logger
|
||||
___sysctl
|
||||
___telemetry
|
||||
___thread_selfid
|
||||
___umask_extended
|
||||
___unlink
|
||||
___vfork
|
||||
___wait4
|
||||
___wait4_nocancel
|
||||
___waitid_nocancel
|
||||
___workq_kernreturn
|
||||
___workq_open
|
||||
___write_nocancel
|
||||
___writev_nocancel
|
||||
__cpu_capabilities
|
||||
__cpu_has_altivec
|
||||
__exit
|
||||
__get_cpu_capabilities
|
||||
__getprivatesystemidentifier
|
||||
__host_page_size
|
||||
__init_cpu_capabilities
|
||||
__kernelrpc_mach_port_allocate
|
||||
__kernelrpc_mach_port_allocate_full
|
||||
__kernelrpc_mach_port_allocate_name
|
||||
__kernelrpc_mach_port_allocate_qos
|
||||
__kernelrpc_mach_port_allocate_trap
|
||||
__kernelrpc_mach_port_construct
|
||||
__kernelrpc_mach_port_construct_trap
|
||||
__kernelrpc_mach_port_deallocate
|
||||
__kernelrpc_mach_port_deallocate_trap
|
||||
__kernelrpc_mach_port_destroy
|
||||
__kernelrpc_mach_port_destroy_trap
|
||||
__kernelrpc_mach_port_destruct
|
||||
__kernelrpc_mach_port_destruct_trap
|
||||
__kernelrpc_mach_port_dnrequest_info
|
||||
__kernelrpc_mach_port_extract_member
|
||||
__kernelrpc_mach_port_extract_member_trap
|
||||
__kernelrpc_mach_port_extract_right
|
||||
__kernelrpc_mach_port_get_attributes
|
||||
__kernelrpc_mach_port_get_context
|
||||
__kernelrpc_mach_port_get_refs
|
||||
__kernelrpc_mach_port_get_set_status
|
||||
__kernelrpc_mach_port_get_srights
|
||||
__kernelrpc_mach_port_guard
|
||||
__kernelrpc_mach_port_guard_trap
|
||||
__kernelrpc_mach_port_insert_member
|
||||
__kernelrpc_mach_port_insert_member_trap
|
||||
__kernelrpc_mach_port_insert_right
|
||||
__kernelrpc_mach_port_insert_right_trap
|
||||
__kernelrpc_mach_port_kernel_object
|
||||
__kernelrpc_mach_port_kobject
|
||||
__kernelrpc_mach_port_mod_refs
|
||||
__kernelrpc_mach_port_mod_refs_trap
|
||||
__kernelrpc_mach_port_move_member
|
||||
__kernelrpc_mach_port_move_member_trap
|
||||
__kernelrpc_mach_port_names
|
||||
__kernelrpc_mach_port_peek
|
||||
__kernelrpc_mach_port_rename
|
||||
__kernelrpc_mach_port_request_notification
|
||||
__kernelrpc_mach_port_set_attributes
|
||||
__kernelrpc_mach_port_set_context
|
||||
__kernelrpc_mach_port_set_mscount
|
||||
__kernelrpc_mach_port_set_seqno
|
||||
__kernelrpc_mach_port_space_info
|
||||
__kernelrpc_mach_port_type
|
||||
__kernelrpc_mach_port_unguard
|
||||
__kernelrpc_mach_port_unguard_trap
|
||||
__kernelrpc_mach_vm_allocate
|
||||
__kernelrpc_mach_vm_allocate_trap
|
||||
__kernelrpc_mach_vm_deallocate
|
||||
__kernelrpc_mach_vm_deallocate_trap
|
||||
__kernelrpc_mach_vm_map
|
||||
__kernelrpc_mach_vm_map_trap
|
||||
__kernelrpc_mach_vm_protect
|
||||
__kernelrpc_mach_vm_protect_trap
|
||||
__kernelrpc_mach_vm_read
|
||||
__kernelrpc_mach_vm_remap
|
||||
__kernelrpc_task_set_port_space
|
||||
__kernelrpc_vm_map
|
||||
__kernelrpc_vm_read
|
||||
__kernelrpc_vm_remap
|
||||
__mach_errors
|
||||
__mach_fork_child
|
||||
__mach_snprintf
|
||||
__mach_vsnprintf
|
||||
__os_alloc_once_table
|
||||
__register_gethostuuid_callback
|
||||
_accept
|
||||
_accept$NOCANCEL
|
||||
_access
|
||||
_accessx_np
|
||||
_acct
|
||||
_act_get_state
|
||||
_act_set_state
|
||||
_adjtime
|
||||
_aio_cancel
|
||||
_aio_error
|
||||
_aio_fsync
|
||||
_aio_read
|
||||
_aio_return
|
||||
_aio_suspend
|
||||
_aio_suspend$NOCANCEL
|
||||
_aio_write
|
||||
_audit
|
||||
_audit_session_join
|
||||
_audit_session_port
|
||||
_audit_session_self
|
||||
_auditctl
|
||||
_auditon
|
||||
_bind
|
||||
_bootstrap_port
|
||||
_cerror
|
||||
_cerror_nocancel
|
||||
_change_fdguard_np
|
||||
_chdir
|
||||
_chflags
|
||||
_chmod
|
||||
_chown
|
||||
_chroot
|
||||
_clock_alarm
|
||||
_clock_alarm_reply
|
||||
_clock_get_attributes
|
||||
_clock_get_time
|
||||
_clock_set_attributes
|
||||
_clock_set_time
|
||||
_clock_sleep
|
||||
_clock_sleep_trap
|
||||
_close
|
||||
_close$NOCANCEL
|
||||
_connect
|
||||
_connect$NOCANCEL
|
||||
_connectx
|
||||
_csops
|
||||
_csops_audittoken
|
||||
_disconnectx
|
||||
_dup
|
||||
_dup2
|
||||
_errno
|
||||
_etap_trace_thread
|
||||
_exc_server
|
||||
_exc_server_routine
|
||||
_exception_raise
|
||||
_exception_raise_state
|
||||
_exception_raise_state_identity
|
||||
_exchangedata
|
||||
_execve
|
||||
_fchdir
|
||||
_fchflags
|
||||
_fchmod
|
||||
_fchown
|
||||
_fcntl
|
||||
_fcntl$NOCANCEL
|
||||
_fdatasync
|
||||
_ffsctl
|
||||
_fgetattrlist
|
||||
_fgetxattr
|
||||
_fhopen
|
||||
_fileport_makefd
|
||||
_fileport_makeport
|
||||
_flistxattr
|
||||
_flock
|
||||
_fpathconf
|
||||
_fremovexattr
|
||||
_fsctl
|
||||
_fsetattrlist
|
||||
_fsetxattr
|
||||
_fstat
|
||||
_fstat$INODE64
|
||||
_fstat64
|
||||
_fstatfs
|
||||
_fstatfs$INODE64
|
||||
_fstatfs64
|
||||
_fsync
|
||||
_fsync$NOCANCEL
|
||||
_ftruncate
|
||||
_futimes
|
||||
_get_dp_control_port
|
||||
_getattrlist
|
||||
_getaudit
|
||||
_getaudit_addr
|
||||
_getauid
|
||||
_getdirentries
|
||||
_getdirentriesattr
|
||||
_getdtablesize
|
||||
_getegid
|
||||
_geteuid
|
||||
_getfh
|
||||
_getfsstat
|
||||
_getfsstat$INODE64
|
||||
_getfsstat64
|
||||
_getgid
|
||||
_getgroups
|
||||
_gethostuuid
|
||||
_getiopolicy_np
|
||||
_getitimer
|
||||
_getpeername
|
||||
_getpgid
|
||||
_getpgrp
|
||||
_getpid
|
||||
_getppid
|
||||
_getpriority
|
||||
_getrlimit
|
||||
_getrusage
|
||||
_getsgroups_np
|
||||
_getsid
|
||||
_getsockname
|
||||
_getsockopt
|
||||
_getuid
|
||||
_getwgroups_np
|
||||
_getxattr
|
||||
_guarded_close_np
|
||||
_guarded_kqueue_np
|
||||
_guarded_open_np
|
||||
_host_default_memory_manager
|
||||
_host_get_UNDServer
|
||||
_host_get_boot_info
|
||||
_host_get_clock_control
|
||||
_host_get_clock_service
|
||||
_host_get_exception_ports
|
||||
_host_get_io_master
|
||||
_host_get_special_port
|
||||
_host_info
|
||||
_host_kernel_version
|
||||
_host_lockgroup_info
|
||||
_host_page_size
|
||||
_host_priv_statistics
|
||||
_host_processor_info
|
||||
_host_processor_set_priv
|
||||
_host_processor_sets
|
||||
_host_processors
|
||||
_host_reboot
|
||||
_host_request_notification
|
||||
_host_security_create_task_token
|
||||
_host_security_set_task_token
|
||||
_host_self
|
||||
_host_self_trap
|
||||
_host_set_UNDServer
|
||||
_host_set_exception_ports
|
||||
_host_set_special_port
|
||||
_host_statistics
|
||||
_host_statistics64
|
||||
_host_swap_exception_ports
|
||||
_host_virtual_physical_table_info
|
||||
_host_zone_info
|
||||
_i386_get_ldt
|
||||
_i386_set_ldt
|
||||
_important_boost_assertion_token
|
||||
_internal_catch_exc_subsystem
|
||||
_ioctl
|
||||
_issetugid
|
||||
_kas_info
|
||||
_kevent
|
||||
_kevent64
|
||||
_kext_request
|
||||
_kill
|
||||
_kmod_control
|
||||
_kmod_create
|
||||
_kmod_destroy
|
||||
_kmod_get_info
|
||||
_kqueue
|
||||
_lchown
|
||||
_ledger
|
||||
_link
|
||||
_lio_listio
|
||||
_listen
|
||||
_listxattr
|
||||
_lock_acquire
|
||||
_lock_handoff
|
||||
_lock_handoff_accept
|
||||
_lock_make_stable
|
||||
_lock_release
|
||||
_lock_set_create
|
||||
_lock_set_destroy
|
||||
_lock_try
|
||||
_lseek
|
||||
_lstat
|
||||
_lstat$INODE64
|
||||
_lstat64
|
||||
_mach_absolute_time
|
||||
_mach_error
|
||||
_mach_error_full_diag
|
||||
_mach_error_string
|
||||
_mach_error_type
|
||||
_mach_host_self
|
||||
_mach_init
|
||||
_mach_make_memory_entry
|
||||
_mach_make_memory_entry_64
|
||||
_mach_memory_object_memory_entry
|
||||
_mach_memory_object_memory_entry_64
|
||||
_mach_msg
|
||||
_mach_msg_destroy
|
||||
_mach_msg_overwrite
|
||||
_mach_msg_overwrite_trap
|
||||
_mach_msg_receive
|
||||
_mach_msg_send
|
||||
_mach_msg_server
|
||||
_mach_msg_server_importance
|
||||
_mach_msg_server_once
|
||||
_mach_msg_trap
|
||||
_mach_notify_dead_name
|
||||
_mach_notify_no_senders
|
||||
_mach_notify_port_deleted
|
||||
_mach_notify_port_destroyed
|
||||
_mach_notify_send_once
|
||||
_mach_port_allocate
|
||||
_mach_port_allocate_full
|
||||
_mach_port_allocate_name
|
||||
_mach_port_allocate_qos
|
||||
_mach_port_construct
|
||||
_mach_port_deallocate
|
||||
_mach_port_destroy
|
||||
_mach_port_destruct
|
||||
_mach_port_dnrequest_info
|
||||
_mach_port_extract_member
|
||||
_mach_port_extract_right
|
||||
_mach_port_get_attributes
|
||||
_mach_port_get_context
|
||||
_mach_port_get_refs
|
||||
_mach_port_get_set_status
|
||||
_mach_port_get_srights
|
||||
_mach_port_guard
|
||||
_mach_port_insert_member
|
||||
_mach_port_insert_right
|
||||
_mach_port_kernel_object
|
||||
_mach_port_kobject
|
||||
_mach_port_mod_refs
|
||||
_mach_port_move_member
|
||||
_mach_port_names
|
||||
_mach_port_peek
|
||||
_mach_port_rename
|
||||
_mach_port_request_notification
|
||||
_mach_port_set_attributes
|
||||
_mach_port_set_context
|
||||
_mach_port_set_mscount
|
||||
_mach_port_set_seqno
|
||||
_mach_port_space_info
|
||||
_mach_port_type
|
||||
_mach_port_unguard
|
||||
_mach_ports_lookup
|
||||
_mach_ports_register
|
||||
_mach_reply_port
|
||||
_mach_task_self
|
||||
_mach_task_self_
|
||||
_mach_thread_self
|
||||
_mach_timebase_info
|
||||
_mach_vm_allocate
|
||||
_mach_vm_behavior_set
|
||||
_mach_vm_copy
|
||||
_mach_vm_deallocate
|
||||
_mach_vm_inherit
|
||||
_mach_vm_machine_attribute
|
||||
_mach_vm_map
|
||||
_mach_vm_msync
|
||||
_mach_vm_page_info
|
||||
_mach_vm_page_query
|
||||
_mach_vm_protect
|
||||
_mach_vm_purgable_control
|
||||
_mach_vm_read
|
||||
_mach_vm_read_list
|
||||
_mach_vm_read_overwrite
|
||||
_mach_vm_region
|
||||
_mach_vm_region_recurse
|
||||
_mach_vm_remap
|
||||
_mach_vm_wire
|
||||
_mach_vm_write
|
||||
_mach_wait_until
|
||||
_mach_zone_force_gc
|
||||
_mach_zone_info
|
||||
_macx_backing_store_recovery
|
||||
_macx_backing_store_suspend
|
||||
_macx_swapoff
|
||||
_macx_swapon
|
||||
_macx_triggers
|
||||
_madvise
|
||||
_memorystatus_control
|
||||
_memorystatus_get_level
|
||||
_mig_allocate
|
||||
_mig_dealloc_reply_port
|
||||
_mig_deallocate
|
||||
_mig_get_reply_port
|
||||
_mig_put_reply_port
|
||||
_mig_reply_setup
|
||||
_mig_strncpy
|
||||
_mincore
|
||||
_minherit
|
||||
_mk_timer_arm
|
||||
_mk_timer_cancel
|
||||
_mk_timer_create
|
||||
_mk_timer_destroy
|
||||
_mkdir
|
||||
_mkfifo
|
||||
_mknod
|
||||
_mlock
|
||||
_mlockall
|
||||
_mmap
|
||||
_modwatch
|
||||
_mount
|
||||
_mprotect
|
||||
_msg_receive
|
||||
_msg_rpc
|
||||
_msg_send
|
||||
_msgctl
|
||||
_msgget
|
||||
_msgrcv
|
||||
_msgrcv$NOCANCEL
|
||||
_msgsnd
|
||||
_msgsnd$NOCANCEL
|
||||
_msgsys
|
||||
_msync
|
||||
_msync$NOCANCEL
|
||||
_munlock
|
||||
_munlockall
|
||||
_munmap
|
||||
_netname_check_in
|
||||
_netname_check_out
|
||||
_netname_look_up
|
||||
_netname_version
|
||||
_nfsclnt
|
||||
_nfssvc
|
||||
_non_boost_assertion_token
|
||||
_normal_boost_assertion_token
|
||||
_open
|
||||
_open$NOCANCEL
|
||||
_open_dprotected_np
|
||||
_panic
|
||||
_panic_init
|
||||
_pathconf
|
||||
_peeloff
|
||||
_pid_for_task
|
||||
_pid_resume
|
||||
_pid_suspend
|
||||
_pipe
|
||||
_poll
|
||||
_poll$NOCANCEL
|
||||
_port_obj_init
|
||||
_port_obj_table
|
||||
_port_obj_table_size
|
||||
_posix_madvise
|
||||
_posix_spawn
|
||||
_posix_spawn_file_actions_addclose
|
||||
_posix_spawn_file_actions_adddup2
|
||||
_posix_spawn_file_actions_addinherit_np
|
||||
_posix_spawn_file_actions_addopen
|
||||
_posix_spawn_file_actions_destroy
|
||||
_posix_spawn_file_actions_init
|
||||
_posix_spawnattr_destroy
|
||||
_posix_spawnattr_getbinpref_np
|
||||
_posix_spawnattr_getcpumonitor
|
||||
_posix_spawnattr_getflags
|
||||
_posix_spawnattr_getmacpolicyinfo_np
|
||||
_posix_spawnattr_getpcontrol_np
|
||||
_posix_spawnattr_getpgroup
|
||||
_posix_spawnattr_getprocesstype_np
|
||||
_posix_spawnattr_getsigdefault
|
||||
_posix_spawnattr_getsigmask
|
||||
_posix_spawnattr_init
|
||||
_posix_spawnattr_set_importancewatch_port_np
|
||||
_posix_spawnattr_setauditsessionport_np
|
||||
_posix_spawnattr_setbinpref_np
|
||||
_posix_spawnattr_setcpumonitor
|
||||
_posix_spawnattr_setcpumonitor_default
|
||||
_posix_spawnattr_setexceptionports_np
|
||||
_posix_spawnattr_setflags
|
||||
_posix_spawnattr_setmacpolicyinfo_np
|
||||
_posix_spawnattr_setpcontrol_np
|
||||
_posix_spawnattr_setpgroup
|
||||
_posix_spawnattr_setprocesstype_np
|
||||
_posix_spawnattr_setsigdefault
|
||||
_posix_spawnattr_setsigmask
|
||||
_posix_spawnattr_setspecialport_np
|
||||
_pread
|
||||
_pread$NOCANCEL
|
||||
_proc_clear_delayidlesleep
|
||||
_proc_clear_vmpressure
|
||||
_proc_disable_apptype
|
||||
_proc_disable_cpumon
|
||||
_proc_disable_wakemon
|
||||
_proc_donate_importance_boost
|
||||
_proc_enable_apptype
|
||||
_proc_get_cpumon_params
|
||||
_proc_get_dirty
|
||||
_proc_get_wakemon_params
|
||||
_proc_importance_assertion_begin_with_msg
|
||||
_proc_importance_assertion_complete
|
||||
_proc_kmsgbuf
|
||||
_proc_libversion
|
||||
_proc_listallpids
|
||||
_proc_listchildpids
|
||||
_proc_listpgrppids
|
||||
_proc_listpids
|
||||
_proc_listpidspath
|
||||
_proc_name
|
||||
_proc_pid_rusage
|
||||
_proc_pidfdinfo
|
||||
_proc_pidfileportinfo
|
||||
_proc_pidinfo
|
||||
_proc_pidpath
|
||||
_proc_regionfilename
|
||||
_proc_rlimit_control
|
||||
_proc_set_cpumon_defaults
|
||||
_proc_set_cpumon_params
|
||||
_proc_set_delayidlesleep
|
||||
_proc_set_dirty
|
||||
_proc_set_owner_vmpressure
|
||||
_proc_set_wakemon_defaults
|
||||
_proc_set_wakemon_params
|
||||
_proc_setpcontrol
|
||||
_proc_suppress
|
||||
_proc_terminate
|
||||
_proc_track_dirty
|
||||
_proc_uuid_policy
|
||||
_processor_assign
|
||||
_processor_control
|
||||
_processor_exit
|
||||
_processor_get_assignment
|
||||
_processor_info
|
||||
_processor_set_create
|
||||
_processor_set_default
|
||||
_processor_set_destroy
|
||||
_processor_set_info
|
||||
_processor_set_max_priority
|
||||
_processor_set_policy_control
|
||||
_processor_set_policy_disable
|
||||
_processor_set_policy_enable
|
||||
_processor_set_stack_usage
|
||||
_processor_set_statistics
|
||||
_processor_set_tasks
|
||||
_processor_set_threads
|
||||
_processor_start
|
||||
_pthread_getugid_np
|
||||
_pthread_setugid_np
|
||||
_ptrace
|
||||
_pwrite
|
||||
_pwrite$NOCANCEL
|
||||
_quota
|
||||
_quotactl
|
||||
_read
|
||||
_read$NOCANCEL
|
||||
_readlink
|
||||
_readv
|
||||
_readv$NOCANCEL
|
||||
_reboot
|
||||
_recvfrom
|
||||
_recvfrom$NOCANCEL
|
||||
_recvmsg
|
||||
_recvmsg$NOCANCEL
|
||||
_removexattr
|
||||
_rename
|
||||
_revoke
|
||||
_rmdir
|
||||
_searchfs
|
||||
_select
|
||||
_select$1050
|
||||
_select$DARWIN_EXTSN
|
||||
_select$DARWIN_EXTSN$NOCANCEL
|
||||
_select$NOCANCEL
|
||||
_sem_close
|
||||
_sem_destroy
|
||||
_sem_getvalue
|
||||
_sem_init
|
||||
_sem_open
|
||||
_sem_post
|
||||
_sem_trywait
|
||||
_sem_unlink
|
||||
_sem_wait
|
||||
_sem_wait$NOCANCEL
|
||||
_semaphore_create
|
||||
_semaphore_destroy
|
||||
_semaphore_signal
|
||||
_semaphore_signal_all
|
||||
_semaphore_signal_all_trap
|
||||
_semaphore_signal_thread
|
||||
_semaphore_signal_thread_trap
|
||||
_semaphore_signal_trap
|
||||
_semaphore_timedwait
|
||||
_semaphore_timedwait_signal
|
||||
_semaphore_timedwait_signal_trap
|
||||
_semaphore_timedwait_trap
|
||||
_semaphore_wait
|
||||
_semaphore_wait_signal
|
||||
_semaphore_wait_signal_trap
|
||||
_semaphore_wait_trap
|
||||
_semctl
|
||||
_semget
|
||||
_semop
|
||||
_semsys
|
||||
_sendfile
|
||||
_sendmsg
|
||||
_sendmsg$NOCANCEL
|
||||
_sendto
|
||||
_sendto$NOCANCEL
|
||||
_set_dp_control_port
|
||||
_setattrlist
|
||||
_setaudit
|
||||
_setaudit_addr
|
||||
_setauid
|
||||
_setegid
|
||||
_seteuid
|
||||
_setgid
|
||||
_setgroups
|
||||
_setiopolicy_np
|
||||
_setitimer
|
||||
_setpgid
|
||||
_setpriority
|
||||
_setprivexec
|
||||
_setquota
|
||||
_setregid
|
||||
_setreuid
|
||||
_setrlimit
|
||||
_setsgroups_np
|
||||
_setsid
|
||||
_setsockopt
|
||||
_setuid
|
||||
_setwgroups_np
|
||||
_setxattr
|
||||
_shm_open
|
||||
_shm_unlink
|
||||
_shmat
|
||||
_shmctl
|
||||
_shmdt
|
||||
_shmget
|
||||
_shmsys
|
||||
_shutdown
|
||||
_sigpending
|
||||
_sigprocmask
|
||||
_sigsuspend
|
||||
_sigsuspend$NOCANCEL
|
||||
_socket
|
||||
_socket_delegate
|
||||
_socketpair
|
||||
_stat
|
||||
_stat$INODE64
|
||||
_stat64
|
||||
_statfs
|
||||
_statfs$INODE64
|
||||
_statfs64
|
||||
_swapon
|
||||
_swtch
|
||||
_swtch_pri
|
||||
_symlink
|
||||
_sync
|
||||
_syscall
|
||||
_syscall_thread_switch
|
||||
_system_override
|
||||
_task_assign
|
||||
_task_assign_default
|
||||
_task_create
|
||||
_task_for_pid
|
||||
_task_get_assignment
|
||||
_task_get_emulation_vector
|
||||
_task_get_exception_ports
|
||||
_task_get_special_port
|
||||
_task_get_state
|
||||
_task_info
|
||||
_task_name_for_pid
|
||||
_task_policy
|
||||
_task_policy_get
|
||||
_task_policy_set
|
||||
_task_purgable_info
|
||||
_task_resume
|
||||
_task_resume2
|
||||
_task_sample
|
||||
_task_self_
|
||||
_task_self_trap
|
||||
_task_set_emulation
|
||||
_task_set_emulation_vector
|
||||
_task_set_exception_ports
|
||||
_task_set_info
|
||||
_task_set_phys_footprint_limit
|
||||
_task_set_policy
|
||||
_task_set_port_space
|
||||
_task_set_ras_pc
|
||||
_task_set_special_port
|
||||
_task_set_state
|
||||
_task_suspend
|
||||
_task_suspend2
|
||||
_task_swap_exception_ports
|
||||
_task_terminate
|
||||
_task_threads
|
||||
_task_zone_info
|
||||
_thread_abort
|
||||
_thread_abort_safely
|
||||
_thread_assign
|
||||
_thread_assign_default
|
||||
_thread_create
|
||||
_thread_create_running
|
||||
_thread_depress_abort
|
||||
_thread_get_assignment
|
||||
_thread_get_exception_ports
|
||||
_thread_get_special_port
|
||||
_thread_get_state
|
||||
_thread_info
|
||||
_thread_policy
|
||||
_thread_policy_get
|
||||
_thread_policy_set
|
||||
_thread_resume
|
||||
_thread_sample
|
||||
_thread_self_trap
|
||||
_thread_set_exception_ports
|
||||
_thread_set_policy
|
||||
_thread_set_special_port
|
||||
_thread_set_state
|
||||
_thread_suspend
|
||||
_thread_swap_exception_ports
|
||||
_thread_switch
|
||||
_thread_terminate
|
||||
_thread_wire
|
||||
_truncate
|
||||
_umask
|
||||
_undelete
|
||||
_unlink
|
||||
_unmount
|
||||
_utimes
|
||||
_vfork
|
||||
_vfs_purge
|
||||
_vm_allocate
|
||||
_vm_allocate_cpm
|
||||
_vm_behavior_set
|
||||
_vm_copy
|
||||
_vm_deallocate
|
||||
_vm_inherit
|
||||
_vm_kernel_page_mask
|
||||
_vm_kernel_page_shift
|
||||
_vm_kernel_page_size
|
||||
_vm_machine_attribute
|
||||
_vm_map
|
||||
_vm_map_page_query
|
||||
_vm_msync
|
||||
_vm_page_mask
|
||||
_vm_page_shift
|
||||
_vm_page_size
|
||||
_vm_pressure_monitor
|
||||
_vm_protect
|
||||
_vm_purgable_control
|
||||
_vm_read
|
||||
_vm_read_list
|
||||
_vm_read_overwrite
|
||||
_vm_region_64
|
||||
_vm_region_recurse_64
|
||||
_vm_remap
|
||||
_vm_wire
|
||||
_vm_write
|
||||
_vprintf_stderr_func
|
||||
_wait4
|
||||
_waitevent
|
||||
_waitid
|
||||
_waitid$NOCANCEL
|
||||
_watchevent
|
||||
_write
|
||||
_write$NOCANCEL
|
||||
_writev
|
||||
_writev$NOCANCEL
|
|
@ -0,0 +1,116 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
__propagatedImpureHostDeps = [
|
||||
"/System/Library/Frameworks/Security.framework/Security"
|
||||
"/System/Library/Frameworks/Security.framework/Resources"
|
||||
"/System/Library/Frameworks/Security.framework/PlugIns"
|
||||
"/System/Library/Frameworks/Security.framework/XPCServices"
|
||||
"/System/Library/Frameworks/Security.framework/Versions"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
###### IMPURITIES
|
||||
mkdir -p $out/Library/Frameworks/Security.framework
|
||||
pushd $out/Library/Frameworks/Security.framework
|
||||
ln -s /System/Library/Frameworks/Security.framework/Security
|
||||
ln -s /System/Library/Frameworks/Security.framework/Resources
|
||||
ln -s /System/Library/Frameworks/Security.framework/PlugIns
|
||||
ln -s /System/Library/Frameworks/Security.framework/XPCServices
|
||||
popd
|
||||
|
||||
###### HEADERS
|
||||
|
||||
export dest=$out/Library/Frameworks/Security.framework/Headers
|
||||
mkdir -p $dest
|
||||
|
||||
cp libsecurity_asn1/lib/SecAsn1Coder.h $dest
|
||||
cp libsecurity_asn1/lib/SecAsn1Templates.h $dest
|
||||
cp libsecurity_asn1/lib/SecAsn1Types.h $dest
|
||||
cp libsecurity_asn1/lib/oidsalg.h $dest
|
||||
cp libsecurity_asn1/lib/oidsattr.h $dest
|
||||
|
||||
cp libsecurity_authorization/lib/AuthSession.h $dest
|
||||
cp libsecurity_authorization/lib/Authorization.h $dest
|
||||
cp libsecurity_authorization/lib/AuthorizationDB.h $dest
|
||||
cp libsecurity_authorization/lib/AuthorizationPlugin.h $dest
|
||||
cp libsecurity_authorization/lib/AuthorizationTags.h $dest
|
||||
|
||||
cp libsecurity_cms/lib/CMSDecoder.h $dest
|
||||
cp libsecurity_cms/lib/CMSEncoder.h $dest
|
||||
|
||||
cp libsecurity_codesigning/lib/CSCommon.h $dest
|
||||
cp libsecurity_codesigning/lib/CodeSigning.h $dest
|
||||
cp libsecurity_codesigning/lib/SecCode.h $dest
|
||||
cp libsecurity_codesigning/lib/SecCodeHost.h $dest
|
||||
cp libsecurity_codesigning/lib/SecRequirement.h $dest
|
||||
cp libsecurity_codesigning/lib/SecStaticCode.h $dest
|
||||
cp libsecurity_codesigning/lib/SecTask.h $dest
|
||||
|
||||
cp libsecurity_cssm/lib/certextensions.h $dest
|
||||
cp libsecurity_cssm/lib/cssm.h $dest
|
||||
cp libsecurity_cssm/lib/cssmaci.h $dest
|
||||
cp libsecurity_cssm/lib/cssmapi.h $dest
|
||||
cp libsecurity_cssm/lib/cssmapple.h $dest
|
||||
cp libsecurity_cssm/lib/cssmcli.h $dest
|
||||
cp libsecurity_cssm/lib/cssmconfig.h $dest
|
||||
cp libsecurity_cssm/lib/cssmcspi.h $dest
|
||||
cp libsecurity_cssm/lib/cssmdli.h $dest
|
||||
cp libsecurity_cssm/lib/cssmerr.h $dest
|
||||
cp libsecurity_cssm/lib/cssmkrapi.h $dest
|
||||
cp libsecurity_cssm/lib/cssmkrspi.h $dest
|
||||
cp libsecurity_cssm/lib/cssmspi.h $dest
|
||||
cp libsecurity_cssm/lib/cssmtpi.h $dest
|
||||
cp libsecurity_cssm/lib/cssmtype.h $dest
|
||||
cp libsecurity_cssm/lib/eisl.h $dest
|
||||
cp libsecurity_cssm/lib/emmspi.h $dest
|
||||
cp libsecurity_cssm/lib/emmtype.h $dest
|
||||
cp libsecurity_cssm/lib/oidsbase.h $dest
|
||||
cp libsecurity_cssm/lib/oidscert.h $dest
|
||||
cp libsecurity_cssm/lib/oidscrl.h $dest
|
||||
cp libsecurity_cssm/lib/x509defs.h $dest
|
||||
|
||||
cp libsecurity_keychain/lib/SecACL.h $dest
|
||||
cp libsecurity_keychain/lib/SecAccess.h $dest
|
||||
cp libsecurity_keychain/lib/SecBase.h $dest
|
||||
cp libsecurity_keychain/lib/SecCertificate.h $dest
|
||||
cp libsecurity_keychain/lib/SecCertificatePriv.h $dest # Private
|
||||
cp libsecurity_keychain/lib/SecCertificateOIDs.h $dest
|
||||
cp libsecurity_keychain/lib/SecIdentity.h $dest
|
||||
cp libsecurity_keychain/lib/SecIdentitySearch.h $dest
|
||||
cp libsecurity_keychain/lib/SecImportExport.h $dest
|
||||
cp libsecurity_keychain/lib/SecItem.h $dest
|
||||
cp libsecurity_keychain/lib/SecKey.h $dest
|
||||
cp libsecurity_keychain/lib/SecKeychain.h $dest
|
||||
cp libsecurity_keychain/lib/SecKeychainItem.h $dest
|
||||
cp libsecurity_keychain/lib/SecKeychainSearch.h $dest
|
||||
cp libsecurity_keychain/lib/SecPolicy.h $dest
|
||||
cp libsecurity_keychain/lib/SecPolicySearch.h $dest
|
||||
cp libsecurity_keychain/lib/SecRandom.h $dest
|
||||
cp libsecurity_keychain/lib/SecTrust.h $dest
|
||||
cp libsecurity_keychain/lib/SecTrustSettings.h $dest
|
||||
cp libsecurity_keychain/lib/SecTrustedApplication.h $dest
|
||||
cp libsecurity_keychain/lib/Security.h $dest
|
||||
|
||||
cp libsecurity_manifest/lib/SecureDownload.h $dest
|
||||
|
||||
cp libsecurity_mds/lib/mds.h $dest
|
||||
cp libsecurity_mds/lib/mds_schema.h $dest
|
||||
|
||||
cp libsecurity_ssl/lib/CipherSuite.h $dest
|
||||
cp libsecurity_ssl/lib/SecureTransport.h $dest
|
||||
|
||||
cp libsecurity_transform/lib/SecCustomTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecDecodeTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecDigestTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecEncodeTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecEncryptTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecReadTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecSignVerifyTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecTransform.h $dest
|
||||
cp libsecurity_transform/lib/SecTransformReadTransform.h $dest
|
||||
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, appleDerivation, version }:
|
||||
|
||||
appleDerivation {
|
||||
# Will override the name until we provide all of adv_cmds
|
||||
name = "ps-${version}";
|
||||
|
||||
buildPhase = ''
|
||||
cd ps
|
||||
cc -Os -Wall -I. -c -o fmt.o fmt.c
|
||||
cc -Os -Wall -I. -c -o keyword.o keyword.c
|
||||
cc -Os -Wall -I. -c -o nlist.o nlist.c
|
||||
cc -Os -Wall -I. -c -o print.o print.c
|
||||
cc -Os -Wall -I. -c -o ps.o ps.c
|
||||
cc -Os -Wall -I. -c -o tasks.o tasks.c
|
||||
cc -o ps fmt.o keyword.o nlist.o print.o ps.o tasks.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
|
||||
cp ps $out/bin/ps
|
||||
cp ps.1 $out/share/man/man1
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
platforms = stdenv.lib.platforms.darwin;
|
||||
maintainers = with stdenv.lib.maintainers; [ gridaphobe ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
postUnpack = ''
|
||||
substituteInPlace $sourceRoot/Makefile \
|
||||
--replace "/usr/include" "/include" \
|
||||
--replace "/usr/bin/" "" \
|
||||
--replace "/bin/" ""
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
export DSTROOT=$out
|
||||
make install
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
{ stdenv, appleDerivation, yacc, flex }:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ yacc flex ];
|
||||
|
||||
buildPhase = ''
|
||||
cd migcom.tproj
|
||||
yacc -d parser.y
|
||||
flex --header-file=lexxer.yy.h -o lexxer.yy.c lexxer.l
|
||||
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o error.o error.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o global.o global.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o handler.o header.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o header.o header.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o mig.o mig.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o routine.o routine.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o server.o server.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o statement.o statement.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o string.o string.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o type.o type.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o user.o user.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o utils.o utils.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o lexxer.yy.o lexxer.yy.c
|
||||
cc -Os -pipe -DMIG_VERSION="" -Wall -mdynamic-no-pic -I. -c -o y.tab.o y.tab.c
|
||||
|
||||
cc -dead_strip -o migcom error.o global.o header.o mig.o routine.o server.o statement.o string.o type.o user.o utils.o lexxer.yy.o y.tab.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec $out/share/man/man1
|
||||
|
||||
chmod +x mig.sh
|
||||
cp mig.sh $out/bin/mig
|
||||
cp migcom $out/libexec
|
||||
cp mig.1 $out/share/man/man1
|
||||
cp migcom.1 $out/share/man/man1
|
||||
|
||||
substituteInPlace $out/bin/mig \
|
||||
--replace 'arch=`/usr/bin/arch`' 'arch=i386' \
|
||||
--replace '/usr/bin/' "" \
|
||||
--replace '/bin/rmdir' "rmdir" \
|
||||
--replace 'C=''${MIGCC}' "C=cc"
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
{ stdenv, appleDerivation, launchd, bootstrap_cmds, xnu, ppp, IOKit, eap8021x, Security }:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ launchd bootstrap_cmds xnu ppp IOKit eap8021x ];
|
||||
|
||||
propagatedBuildInputs = [ Security ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \
|
||||
--replace '#include <xpc/xpc.h>' ""
|
||||
|
||||
substituteInPlace SystemConfiguration.fproj/SCNetworkReachability.c \
|
||||
--replace ''$'#define\tHAVE_VPN_STATUS' ""
|
||||
|
||||
substituteInPlace SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c \
|
||||
--replace '#include <xpc/xpc.h>' '#include "fake_xpc.h"' \
|
||||
--replace '#include <xpc/private.h>' "" \
|
||||
|
||||
# Our neutered CoreFoundation doesn't have this function, but I think we'll live...
|
||||
substituteInPlace SystemConfiguration.fproj/SCNetworkConnectionPrivate.c \
|
||||
--replace 'CFPreferencesAppValueIsForced(serviceID, USER_PREFERENCES_APPLICATION_ID)' 'FALSE' \
|
||||
--replace 'CFPreferencesAppValueIsForced(userPrivate->serviceID, USER_PREFERENCES_APPLICATION_ID)' 'FALSE'
|
||||
|
||||
cat >SystemConfiguration.fproj/fake_xpc.h <<EOF
|
||||
typedef void *xpc_type_t;
|
||||
typedef void *xpc_object_t;
|
||||
typedef void *xpc_connection_t;
|
||||
|
||||
xpc_type_t xpc_get_type(xpc_object_t object);
|
||||
xpc_object_t xpc_dictionary_create(const char * const *keys, const xpc_object_t *values, size_t count);
|
||||
char *xpc_copy_description(xpc_object_t object);
|
||||
int64_t xpc_dictionary_get_int64(xpc_object_t xdict, const char *key);
|
||||
uint64_t xpc_dictionary_get_uint64(xpc_object_t xdict, const char *key);
|
||||
void xpc_connection_set_event_handler(xpc_connection_t connection, void *handler);
|
||||
|
||||
extern const struct _xpc_type_s _xpc_type_error;
|
||||
#define XPC_TYPE_ERROR (&_xpc_type_error)
|
||||
|
||||
extern const struct _xpc_type_s _xpc_type_dictionary;
|
||||
#define XPC_TYPE_DICTIONARY (&_xpc_type_dictionary)
|
||||
|
||||
extern const struct _xpc_type_s _xpc_type_array;
|
||||
#define XPC_TYPE_ARRAY (&_xpc_type_array)
|
||||
|
||||
extern const struct _xpc_dictionary_s _xpc_error_connection_interrupted;
|
||||
#define XPC_ERROR_CONNECTION_INTERRUPTED (&_xpc_error_connection_interrupted)
|
||||
|
||||
extern const struct _xpc_dictionary_s _xpc_error_connection_invalid;
|
||||
#define XPC_ERROR_CONNECTION_INVALID (&_xpc_error_connection_invalid)
|
||||
|
||||
extern const char *const _xpc_error_key_description;
|
||||
#define XPC_ERROR_KEY_DESCRIPTION _xpc_error_key_description
|
||||
|
||||
#define XPC_CONNECTION_MACH_SERVICE_PRIVILEGED (1 << 1)
|
||||
EOF
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
pushd SystemConfiguration.fproj >/dev/null
|
||||
|
||||
mkdir -p SystemConfiguration.framework/Resources
|
||||
cp ../get-mobility-info SystemConfiguration.framework/Resources
|
||||
cp Info.plist SystemConfiguration.framework/Resources
|
||||
cp -r English.lproj SystemConfiguration.framework/Resources
|
||||
cp NetworkConfiguration.plist SystemConfiguration.framework/Resources
|
||||
|
||||
mkdir -p SystemConfiguration.framework/Headers
|
||||
mkdir -p SystemConfiguration.framework/PrivateHeaders
|
||||
|
||||
# The standard public headers
|
||||
cp SCSchemaDefinitions.h SystemConfiguration.framework/Headers
|
||||
cp SystemConfiguration.h SystemConfiguration.framework/Headers
|
||||
cp SCDynamicStore.h SystemConfiguration.framework/Headers
|
||||
cp SCDynamicStoreCopySpecific.h SystemConfiguration.framework/Headers
|
||||
cp SCPreferences.h SystemConfiguration.framework/Headers
|
||||
cp CaptiveNetwork.h SystemConfiguration.framework/Headers
|
||||
cp SCPreferencesPath.h SystemConfiguration.framework/Headers
|
||||
cp SCDynamicStoreKey.h SystemConfiguration.framework/Headers
|
||||
cp SCPreferencesSetSpecific.h SystemConfiguration.framework/Headers
|
||||
cp SCNetworkConfiguration.h SystemConfiguration.framework/Headers
|
||||
cp SCNetworkConnection.h SystemConfiguration.framework/Headers
|
||||
cp SCNetworkReachability.h SystemConfiguration.framework/Headers
|
||||
cp DHCPClientPreferences.h SystemConfiguration.framework/Headers
|
||||
cp SCNetwork.h SystemConfiguration.framework/Headers
|
||||
cp SCDynamicStoreCopyDHCPInfo.h SystemConfiguration.framework/Headers
|
||||
|
||||
# TODO: Do we want to preserve private headers or just make them public?
|
||||
cp SCDPlugin.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCDynamicStorePrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCDynamicStoreCopySpecificPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCDynamicStoreSetSpecificPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCValidation.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCPreferencesPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp DeviceOnHold.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp LinkConfiguration.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCPreferencesPathKey.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCPreferencesSetSpecificPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCNetworkConnectionPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCPreferencesGetSpecificPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCSchemaDefinitionsPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCNetworkConfigurationPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCPreferencesKeychainPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCNetworkSignature.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp SCNetworkSignaturePrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp VPNPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp VPNConfiguration.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp VPNTunnelPrivate.h SystemConfiguration.framework/PrivateHeaders
|
||||
cp VPNTunnel.h SystemConfiguration.framework/PrivateHeaders
|
||||
|
||||
mkdir derived
|
||||
|
||||
cat >derived/SystemConfiguration_vers.c <<EOF
|
||||
const unsigned char SystemConfigurationVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:SystemConfiguration PROJECT:configd-" "\n"; const double SystemConfigurationVersionNumber __attribute__ ((used)) = (double)0.;
|
||||
EOF
|
||||
|
||||
mig -arch x86_64 -header derived/shared_dns_info.h -user derived/shared_dns_infoUser.c -sheader /dev/null -server /dev/null ../dnsinfo/shared_dns_info.defs
|
||||
mig -arch x86_64 -header derived/config.h -user derived/configUser.c -sheader /dev/null -server /dev/null config.defs
|
||||
mig -arch x86_64 -header derived/helper.h -user derived/helperUser.c -sheader /dev/null -server /dev/null helper/helper.defs
|
||||
mig -arch x86_64 -header derived/pppcontroller.h -user derived/pppcontrollerUser.c -sheader /dev/null -server /dev/null pppcontroller.defs
|
||||
|
||||
cc -I. -Ihelper -Iderived -F. -c SCSchemaDefinitions.c -o SCSchemaDefinitions.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCD.c -o SCD.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDKeys.c -o SCDKeys.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDPrivate.c -o SCDPrivate.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDPlugin.c -o SCDPlugin.o
|
||||
cc -I. -Ihelper -Iderived -F. -c CaptiveNetwork.c -o CaptiveNetwork.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDOpen.c -o SCDOpen.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDList.c -o SCDList.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDAdd.c -o SCDAdd.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDGet.c -o SCDGet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDSet.c -o SCDSet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDRemove.c -o SCDRemove.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotify.c -o SCDNotify.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierSetKeys.c -o SCDNotifierSetKeys.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierAdd.c -o SCDNotifierAdd.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierRemove.c -o SCDNotifierRemove.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierGetChanges.c -o SCDNotifierGetChanges.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierWait.c -o SCDNotifierWait.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaCallback.c -o SCDNotifierInformViaCallback.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaFD.c -o SCDNotifierInformViaFD.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaSignal.c -o SCDNotifierInformViaSignal.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierCancel.c -o SCDNotifierCancel.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDSnapshot.c -o SCDSnapshot.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCP.c -o SCP.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPOpen.c -o SCPOpen.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPLock.c -o SCPLock.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPUnlock.c -o SCPUnlock.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPList.c -o SCPList.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPGet.c -o SCPGet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPAdd.c -o SCPAdd.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPSet.c -o SCPSet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPRemove.c -o SCPRemove.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPCommit.c -o SCPCommit.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPApply.c -o SCPApply.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPPath.c -o SCPPath.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDConsoleUser.c -o SCDConsoleUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDHostName.c -o SCDHostName.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCLocation.c -o SCLocation.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetwork.c -o SCNetwork.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/pppcontrollerUser.c -o pppcontrollerUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkConnection.c -o SCNetworkConnection.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkConnectionPrivate.c -o SCNetworkConnectionPrivate.o
|
||||
cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c SCNetworkReachability.c -o SCNetworkReachability.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCProxies.c -o SCProxies.o
|
||||
cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
|
||||
cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
|
||||
cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
|
||||
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c LinkConfiguration.c -o LinkConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
|
||||
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c VLANConfiguration.c -o VLANConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
|
||||
cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkConfigurationInternal.c -o SCNetworkConfigurationInternal.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkInterface.c -o SCNetworkInterface.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
|
||||
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BondConfiguration.c -o BondConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
|
||||
cc -I. -Ihelper -Iderived -F. -c VPNPrivate.c -o VPNPrivate.o
|
||||
cc -I. -Ihelper -Iderived -F. -c VPNConfiguration.c -o VPNConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c VPNTunnel.c -o VPNTunnel.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/helperUser.c -o helperUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c reachability/SCNetworkReachabilityServer_client.c -o SCNetworkReachabilityServer_client.o
|
||||
cc -I. -Ihelper -Iderived -F. -c reachability/rb.c -o rb.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/SystemConfiguration_vers.c -o SystemConfiguration_vers.o
|
||||
|
||||
cc -dynamiclib *.o -install_name $out/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration -dead_strip -framework CoreFoundation -single_module -o SystemConfiguration.framework/SystemConfiguration
|
||||
|
||||
popd >/dev/null
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp dnsinfo/*.h $out/include/
|
||||
|
||||
mkdir -p $out/Library/Frameworks/
|
||||
mv SystemConfiguration.fproj/SystemConfiguration.framework $out/Library/Frameworks
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/
|
||||
cp copyfile.h $out/include/
|
||||
'';
|
||||
}
|
83
pkgs/os-specific/darwin/apple-source-releases/default.nix
Normal file
83
pkgs/os-specific/darwin/apple-source-releases/default.nix
Normal file
|
@ -0,0 +1,83 @@
|
|||
{ stdenv, fetchurl, pkgs }:
|
||||
|
||||
let
|
||||
fetchApple = version: sha256: name: fetchurl {
|
||||
url = "http://www.opensource.apple.com/tarballs/${name}/${name}-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
applePackage = namePath: version: sha256:
|
||||
let
|
||||
name = builtins.elemAt (stdenv.lib.splitString "/" namePath) 0;
|
||||
|
||||
appleDerivation = attrs: stdenv.mkDerivation ({
|
||||
inherit version;
|
||||
name = "${name}-${version}";
|
||||
} // (if attrs ? srcs then {} else {
|
||||
src = fetchApple version sha256 name;
|
||||
}) // attrs);
|
||||
callPackage = pkgs.newScope (packages // pkgs.darwin // { inherit appleDerivation name version; });
|
||||
in callPackage (./. + builtins.toPath "/${namePath}");
|
||||
|
||||
IOKitSpecs = {
|
||||
IOAudioFamily = fetchApple "197.4.2" "1dmrczdmbdkvnhjbv233wx4xczgpf5wjrhr83aizrwpks5avkxbr";
|
||||
IOFireWireFamily = fetchApple "455.4.0" "034n2v6z7lf1cx3sp3309z4sn8mkchjcrsf177iag46yzlzcjgfl";
|
||||
IOFWDVComponents = fetchApple "207.4.1" "1brr0yn6mxgapw3bvlhyissfksifzj2mqsvj9vmps6zwcsxjfw7m";
|
||||
IOFireWireAVC = fetchApple "422.4.0" "1anw8cfmwkavnrs28bzshwa3cwk4r1p3x72561zljx57d0na9164";
|
||||
IOFireWireSBP2 = fetchApple "426.4.1" "0asik6qjhf3jjp22awsiyyd6rj02zwnx47l0afbwmxpn5bchfk60";
|
||||
IOFireWireSerialBusProtocolTransport = fetchApple "251.0.1" "09kiq907qpk94zbij1mrcfcnyyc5ncvlxavxjrj4v5braxm78lhi";
|
||||
IOGraphics = fetchApple "471.92.1" "1c110c9chafy5ilvnc08my9ka530aljggbn66gh3sjsg7lzck9nb";
|
||||
IOHIDFamily = fetchApple "503.215.2" "0nx9mzdw848y6ppcfvip3ybczd1fxkr413zhi9qhw7gnpvac5g3n";
|
||||
IONetworkingFamily = fetchApple "100" "10r769mqq7aiksdsvyz76xjln0lg7dj4pkg2x067ygyf9md55hlz";
|
||||
IOSerialFamily = fetchApple "64.1.1" "1bfkqmg7clwm23byr3iji812j7v1p6565b1ri6p78zviqxnxh7cx";
|
||||
IOStorageFamily = fetchApple "172" "0w5yr8ppl82anwph2zba0ppjji6ipf5x410zhcm1drzwn4bbkxrj";
|
||||
IOBDStorageFamily = fetchApple "14" "1rbvmh311n853j5qb6hfda94vym9wkws5w736w2r7dwbrjyppc1q";
|
||||
IOCDStorageFamily = fetchApple "51" "1905sxwmpxdcnm6yggklc5zimx1558ygm3ycj6b34f9h48xfxzgy";
|
||||
IODVDStorageFamily = fetchApple "35" "1fv82rn199mi998l41c0qpnlp3irhqp2rb7v53pxbx7cra4zx3i6";
|
||||
# There should be an IOStreamFamily project here, but they haven't released it :(
|
||||
IOUSBFamily = fetchApple "630.4.5" "1znqb6frxgab9mkyv7csa08c26p9p0ip6hqb4wm9c7j85kf71f4j"; # This is from 10.8 :(
|
||||
IOUSBFamily_older = fetchApple "560.4.2" "113lmpz8n6sibd27p42h8bl7a6c3myc6zngwri7gnvf8qlajzyml" "IOUSBFamily"; # This is even older :(
|
||||
IOKitUser = fetchApple "907.100.13" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m";
|
||||
# There should be an IOVideo here, but they haven't released it :(
|
||||
};
|
||||
|
||||
IOKitSrcs = stdenv.lib.mapAttrs (name: value: if builtins.isFunction value then value name else value) IOKitSpecs;
|
||||
|
||||
packages = {
|
||||
adv_cmds = applePackage "adv_cmds" "153" "174v6a4zkcm2pafzgdm6kvs48z5f911zl7k49hv7kjq6gm58w99v" {};
|
||||
architecture = applePackage "architecture" "265" "05wz8wmxlqssfp29x203fwfb8pgbdjj1mpz12v508658166yzqj8" {};
|
||||
bootstrap_cmds = applePackage "bootstrap_cmds" "86" "0xr0296jm1r3q7kbam98h85g23qlfi763z54ahj563n636kyk2wb" {};
|
||||
CarbonHeaders = applePackage "CarbonHeaders" "9A581" "1hc0yijlpwq39x5bic6nnywqp2m1wj1f11j33m2q7p505h1h740c" {};
|
||||
CF = applePackage "CF" "855.17" "1sadmxi9fsvsmdyxvg2133sdzvkzwil5fvyyidxsyk1iyfzqsvln" {};
|
||||
CommonCrypto = applePackage "CommonCrypto" "60049" "1azin6w7cnzl0iv8kd2qzgwcp6a45zy64y5z1i6jysjcl6xmlw2h" {};
|
||||
configd = applePackage "configd" "453.19" "1gxakahk8gallf16xmhxhprdxkh3prrmzxnmxfvj0slr0939mmr2" {};
|
||||
copyfile = applePackage "copyfile" "103.92.1" "15i2hw5aqx0fklvmq6avin5s00adacvzqc740vviwc2y742vrdcd" {};
|
||||
CoreOSMakefiles = applePackage "CoreOSMakefiles" "76" "0sw3w3sjil0kvxz8y86b81sz82rcd1nijayki1a1bsnsf0hz6qbf" {};
|
||||
Csu = applePackage "Csu" "79" "1hif4dz23isgx85sgh11yg8amvp2ksvvhz3y5v07zppml7df2lnh" {};
|
||||
dtrace = applePackage "dtrace" "118.1" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" { cctools = pkgs.darwin.cctools_native; };
|
||||
dyld = applePackage "dyld" "239.4" "07z7lyv6x0f6gllb5hymccl31zisrdhz4gqp722xcs9nhsqaqvn7" {};
|
||||
eap8021x = applePackage "eap8021x" "180" "1ynkq8zmhgqhpkdg2syj085lzya0fz55d3423hvf9kcgpbjcd9ic" {};
|
||||
IOKit = applePackage "IOKit" "907.100.13" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; };
|
||||
launchd = applePackage "launchd" "842.92.1" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};
|
||||
libauto = applePackage "libauto" "185.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {};
|
||||
Libc = applePackage "Libc" "997.90.3" "1jz5bx9l4q484vn28c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {};
|
||||
Libc_old = applePackage "Libc/825_40_1.nix" "825.40.1" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {};
|
||||
libclosure = applePackage "libclosure" "63" "083v5xhihkkajj2yvz0dwgbi0jl2qvzk22p7pqq1zp3ry85xagrx" {};
|
||||
libdispatch = applePackage "libdispatch" "339.92.1" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {};
|
||||
libiconv = applePackage "libiconv" "41" "10q7yd35flr893nysn9i04njgks4m3gis7jivb9ra9dcb77gqdcn" {};
|
||||
Libinfo = applePackage "Libinfo" "449.1.3" "1ix6f7xwjnq9bqgv8w27k4j64bqn1mfhh91nc7ciiv55axpdb9hq" {};
|
||||
Libm = applePackage "Libm" "2026" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {};
|
||||
Libnotify = applePackage "Libnotify" "121.20.1" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {};
|
||||
libpthread = applePackage "libpthread" "105.1.4" "09vwwahcvmxvx2xl0890gkp91n61dld29j73y2pa597bqkag2qpg" {};
|
||||
libresolv = applePackage "libresolv" "54" "028mp2smd744ryxwl8cqz4njv8h540sdw3an1yl7yxqcs04r0p4b" {};
|
||||
Libsystem = applePackage "Libsystem" "1197.1.1" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" { cctools = pkgs.darwin.cctools_native; };
|
||||
libunwind = applePackage "libunwind" "35.3" "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {};
|
||||
mDNSResponder = applePackage "mDNSResponder" "522.92.1" "1cp87qda1s7brriv413i71yggm8yqfwv64vknrnqv24fcb8hzbmy" {};
|
||||
objc4 = applePackage "objc4" "551.1" "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg" {};
|
||||
objc4_pure = applePackage "objc4/pure.nix" "551.1" "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg" {};
|
||||
ppp = applePackage "ppp" "727.90.1" "166xz1q7al12hm3q3drlp2r6fgdrsq3pmazjp3nsqg3vnglyh4gk" {};
|
||||
removefile = applePackage "removefile" "33" "0ycvp7cnv40952a1jyhm258p6gg5xzh30x86z5gb204x80knw30y" {};
|
||||
Security = applePackage "Security" "55471.14.18" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
|
||||
xnu = applePackage "xnu" "2422.115.4" "1ssw5fzvgix20bw6y13c39ib0zs7ykpig3irlwbaccpjpci5jl0s" {};
|
||||
};
|
||||
in packages
|
|
@ -0,0 +1,50 @@
|
|||
{ stdenv, appleDerivation, cctools, zlib }:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ cctools zlib ];
|
||||
|
||||
buildPhase = ''
|
||||
export CFLAGS=" -I$PWD/head -I$PWD/sys -I$PWD/libelf -I$PWD/libdwarf"
|
||||
|
||||
pushd libelf
|
||||
for f in *.c; do
|
||||
if [ "$f" != "lintsup.c" ]; then # Apple doesn't use it, so I don't either
|
||||
cc -D_INT64_TYPE -D_LONGLONG_TYPE -D_ILP32 $CFLAGS -c $f
|
||||
fi
|
||||
done
|
||||
libtool -static -o libelf.a *.o
|
||||
popd
|
||||
|
||||
pushd libdwarf
|
||||
./configure CFLAGS="$CFLAGS -Icmplrs"
|
||||
make
|
||||
popd
|
||||
|
||||
cp libelf/libelf.a tools/ctfconvert
|
||||
cp libdwarf/libdwarf.a tools/ctfconvert
|
||||
|
||||
pushd tools/ctfconvert
|
||||
for f in ../../darwin_shim.c *.c; do
|
||||
cc -DNDEBUG -DNS_BLOCK_ASSERTIONS $CFLAGS -c $f
|
||||
done
|
||||
|
||||
export COMMON="alist.o ctf.o darwin_shim.o hash.o iidesc.o input.o list.o \
|
||||
memory.o output.o stack.o strtab.o symbol.o tdata.o traverse.o util.o"
|
||||
|
||||
export CONVERT="ctfconvert.o dwarf.o merge.o st_bugs.o st_parse.o stabs.o"
|
||||
export MERGE="barrier.o ctfmerge.o dwarf.o fifo.o merge.o st_bugs.o st_parse.o stabs.o utils.o"
|
||||
export DUMP="dump.o fifo.o utils.o"
|
||||
|
||||
clang -o ctfconvert $CONVERT $COMMON -L. -lz -lelf -ldwarf
|
||||
clang -o ctfmerge $MERGE $COMMON -L. -lz -lelf -ldwarf
|
||||
clang -o ctfdump $DUMP $COMMON -L. -lz -lelf
|
||||
popd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp tools/ctfconvert/ctfconvert $out/bin
|
||||
cp tools/ctfconvert/ctfmerge $out/bin
|
||||
cp tools/ctfconvert/ctfdump $out/bin
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/include
|
||||
ln -s /usr/lib/dyld $out/lib/dyld
|
||||
cp -r include $out/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Impure primitive symlinks to the Mac OS native dyld, along with headers";
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/Library/Frameworks/EAP8021X.framework/Headers
|
||||
|
||||
cp EAP8021X.fproj/EAPClientProperties.h $out/Library/Frameworks/EAP8021X.framework/Headers
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
# No clue why the same file has two different names. Ask Apple!
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/ $out/include/servers
|
||||
cp liblaunch/*.h $out/include
|
||||
|
||||
cp liblaunch/bootstrap.h $out/include/servers
|
||||
cp liblaunch/bootstrap.h $out/include/servers/bootstrap_defs.h
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Generated by dtrace(1M).
|
||||
*/
|
||||
|
||||
#ifndef _AUTO_DTRACE_H
|
||||
#define _AUTO_DTRACE_H
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GARBAGE_COLLECTION_STABILITY "___dtrace_stability$garbage_collection$v1$1_1_0_1_1_0_1_1_0_1_1_0_1_1_0"
|
||||
|
||||
#define GARBAGE_COLLECTION_TYPEDEFS "___dtrace_typedefs$garbage_collection$v2$6175746f5f636f6c6c656374696f6e5f70686173655f74$6175746f5f636f6c6c656374696f6e5f747970655f74$6d616c6c6f635f7a6f6e655f74"
|
||||
|
||||
#if !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED
|
||||
|
||||
#define GARBAGE_COLLECTION_AUTO_BLOCK_LOST_THREAD_LOCALITY(arg0, arg1) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_TYPEDEFS); \
|
||||
__dtrace_probe$garbage_collection$auto_block_lost_thread_locality$v1$766f6964202a$75696e7436345f74(arg0, arg1); \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_STABILITY); \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_AUTO_BLOCK_LOST_THREAD_LOCALITY_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$garbage_collection$auto_block_lost_thread_locality$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
#define GARBAGE_COLLECTION_AUTO_REFCOUNT_ONE_ALLOCATION(arg0) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_TYPEDEFS); \
|
||||
__dtrace_probe$garbage_collection$auto_refcount_one_allocation$v1$75696e7436345f74(arg0); \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_STABILITY); \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_AUTO_REFCOUNT_ONE_ALLOCATION_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$garbage_collection$auto_refcount_one_allocation$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
#define GARBAGE_COLLECTION_COLLECTION_BEGIN(arg0, arg1) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_TYPEDEFS); \
|
||||
__dtrace_probe$garbage_collection$collection_begin$v1$6d616c6c6f635f7a6f6e655f74202a$6175746f5f636f6c6c656374696f6e5f747970655f74(arg0, arg1); \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_STABILITY); \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_BEGIN_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$garbage_collection$collection_begin$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
#define GARBAGE_COLLECTION_COLLECTION_END(arg0, arg1, arg2, arg3, arg4) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_TYPEDEFS); \
|
||||
__dtrace_probe$garbage_collection$collection_end$v1$6d616c6c6f635f7a6f6e655f74202a$75696e7436345f74$75696e7436345f74$75696e7436345f74$75696e7436345f74(arg0, arg1, arg2, arg3, arg4); \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_STABILITY); \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_END_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$garbage_collection$collection_end$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_BEGIN(arg0, arg1) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_TYPEDEFS); \
|
||||
__dtrace_probe$garbage_collection$collection_phase_begin$v1$6d616c6c6f635f7a6f6e655f74202a$6175746f5f636f6c6c656374696f6e5f70686173655f74(arg0, arg1); \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_STABILITY); \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_BEGIN_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$garbage_collection$collection_phase_begin$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_END(arg0, arg1, arg2, arg3) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_TYPEDEFS); \
|
||||
__dtrace_probe$garbage_collection$collection_phase_end$v1$6d616c6c6f635f7a6f6e655f74202a$6175746f5f636f6c6c656374696f6e5f70686173655f74$75696e7436345f74$75696e7436345f74(arg0, arg1, arg2, arg3); \
|
||||
__asm__ volatile(".reference " GARBAGE_COLLECTION_STABILITY); \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_END_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$garbage_collection$collection_phase_end$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
|
||||
|
||||
extern void __dtrace_probe$garbage_collection$auto_block_lost_thread_locality$v1$766f6964202a$75696e7436345f74(const void *, uint64_t);
|
||||
extern int __dtrace_isenabled$garbage_collection$auto_block_lost_thread_locality$v1(void);
|
||||
extern void __dtrace_probe$garbage_collection$auto_refcount_one_allocation$v1$75696e7436345f74(uint64_t);
|
||||
extern int __dtrace_isenabled$garbage_collection$auto_refcount_one_allocation$v1(void);
|
||||
extern void __dtrace_probe$garbage_collection$collection_begin$v1$6d616c6c6f635f7a6f6e655f74202a$6175746f5f636f6c6c656374696f6e5f747970655f74(const malloc_zone_t *, auto_collection_type_t);
|
||||
extern int __dtrace_isenabled$garbage_collection$collection_begin$v1(void);
|
||||
extern void __dtrace_probe$garbage_collection$collection_end$v1$6d616c6c6f635f7a6f6e655f74202a$75696e7436345f74$75696e7436345f74$75696e7436345f74$75696e7436345f74(const malloc_zone_t *, uint64_t, uint64_t, uint64_t, uint64_t);
|
||||
extern int __dtrace_isenabled$garbage_collection$collection_end$v1(void);
|
||||
extern void __dtrace_probe$garbage_collection$collection_phase_begin$v1$6d616c6c6f635f7a6f6e655f74202a$6175746f5f636f6c6c656374696f6e5f70686173655f74(const malloc_zone_t *, auto_collection_phase_t);
|
||||
extern int __dtrace_isenabled$garbage_collection$collection_phase_begin$v1(void);
|
||||
extern void __dtrace_probe$garbage_collection$collection_phase_end$v1$6d616c6c6f635f7a6f6e655f74202a$6175746f5f636f6c6c656374696f6e5f70686173655f74$75696e7436345f74$75696e7436345f74(const malloc_zone_t *, auto_collection_phase_t, uint64_t, uint64_t);
|
||||
extern int __dtrace_isenabled$garbage_collection$collection_phase_end$v1(void);
|
||||
|
||||
#else
|
||||
|
||||
#define GARBAGE_COLLECTION_AUTO_BLOCK_LOST_THREAD_LOCALITY(arg0, arg1) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_AUTO_BLOCK_LOST_THREAD_LOCALITY_ENABLED() (0)
|
||||
#define GARBAGE_COLLECTION_AUTO_REFCOUNT_ONE_ALLOCATION(arg0) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_AUTO_REFCOUNT_ONE_ALLOCATION_ENABLED() (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_BEGIN(arg0, arg1) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_BEGIN_ENABLED() (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_END(arg0, arg1, arg2, arg3, arg4) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_END_ENABLED() (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_BEGIN(arg0, arg1) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_BEGIN_ENABLED() (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_END(arg0, arg1, arg2, arg3) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define GARBAGE_COLLECTION_COLLECTION_PHASE_END_ENABLED() (0)
|
||||
|
||||
#endif /* !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AUTO_DTRACE_H */
|
|
@ -0,0 +1,74 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
buildPhase = ''
|
||||
cp ${./auto_dtrace.h} ./auto_dtrace.h
|
||||
|
||||
substituteInPlace auto_zone.cpp \
|
||||
--replace "#include <msgtracer_client.h>" ''$'#include <asl.h>\nstatic void msgtracer_log_with_keys(...) { };'
|
||||
|
||||
substituteInPlace Definitions.h \
|
||||
--replace "#include <System/pthread_machdep.h>" ""
|
||||
|
||||
# getspecific_direct is more efficient, but this should be equivalent...
|
||||
substituteInPlace Zone.h \
|
||||
--replace "_pthread_getspecific_direct" "pthread_getspecific" \
|
||||
--replace "_pthread_has_direct_tsd()" "0" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY0" "110" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY1" "111" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY2" "112" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY3" "113" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY4" "114" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY5" "115" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY6" "116" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY7" "117" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY8" "118" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY9" "119"
|
||||
|
||||
substituteInPlace auto_zone.cpp \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY9" "119" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY0" "110" \
|
||||
|
||||
substituteInPlace Zone.cpp \
|
||||
--replace "_pthread_getspecific_direct" "pthread_getspecific" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY9" "119" \
|
||||
--replace "__PTK_FRAMEWORK_GC_KEY0" "110" \
|
||||
--replace "__PTK_LIBDISPATCH_KEY0" "20" \
|
||||
--replace "struct auto_zone_cursor {" ''$'extern "C" int pthread_key_init_np(int, void (*)(void *));\nstruct auto_zone_cursor {'
|
||||
|
||||
substituteInPlace auto_impl_utilities.c \
|
||||
--replace "# include <CrashReporterClient.h>" "void CRSetCrashLogMessage(void *msg) { };"
|
||||
|
||||
c++ -I. -O3 -c -Wno-c++11-extensions auto_zone.cpp
|
||||
cc -I. -O3 -Iauto_tester -c auto_impl_utilities.c
|
||||
c++ -I. -O3 -c auto_weak.cpp
|
||||
c++ -I. -O3 -c Admin.cpp
|
||||
c++ -I. -O3 -c Bitmap.cpp
|
||||
c++ -I. -O3 -c Definitions.cpp
|
||||
c++ -I. -O3 -c Environment.cpp
|
||||
c++ -I. -O3 -c Large.cpp
|
||||
c++ -I. -O3 -c Region.cpp
|
||||
c++ -I. -O3 -c Subzone.cpp
|
||||
c++ -I. -O3 -c WriteBarrier.cpp
|
||||
c++ -I. -O3 -c Zone.cpp
|
||||
c++ -I. -O3 -c Thread.cpp
|
||||
c++ -I. -O3 -c InUseEnumerator.cpp
|
||||
c++ -I. -O3 -c auto_gdb_interface.cpp
|
||||
c++ -I. -O3 -c PointerHash.cpp
|
||||
c++ -I. -O3 -c ThreadLocalCollector.cpp
|
||||
c++ -I. -O3 -c ZoneDump.cpp
|
||||
c++ -I. -O3 -c ZoneCollectors.cpp
|
||||
c++ -I. -O3 -c SubzonePartition.cpp
|
||||
c++ -I. -O3 -c ZoneCollectionChecking.cpp
|
||||
c++ -I. -O3 -c ZoneCompaction.cpp
|
||||
c++ -I. -O3 -c BlockRef.cpp
|
||||
|
||||
c++ -Wl,-no_dtrace_dof --stdlib=libc++ -dynamiclib -install_name $out/lib/libauto.dylib -o libauto.dylib *.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/include
|
||||
cp auto_zone.h auto_weak.h auto_tester/auto_tester.h auto_gdb_interface.h $out/include
|
||||
cp libauto.dylib $out/lib
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp *.h $out/include/
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/dispatch $out/include/os
|
||||
|
||||
cp -r dispatch/*.h $out/include/dispatch
|
||||
cp -r private/*.h $out/include/dispatch
|
||||
cp -r os/object.h $out/include/os
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
preConfigure = "cd libiconv";
|
||||
|
||||
postInstall = ''
|
||||
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
|
||||
install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
|
||||
|
||||
ld -dylib -o $out/lib/libiconv.dylib \
|
||||
-reexport_library $out/lib/libiconv-nocharset.dylib \
|
||||
-reexport_library $out/lib/libcharset.dylib \
|
||||
-dylib_compatibility_version 7.0.0
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ stdenv, appleDerivation, libdispatch, xnu }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
propagatedBuildInputs = [ libdispatch xnu ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/pthread
|
||||
cp pthread/*.h $out/include/pthread/
|
||||
cp private/*.h $out/include/pthread/
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
{ stdenv, appleDerivation, Libinfo, configd, mDNSResponder }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ Libinfo configd mDNSResponder ];
|
||||
|
||||
buildPhase = ''
|
||||
cc -I. -c dns_util.c
|
||||
cc -I. -c dns.c
|
||||
cc -I. -c dns_async.c
|
||||
cc -I. -c base64.c
|
||||
cc -I. -c dst_api.c
|
||||
cc -I. -c dst_hmac_link.c
|
||||
cc -I. -c dst_support.c
|
||||
cc -I. -c ns_date.c
|
||||
cc -I. -c ns_name.c
|
||||
cc -I. -c ns_netint.c
|
||||
cc -I. -c ns_parse.c
|
||||
cc -I. -c ns_print.c
|
||||
cc -I. -c ns_samedomain.c
|
||||
cc -I. -c ns_sign.c
|
||||
cc -I. -c ns_ttl.c
|
||||
cc -I. -c ns_verify.c
|
||||
cc -I. -c res_comp.c
|
||||
cc -I. -c res_data.c
|
||||
cc -I. -c res_debug.c
|
||||
cc -I. -c res_findzonecut.c
|
||||
cc -I. -c res_init.c
|
||||
cc -I. -c res_mkquery.c
|
||||
cc -I. -c res_mkupdate.c
|
||||
cc -I. -c res_query.c
|
||||
cc -I. -c res_send.c
|
||||
cc -I. -c res_sendsigned.c
|
||||
cc -I. -c res_update.c
|
||||
cc -dynamiclib -install_name $out/lib/libresolv.9.dylib -o libresolv.9.dylib *.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include $out/include/arpa $out/lib
|
||||
|
||||
cp dns.h $out/include/
|
||||
cp dns_util.h $out/include
|
||||
cp nameser.h $out/include
|
||||
ln -s ../nameser.h $out/include/arpa
|
||||
cp resolv.h $out/include
|
||||
|
||||
cp libresolv.9.dylib $out/lib
|
||||
ln -s libresolv.9.dylib $out/lib/libresolv.dylib
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, appleDerivation, dyld }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ dyld ];
|
||||
|
||||
buildPhase = ''
|
||||
# cd src
|
||||
# cc -I$PWD/../include -c libuwind.cxx
|
||||
# cc -I$PWD/../include -c Registers.s
|
||||
# cc -I$PWD/../include -c unw_getcontext.s
|
||||
# cc -I$PWD/../include -c UnwindLevel1.c
|
||||
# cc -I$PWD/../include -c UnwindLevel1-gcc-ext.c
|
||||
# cc -I$PWD/../include -c Unwind-sjlj.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
|
||||
cp -r include $out
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp mDNSShared/dns_sd.h $out/include
|
||||
'';
|
||||
}
|
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Generated by dtrace(1M).
|
||||
*/
|
||||
|
||||
#ifndef _OBJC_PROBES_H
|
||||
#define _OBJC_PROBES_H
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OBJC_RUNTIME_STABILITY "___dtrace_stability$objc_runtime$v1$1_1_0_1_1_0_1_1_0_1_1_0_1_1_0"
|
||||
|
||||
#define OBJC_RUNTIME_TYPEDEFS "___dtrace_typedefs$objc_runtime$v2"
|
||||
|
||||
#if !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED
|
||||
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_RETHROW() \
|
||||
do { \
|
||||
__asm__ volatile(".reference " OBJC_RUNTIME_TYPEDEFS); \
|
||||
__dtrace_probe$objc_runtime$objc_exception_rethrow$v1(); \
|
||||
__asm__ volatile(".reference " OBJC_RUNTIME_STABILITY); \
|
||||
} while (0)
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_RETHROW_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$objc_runtime$objc_exception_rethrow$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_THROW(arg0) \
|
||||
do { \
|
||||
__asm__ volatile(".reference " OBJC_RUNTIME_TYPEDEFS); \
|
||||
__dtrace_probe$objc_runtime$objc_exception_throw$v1$766f6964202a(arg0); \
|
||||
__asm__ volatile(".reference " OBJC_RUNTIME_STABILITY); \
|
||||
} while (0)
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_THROW_ENABLED() \
|
||||
({ int _r = __dtrace_isenabled$objc_runtime$objc_exception_throw$v1(); \
|
||||
__asm__ volatile(""); \
|
||||
_r; })
|
||||
|
||||
|
||||
extern void __dtrace_probe$objc_runtime$objc_exception_rethrow$v1(void);
|
||||
extern int __dtrace_isenabled$objc_runtime$objc_exception_rethrow$v1(void);
|
||||
extern void __dtrace_probe$objc_runtime$objc_exception_throw$v1$766f6964202a(const void *);
|
||||
extern int __dtrace_isenabled$objc_runtime$objc_exception_throw$v1(void);
|
||||
|
||||
#else
|
||||
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_RETHROW() \
|
||||
do { \
|
||||
} while (0)
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_RETHROW_ENABLED() (0)
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_THROW(arg0) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define OBJC_RUNTIME_OBJC_EXCEPTION_THROW_ENABLED() (0)
|
||||
|
||||
#endif /* !defined(DTRACE_PROBES_DISABLED) || !DTRACE_PROBES_DISABLED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _OBJC_PROBES_H */
|
118
pkgs/os-specific/darwin/apple-source-releases/objc4/pure.nix
Normal file
118
pkgs/os-specific/darwin/apple-source-releases/objc4/pure.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{ stdenv, fetchapplesource, libauto, launchd, libc_old, libunwind }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "551.1";
|
||||
name = "objc4-${version}";
|
||||
|
||||
src = fetchapplesource {
|
||||
inherit version;
|
||||
name = "objc4";
|
||||
sha256 = "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg";
|
||||
};
|
||||
|
||||
patches = [ ./spinlocks.patch ];
|
||||
|
||||
buildInputs = [ libauto launchd libc_old libunwind ];
|
||||
|
||||
buildPhase = ''
|
||||
cp ${./objc-probes.h} runtime/objc-probes.h
|
||||
|
||||
mkdir -p build/include/objc
|
||||
|
||||
cp runtime/hashtable.h build/include/objc/hashtable.h
|
||||
cp runtime/OldClasses.subproj/List.h build/include/objc/List.h
|
||||
cp runtime/hashtable2.h build/include/objc/hashtable2.h
|
||||
cp runtime/message.h build/include/objc/message.h
|
||||
cp runtime/objc-api.h build/include/objc/objc-api.h
|
||||
cp runtime/objc-auto.h build/include/objc/objc-auto.h
|
||||
cp runtime/objc-class.h build/include/objc/objc-class.h
|
||||
cp runtime/objc-exception.h build/include/objc/objc-exception.h
|
||||
cp runtime/objc-load.h build/include/objc/objc-load.h
|
||||
cp runtime/objc-sync.h build/include/objc/objc-sync.h
|
||||
cp runtime/objc.h build/include/objc/objc.h
|
||||
cp runtime/objc-runtime.h build/include/objc/objc-runtime.h
|
||||
cp runtime/Object.h build/include/objc/Object.h
|
||||
cp runtime/Protocol.h build/include/objc/Protocol.h
|
||||
cp runtime/runtime.h build/include/objc/runtime.h
|
||||
cp runtime/NSObject.h build/include/objc/NSObject.h
|
||||
cp runtime/NSObjCRuntime.h build/include/objc/NSObjCRuntime.h
|
||||
|
||||
# These would normally be in local/include but we don't do local, so they're
|
||||
# going in with the others
|
||||
cp runtime/maptable.h build/include/objc/maptable.h
|
||||
cp runtime/objc-abi.h build/include/objc/objc-abi.h
|
||||
cp runtime/objc-auto-dump.h build/include/objc/objc-auto-dump.h
|
||||
cp runtime/objc-gdb.h build/include/objc/objc-gdb.h
|
||||
cp runtime/objc-internal.h build/include/objc/objc-internal.h
|
||||
|
||||
cc -o markgc markgc.c
|
||||
|
||||
FLAGS="-Wno-deprecated-register -Wno-unknown-pragmas -Wno-deprecated-objc-isa-usage -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-cast-of-sel-type -Iruntime -Ibuild/include -Iruntime/Accessors.subproj -D_LIBCPP_VISIBLE= -DOS_OBJECT_USE_OBJC=0 -DNDEBUG=1"
|
||||
|
||||
cc -std=gnu++11 $FLAGS -c runtime/hashtable2.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/maptable.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-auto.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-cache.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-class-old.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-class.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-errors.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-exception.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-file.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-initialize.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-layout.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-load.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-loadmethod.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-lockdebug.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-runtime-new.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-runtime-old.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-runtime.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-sel-set.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-sel.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-sync.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-typeencoding.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/Object.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/Protocol.mm
|
||||
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-references.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-os.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-auto-dump.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-file-old.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-block-trampolines.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-externalref.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-weak.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/NSObject.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-opt.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-cache-old.mm
|
||||
cc -std=gnu++11 $FLAGS -c runtime/objc-sel-old.mm
|
||||
|
||||
cc -std=gnu++11 $FLAGS -c runtime/Accessors.subproj/objc-accessors.mm
|
||||
|
||||
cc $FLAGS -c runtime/objc-sel-table.s
|
||||
|
||||
cc $FLAGS -c runtime/OldClasses.subproj/List.m
|
||||
cc $FLAGS -c runtime/Messengers.subproj/objc-msg-arm.s
|
||||
cc $FLAGS -c runtime/Messengers.subproj/objc-msg-i386.s
|
||||
cc $FLAGS -c runtime/Messengers.subproj/objc-msg-x86_64.s
|
||||
cc $FLAGS -c runtime/Messengers.subproj/objc-msg-simulator-i386.s
|
||||
|
||||
cc $FLAGS -c runtime/a1a2-blocktramps-i386.s
|
||||
cc $FLAGS -c runtime/a2a3-blocktramps-i386.s
|
||||
|
||||
cc $FLAGS -c runtime/a1a2-blocktramps-x86_64.s
|
||||
cc $FLAGS -c runtime/a2a3-blocktramps-x86_64.s
|
||||
|
||||
cc $FLAGS -c runtime/a1a2-blocktramps-arm.s
|
||||
cc $FLAGS -c runtime/a2a3-blocktramps-arm.s
|
||||
|
||||
c++ -Wl,-no_dtrace_dof --stdlib=libc++ -dynamiclib -lauto -install_name $out/lib/libobjc.dylib -o libobjc.dylib *.o
|
||||
|
||||
./markgc -p libobjc.dylib
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include $out/lib
|
||||
|
||||
mv build/include/objc $out/include
|
||||
mv libobjc.dylib $out/lib
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
--- objc4-551.1/runtime/objc-os.h 2013-06-10 21:16:15.000000000 -0400
|
||||
+++ ../objc4-551.1/runtime/objc-os.h 2015-01-19 01:01:36.000000000 -0500
|
||||
@@ -77,27 +77,72 @@
|
||||
# include <mach-o/getsect.h>
|
||||
# include <mach-o/dyld_priv.h>
|
||||
# include <malloc/malloc.h>
|
||||
-# include <os/lock_private.h>
|
||||
# include <libkern/OSAtomic.h>
|
||||
# include <libkern/OSCacheControl.h>
|
||||
-# include <System/pthread_machdep.h>
|
||||
# include "objc-probes.h" // generated dtrace probe definitions.
|
||||
|
||||
+#define __PTK_FRAMEWORK_OBJC_KEY5 45
|
||||
+#define __PTK_FRAMEWORK_OBJC_KEY6 46
|
||||
+#define __PTK_FRAMEWORK_OBJC_KEY7 47
|
||||
+#define __PTK_FRAMEWORK_OBJC_KEY8 48
|
||||
+#define __PTK_FRAMEWORK_OBJC_KEY9 49
|
||||
+
|
||||
+extern "C" int pthread_key_init_np(int, void (*)(void *));
|
||||
+
|
||||
// Some libc functions call objc_msgSend()
|
||||
// so we can't use them without deadlocks.
|
||||
void syslog(int, const char *, ...) UNAVAILABLE_ATTRIBUTE;
|
||||
void vsyslog(int, const char *, va_list) UNAVAILABLE_ATTRIBUTE;
|
||||
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
+
|
||||
+// Inlined spinlock.
|
||||
+// Not for arm on iOS because it hurts uniprocessor performance.
|
||||
+
|
||||
+#define ARR_SPINLOCK_INIT 0
|
||||
+// XXX -- Careful: OSSpinLock isn't volatile, but should be
|
||||
+typedef volatile int ARRSpinLock;
|
||||
+__attribute__((always_inline))
|
||||
+static inline void ARRSpinLockLock(ARRSpinLock *l)
|
||||
+{
|
||||
+ unsigned y;
|
||||
+again:
|
||||
+ if (__builtin_expect(__sync_lock_test_and_set(l, 1), 0) == 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ for (y = 1000; y; y--) {
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
+ asm("pause");
|
||||
+#endif
|
||||
+ if (*l == 0) goto again;
|
||||
+ }
|
||||
+ thread_switch(THREAD_NULL, SWITCH_OPTION_DEPRESS, 1);
|
||||
+ goto again;
|
||||
+}
|
||||
+__attribute__((always_inline))
|
||||
+static inline void ARRSpinLockUnlock(ARRSpinLock *l)
|
||||
+{
|
||||
+ __sync_lock_release(l);
|
||||
+}
|
||||
+__attribute__((always_inline))
|
||||
+static inline int ARRSpinLockTry(ARRSpinLock *l)
|
||||
+{
|
||||
+ return __sync_bool_compare_and_swap(l, 0, 1);
|
||||
+}
|
||||
+
|
||||
+#define spinlock_t ARRSpinLock
|
||||
+#define spinlock_trylock(l) ARRSpinLockTry(l)
|
||||
+#define spinlock_lock(l) ARRSpinLockLock(l)
|
||||
+#define spinlock_unlock(l) ARRSpinLockUnlock(l)
|
||||
+#define SPINLOCK_INITIALIZER ARR_SPINLOCK_INIT
|
||||
|
||||
-#define spinlock_t os_lock_handoff_s
|
||||
-#define spinlock_trylock(l) os_lock_trylock(l)
|
||||
-#define spinlock_lock(l) os_lock_lock(l)
|
||||
-#define spinlock_unlock(l) os_lock_unlock(l)
|
||||
-#define SPINLOCK_INITIALIZER OS_LOCK_HANDOFF_INIT
|
||||
+#endif
|
||||
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
-# include <CrashReporterClient.h>
|
||||
+#define CRSetCrashLogMessage(msg)
|
||||
+#define CRGetCrashLogMessage() 0
|
||||
+#define CRSetCrashLogMessage2(msg)
|
||||
#else
|
||||
// CrashReporterClient not yet available on iOS
|
||||
__BEGIN_DECLS
|
||||
@@ -594,21 +639,13 @@
|
||||
{
|
||||
assert(is_valid_direct_key(k));
|
||||
|
||||
- if (_pthread_has_direct_tsd()) {
|
||||
- return _pthread_getspecific_direct(k);
|
||||
- } else {
|
||||
- return pthread_getspecific(k);
|
||||
- }
|
||||
+ return pthread_getspecific(k);
|
||||
}
|
||||
static inline void tls_set_direct(tls_key_t k, void *value)
|
||||
{
|
||||
assert(is_valid_direct_key(k));
|
||||
|
||||
- if (_pthread_has_direct_tsd()) {
|
||||
- _pthread_setspecific_direct(k, value);
|
||||
- } else {
|
||||
- pthread_setspecific(k, value);
|
||||
- }
|
||||
+ pthread_setspecific(k, value);
|
||||
}
|
||||
|
||||
// not arm
|
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/ppp
|
||||
|
||||
cp Controller/ppp_msg.h $out/include/ppp
|
||||
cp Controller/pppcontroller_types.h $out/include/ppp
|
||||
cp Controller/pppcontroller_types.h $out/include
|
||||
cp Controller/pppcontroller.defs $out/include/ppp
|
||||
cp Controller/pppcontroller_mach_defines.h $out/include
|
||||
cp Controller/PPPControllerPriv.h $out/include/ppp
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{ stdenv, appleDerivation }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/
|
||||
cp removefile.h checkint.h $out/include/
|
||||
'';
|
||||
}
|
117
pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
Normal file
117
pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
Normal file
|
@ -0,0 +1,117 @@
|
|||
{ stdenv, appleDerivation, fetchzip, bootstrap_cmds, bison, flex, gnum4, unifdef, perl }:
|
||||
|
||||
appleDerivation {
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "/bin/" "" \
|
||||
--replace "MAKEJOBS := " '# MAKEJOBS := '
|
||||
|
||||
substituteInPlace makedefs/MakeInc.cmd \
|
||||
--replace "/usr/bin/" "" \
|
||||
--replace "/bin/" "" \
|
||||
--replace "-Werror " ""
|
||||
|
||||
substituteInPlace makedefs/MakeInc.def \
|
||||
--replace "-c -S -m" "-c -m"
|
||||
|
||||
substituteInPlace makedefs/MakeInc.top \
|
||||
--replace "MEMORY_SIZE := " 'MEMORY_SIZE := 1073741824 # '
|
||||
|
||||
substituteInPlace libkern/kxld/Makefile \
|
||||
--replace "-Werror " ""
|
||||
|
||||
substituteInPlace SETUP/kextsymboltool/Makefile \
|
||||
--replace "-lstdc++" "-lc++"
|
||||
|
||||
substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \
|
||||
--replace "/usr/include" "/include" \
|
||||
--replace "/usr/local/include" "/include" \
|
||||
--replace "MIG=" "# " \
|
||||
--replace "MIGCC=" "# " \
|
||||
--replace " -o 0" "" \
|
||||
--replace '$SRC/$mig' '-I$DSTROOT/include $SRC/$mig' \
|
||||
--replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs'
|
||||
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# This is a bit of a hack...
|
||||
mkdir -p sdk/usr/local/libexec
|
||||
|
||||
cat > sdk/usr/local/libexec/availability.pl <<EOF
|
||||
#!$SHELL
|
||||
if [ "\$1" == "--macosx" ]; then
|
||||
echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9
|
||||
elif [ "\$1" == "--ios" ]; then
|
||||
echo 2.0 2.1 2.2 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 5.1 6.0 6.1 7.0
|
||||
fi
|
||||
EOF
|
||||
chmod +x sdk/usr/local/libexec/availability.pl
|
||||
|
||||
export SDKROOT_RESOLVED=$PWD/sdk
|
||||
export HOST_SDKROOT_RESOLVED=$PWD/sdk
|
||||
export PLATFORM=MacOSX
|
||||
export SDKVERSION=10.7
|
||||
|
||||
export CC=cc
|
||||
export CXX=c++
|
||||
export MIG=${bootstrap_cmds}/bin/mig
|
||||
export MIGCOM=${bootstrap_cmds}/libexec/migcom
|
||||
export STRIP=sentinel-missing
|
||||
export LIPO=sentinel-missing
|
||||
export LIBTOOL=sentinel-missing
|
||||
export NM=sentinel-missing
|
||||
export UNIFDEF=${unifdef}/bin/unifdef
|
||||
export DSYMUTIL=sentinel-missing
|
||||
export CTFCONVERT=sentinel-missing
|
||||
export CTFMERGE=sentinel-missing
|
||||
export CTFINSERT=sentinel-missing
|
||||
export NMEDIT=sentinel-missing
|
||||
|
||||
export HOST_OS_VERSION=10.7
|
||||
export HOST_CC=cc
|
||||
export HOST_FLEX=${flex}/bin/flex
|
||||
export HOST_BISON=${bison}/bin/bison
|
||||
export HOST_GM4=${gnum4}/bin/m4
|
||||
export HOST_CODESIGN='echo dummy_codesign'
|
||||
export HOST_CODESIGN_ALLOCATE=echo
|
||||
|
||||
export DSTROOT=$out
|
||||
make installhdrs
|
||||
|
||||
mv $out/usr/include $out
|
||||
rmdir $out/usr
|
||||
|
||||
# TODO: figure out why I need to do this
|
||||
cp libsyscall/wrappers/*.h $out/include
|
||||
mkdir -p $out/include/os
|
||||
cp libsyscall/os/tsd.h $out/include/os/tsd.h
|
||||
cp EXTERNAL_HEADERS/AssertMacros.h $out/include
|
||||
|
||||
# Build the mach headers we crave
|
||||
export MIGCC=cc
|
||||
export ARCHS="x86_64"
|
||||
export SRCROOT=$PWD/libsyscall
|
||||
export DERIVED_SOURCES_DIR=$out/include
|
||||
export SDKROOT=$out
|
||||
libsyscall/xcodescripts/mach_install_mig.sh
|
||||
|
||||
# Get rid of the System prefix
|
||||
mv $out/System/* $out/
|
||||
|
||||
# Add some symlinks
|
||||
ln -s $out/Library/Frameworks/System.framework/Versions/B \
|
||||
$out/Library/Frameworks/System.framework/Versions/Current
|
||||
ln -s $out/Library/Frameworks/System.framework/Versions/Current/PrivateHeaders \
|
||||
$out/Library/Frameworks/System.framework/Headers
|
||||
|
||||
# IOKit (and possibly the others) is incomplete, so let's not make it visible from here...
|
||||
mkdir $out/Library/PrivateFrameworks
|
||||
mv $out/Library/Frameworks/IOKit.framework $out/Library/PrivateFrameworks
|
||||
'';
|
||||
}
|
|
@ -8400,7 +8400,8 @@ let
|
|||
|
||||
darwin = let
|
||||
cmdline = callPackage ../os-specific/darwin/command-line-tools {};
|
||||
in rec {
|
||||
apple-source-releases = import ../os-specific/darwin/apple-source-releases { inherit stdenv fetchurl pkgs; };
|
||||
in apple-source-releases // rec {
|
||||
|
||||
cctools = callPackage (forceNativeDrv (callPackage ../os-specific/darwin/cctools/port.nix {}).cross) {
|
||||
cross = assert crossSystem != null; crossSystem;
|
||||
|
|
Loading…
Reference in a new issue