From 29f265dfd28ce5567106a7a1df3bd6c1fbd8406f Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Sun, 8 Feb 2015 01:53:52 -0500 Subject: 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. --- .../CF/add-cf-initialize.patch | 18 + .../apple-source-releases/CF/add-cfmachport.patch | 22 + .../darwin/apple-source-releases/CF/default.nix | 41 + .../CarbonHeaders/default.nix | 20 + .../apple-source-releases/CommonCrypto/default.nix | 16 + .../CoreOSMakefiles/default.nix | 30 + .../darwin/apple-source-releases/Csu/default.nix | 27 + .../darwin/apple-source-releases/IOKit/default.nix | 187 +++ .../darwin/apple-source-releases/Libc/825_40_1.nix | 15 + .../darwin/apple-source-releases/Libc/default.nix | 30 + .../apple-source-releases/Libinfo/default.nix | 16 + .../darwin/apple-source-releases/Libm/default.nix | 13 + .../apple-source-releases/Libnotify/default.nix | 11 + .../apple-source-releases/Libsystem/default.nix | 147 ++ .../Libsystem/system_c_symbols | 1530 ++++++++++++++++++++ .../Libsystem/system_kernel_symbols | 929 ++++++++++++ .../apple-source-releases/Security/default.nix | 116 ++ .../apple-source-releases/adv_cmds/default.nix | 30 + .../apple-source-releases/architecture/default.nix | 23 + .../bootstrap_cmds/default.nix | 44 + .../apple-source-releases/configd/default.nix | 205 +++ .../apple-source-releases/copyfile/default.nix | 10 + .../darwin/apple-source-releases/default.nix | 83 ++ .../apple-source-releases/dtrace/default.nix | 50 + .../darwin/apple-source-releases/dyld/default.nix | 18 + .../apple-source-releases/eap8021x/default.nix | 11 + .../apple-source-releases/launchd/default.nix | 14 + .../apple-source-releases/libauto/auto_dtrace.h | 129 ++ .../apple-source-releases/libauto/default.nix | 74 + .../apple-source-releases/libclosure/default.nix | 10 + .../apple-source-releases/libdispatch/default.nix | 13 + .../apple-source-releases/libiconv/default.nix | 15 + .../apple-source-releases/libpthread/default.nix | 13 + .../apple-source-releases/libresolv/default.nix | 51 + .../apple-source-releases/libunwind/default.nix | 29 + .../mDNSResponder/default.nix | 10 + .../darwin/apple-source-releases/objc4/default.nix | 35 + .../apple-source-releases/objc4/objc-probes.h | 65 + .../darwin/apple-source-releases/objc4/pure.nix | 118 ++ .../apple-source-releases/objc4/spinlocks.patch | 107 ++ .../darwin/apple-source-releases/ppp/default.nix | 16 + .../apple-source-releases/removefile/default.nix | 10 + .../darwin/apple-source-releases/xnu/default.nix | 117 ++ pkgs/top-level/all-packages.nix | 3 +- 44 files changed, 4470 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/CF/add-cf-initialize.patch create mode 100644 pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch create mode 100644 pkgs/os-specific/darwin/apple-source-releases/CF/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/CoreOSMakefiles/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Security/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/configd/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libauto/auto_dtrace.h create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libauto/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libunwind/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/objc4/objc-probes.h create mode 100644 pkgs/os-specific/darwin/apple-source-releases/objc4/pure.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/objc4/spinlocks.patch create mode 100644 pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/add-cf-initialize.patch b/pkgs/os-specific/darwin/apple-source-releases/CF/add-cf-initialize.patch new file mode 100644 index 00000000000..46c230cfd1d --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/CF/add-cf-initialize.patch @@ -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(); diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch b/pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch new file mode 100644 index 00000000000..a1018d389c1 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch @@ -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 + #include + #include ++#include + #include + #include + #include + +--- 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 + diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix new file mode 100644 index 00000000000..3d4ac89e0a7 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix @@ -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 " "$replacement" + + substituteInPlace CFRunLoop.c --replace "#include " "" + + substituteInPlace CFURLPriv.h \ + --replace "#include " "" \ + --replace "#include " "" \ + --replace "CFFileSecurityRef" "void *" \ + --replace "CFURLEnumeratorResult" "void *" \ + --replace "CFURLEnumeratorRef" "void *" + + export DSTROOT=$out + ''; + + postInstall = '' + mv $out/System/* $out + rmdir $out/System + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix new file mode 100644 index 00000000000..38215fa8f90 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix new file mode 100644 index 00000000000..5bcf94a18ce --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/CoreOSMakefiles/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CoreOSMakefiles/default.nix new file mode 100644 index 00000000000..9f6031771c2 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/CoreOSMakefiles/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix new file mode 100644 index 00000000000..893e9f2b2eb --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix b/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix new file mode 100644 index 00000000000..12f38cd195f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/IOKit/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix new file mode 100644 index 00000000000..b5e7e512393 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix @@ -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 + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix new file mode 100644 index 00000000000..16cfa9e554b --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix @@ -0,0 +1,30 @@ +{ stdenv, appleDerivation, ed, unifdef, Libc_old }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + buildInputs = [ ed unifdef ]; + + # TODO: asl.h actually comes from syslog project now + installPhase = '' + export SRCROOT=$PWD + export DSTROOT=$out + export PUBLIC_HEADERS_FOLDER_PATH=include + export PRIVATE_HEADERS_FOLDER_PATH=include + bash xcodescripts/headers.sh + + # Ugh Apple stopped releasing this stuff so we need an older one... + cp ${Libc_old}/include/spawn.h $out/include + cp ${Libc_old}/include/setjmp.h $out/include + cp ${Libc_old}/include/ucontext.h $out/include + cp ${Libc_old}/include/pthread*.h $out/include + cp ${Libc_old}/include/sched.h $out/include + cp -R ${Libc_old}/include/malloc $out/include + + mkdir -p $out/include/libkern + cp ${Libc_old}/include/asl.h $out/include + cp ${Libc_old}/include/libproc.h $out/include + cp ${Libc_old}/include/libkern/OSAtomic.h $out/include/libkern + cp ${Libc_old}/include/libkern/OSCacheControl.h $out/include/libkern + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix new file mode 100644 index 00000000000..2756857ba67 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix new file mode 100644 index 00000000000..b409a7347ef --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix @@ -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 + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix new file mode 100644 index 00000000000..810c8e8315a --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix new file mode 100644 index 00000000000..ecab0941332 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -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 < $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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols new file mode 100644 index 00000000000..0c814899c3c --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols @@ -0,0 +1,1530 @@ +_NSGetNextSearchPathEnumeration +_NSStartSearchPathEnumeration +_OSAtomicAdd32 +_OSAtomicAdd32Barrier +_OSAtomicAnd32 +_OSAtomicDequeue +_OSAtomicEnqueue +_OSSpinLockLock +_OSSpinLockUnlock +__Block_copy +__Block_release +__CurrentRuneLocale +__DefaultRuneLocale +__Exit +__NSGetArgc +__NSGetArgv +__NSGetEnviron +__NSGetMachExecuteHeader +__NSGetProgname +__PathLocale +__Read_RuneMagi +___Balloc_D2A +___Bfree_D2A +___ULtod_D2A +____mb_cur_max +____mb_cur_max_l +____runetype +____runetype_l +____tolower +____tolower_l +____toupper +____toupper_l +___add_ovflpage +___addel +___any_on_D2A +___assert_rtn +___b2d_D2A +___big_delete +___big_insert +___big_keydata +___big_return +___big_split +___bigtens_D2A +___bt_close +___bt_cmp +___bt_defcmp +___bt_defpfx +___bt_delete +___bt_dleaf +___bt_fd +___bt_free +___bt_get +___bt_new +___bt_open +___bt_pgin +___bt_pgout +___bt_put +___bt_ret +___bt_search +___bt_seq +___bt_setcur +___bt_split +___bt_sync +___buf_free +___bzero +___cVersionNumber +___cVersionString +___call_hash +___chmod_extended +___cleanup +___cmp_D2A +___collate_equiv_match +___collate_load_error +___collate_lookup +___commpage_gettimeofday +___copybits_D2A +___cxa_atexit +___cxa_finalize +___cxa_thread_atexit +___d2b_D2A +___dbpanic +___decrement_D2A +___default_hash +___default_utx +___delpair +___diff_D2A +___dtoa +___error +___exit +___expand_table +___fchmod_extended +___fcntl +___fcntl_nocancel +___fflush +___fgetwc +___find_bigpair +___find_last_page +___fix_locale_grouping_str +___fork +___fpclassifyd +___fpclassifyl +___fread +___free_ovflpage +___freedtoa +___fstat64_extended +___fstat_extended +___gdtoa +___gdtoa_locks +___get_buf +___get_page +___getdirentries64 +___gethex_D2A +___getlogin +___getonlyClocaleconv +___gettimeofday +___hash_open +___hdtoa +___hexdig_D2A +___hexdig_init_D2A +___hexnan_D2A +___hi0bits_D2A +___hldtoa +___i2b_D2A +___ibitmap +___increment_D2A +___isctype +___istype +___istype_l +___kill +___ldtoa +___libc_init +___lo0bits_D2A +___log2 +___lshift_D2A +___lstat64_extended +___lstat_extended +___maskrune +___maskrune_l +___match_D2A +___mb_cur_max +___mb_sb_limit +___memccpy_chk +___memcpy_chk +___memmove_chk +___memset_chk +___mkdir_extended +___mkfifo_extended +___mult_D2A +___multadd_D2A +___nrv_alloc_D2A +___open +___open_extended +___open_nocancel +___opendir2 +___opendir2$INODE64 +___ovfl_delete +___ovfl_get +___ovfl_put +___pow5mult_D2A +___pthread_sigmask +___pthread_workqueue_setkill +___put_page +___quorem_D2A +___ratio_D2A +___rec_close +___rec_delete +___rec_dleaf +___rec_fd +___rec_fmap +___rec_fpipe +___rec_get +___rec_iput +___rec_open +___rec_put +___rec_ret +___rec_search +___rec_seq +___rec_sync +___rec_vmap +___rec_vpipe +___reclaim_buf +___recvfrom +___recvfrom_nocancel +___rshift_D2A +___rv_alloc_D2A +___s2b_D2A +___sF +___sclose +___sdidinit +___semwait_signal +___semwait_signal_nocancel +___sendto +___sendto_nocancel +___set_ones_D2A +___setlogin +___setonlyClocaleconv +___settimeofday +___sflags +___sflush +___sfp +___sfvwrite +___sglue +___sigaction +___sigaltstack +___sinit +___slbexpand +___smakebuf +___snprintf_chk +___split_page +___sprintf_chk +___sread +___srefill +___srget +___sseek +___stack_chk_fail +___stack_chk_guard +___stat64_extended +___stat_extended +___stderrp +___stdinp +___stdoutp +___stpcpy_chk +___stpncpy_chk +___strcat_chk +___strcp_D2A +___strcpy_chk +___strlcat_chk +___strlcpy_chk +___strncat_chk +___strncpy_chk +___strtodg +___strtopdd +___strtopx +___sum_D2A +___svfscanf +___swbuf +___swhatbuf +___swrite +___swsetup +___sysctl +___tens_D2A +___tinytens_D2A +___tolower +___tolower_l +___toupper +___toupper_l +___trailz_D2A +___ulp_D2A +___umask_extended +___ungetc +___ungetwc +___unix_conforming +___vsnprintf_chk +___vsprintf_chk +___wait4 +___wait4_nocancel +___wcwidth +___wcwidth_l +__allocenvstate +__c_locale +__cleanup +__closeutx +__copyenv +__cthread_init_routine +__deallocenvstate +__dyld_register_func_for_add_image +__endutxent +__exit +__flockfile_debug_stub +__fseeko +__ftello +__fwalk +__get_cpu_capabilities +__getenvp +__getutxent +__getutxid +__getutxline +__inet_aton_check +__init_clock_port +__int_to_time +__libc_fork_child +__long_to_time +__mkpath_np +__mktemp +__openutx +__os_alloc_once +__os_alloc_once_table +__os_assert_log +__os_assert_log_ctx +__os_assumes_log +__os_assumes_log_ctx +__os_avoid_tail_call +__osx_assert_log +__osx_assert_log_ctx +__osx_assumes_log +__osx_assumes_log_ctx +__osx_avoid_tail_call +__platform_bzero +__platform_memccpy +__platform_memchr +__platform_memcmp +__platform_memmove +__platform_memset +__platform_memset_pattern16 +__platform_memset_pattern4 +__platform_memset_pattern8 +__platform_strchr +__platform_strcmp +__platform_strncmp +__putenvp +__pututxline +__rand48_add +__rand48_mult +__rand48_seed +__readdir_unlocked +__readdir_unlocked$INODE64 +__reclaim_telldir +__seekdir +__seekdir$INODE64 +__setenvp +__setutxent +__sigaction_nobind +__sigintr +__signal_nobind +__sigtramp +__sigvec_nobind +__simple_asl_log +__simple_asl_log_prog +__simple_asl_msg_new +__simple_asl_msg_set +__simple_asl_send +__simple_dprintf +__simple_salloc +__simple_sappend +__simple_sfree +__simple_sprintf +__simple_string +__simple_vsprintf +__sread +__sseek +__swrite +__time32_to_time +__time64_to_time +__time_to_int +__time_to_long +__time_to_time32 +__time_to_time64 +__tlv_atexit +__tlv_exit +__unsetenvp +__utmpxname +_a64l +_abort +_abs +_access +_acl_add_flag_np +_acl_add_perm +_acl_calc_mask +_acl_clear_flags_np +_acl_clear_perms +_acl_copy_entry +_acl_copy_ext +_acl_copy_ext_native +_acl_copy_int +_acl_copy_int_native +_acl_create_entry +_acl_create_entry_np +_acl_delete_def_file +_acl_delete_entry +_acl_delete_fd_np +_acl_delete_file_np +_acl_delete_flag_np +_acl_delete_link_np +_acl_delete_perm +_acl_dup +_acl_free +_acl_from_text +_acl_get_entry +_acl_get_fd +_acl_get_fd_np +_acl_get_file +_acl_get_flag_np +_acl_get_flagset_np +_acl_get_link_np +_acl_get_perm_np +_acl_get_permset +_acl_get_permset_mask_np +_acl_get_qualifier +_acl_get_tag_type +_acl_init +_acl_maximal_permset_mask_np +_acl_set_fd +_acl_set_fd_np +_acl_set_file +_acl_set_flagset_np +_acl_set_link_np +_acl_set_permset +_acl_set_permset_mask_np +_acl_set_qualifier +_acl_set_tag_type +_acl_size +_acl_to_text +_acl_valid +_acl_valid_fd_np +_acl_valid_file_np +_acl_valid_link +_addr2ascii +_alarm +_alphasort +_alphasort$INODE64 +_arc4random +_arc4random_addrandom +_arc4random_buf +_arc4random_stir +_arc4random_uniform +_ascii2addr +_asctime +_asctime_r +_asl_get +_asl_new +_asl_open +_asl_send +_asl_set +_asl_set_query +_asprintf +_asprintf_l +_asxprintf +_asxprintf_exec +_atexit +_atexit_b +_atof +_atof_l +_atoi +_atoi_l +_atol +_atol_l +_atoll +_atoll_l +_backtrace +_backtrace_symbols +_backtrace_symbols_fd +_basename +_bcmp +_bcopy +_bootstrap_parent +_bootstrap_port +_brk +_bsd_signal +_bsearch +_bsearch_b +_btowc +_btowc_l +_bzero +_calloc +_catclose +_catgets +_catopen +_cfgetispeed +_cfgetospeed +_cfmakeraw +_cfsetispeed +_cfsetospeed +_cfsetspeed +_cgetcap +_cgetclose +_cgetent +_cgetfirst +_cgetmatch +_cgetnext +_cgetnum +_cgetset +_cgetstr +_cgetustr +_chdir +_chflags +_chmod +_chmodx_np +_clearerr +_clearerr_unlocked +_clock +_clock_get_time +_clock_port +_clock_sem +_close$NOCANCEL +_closedir +_compat_mode +_confstr +_copy_printf_domain +_creat +_creat$NOCANCEL +_crypt +_ctermid +_ctermid_r +_ctime +_ctime_r +_daemon +_daemon$1050 +_daylight +_dbm_clearerr +_dbm_close +_dbm_delete +_dbm_dirfno +_dbm_error +_dbm_fetch +_dbm_firstkey +_dbm_nextkey +_dbm_open +_dbm_store +_dbopen +_devname +_devname_r +_difftime +_digittoint +_digittoint_l +_dirfd +_dirname +_dispatch_get_global_queue +_div +_dladdr +_dlsym +_dprintf +_dprintf_l +_drand48 +_dup2 +_duplocale +_dxprintf +_dxprintf_exec +_dyld_get_program_sdk_version +_dyld_get_sdk_version +_ecvt +_encrypt +_endttyent +_endusershell +_endutxent +_endutxent_wtmp +_erand48 +_err +_err_set_exit +_err_set_exit_b +_err_set_file +_errc +_errx +_execl +_execle +_execlp +_execv +_execvP +_execve +_execvp +_exit +_f_prealloc +_fchdir +_fchmodx_np +_fclose +_fcntl$NOCANCEL +_fcvt +_fdopen +_fdopen$DARWIN_EXTSN +_fegetenv +_feof +_feof_unlocked +_ferror +_ferror_unlocked +_fesetenv +_fflagstostr +_fflush +_ffsctl +_fgetc +_fgetln +_fgetpos +_fgetrune +_fgets +_fgetwc +_fgetwc_l +_fgetwln +_fgetwln_l +_fgetws +_fgetws_l +_fileno +_fileno_unlocked +_filesec_dup +_filesec_free +_filesec_get_property +_filesec_init +_filesec_query_property +_filesec_set_property +_filesec_unset_property +_flockfile +_flsl +_fmtcheck +_fmtmsg +_fnmatch +_fopen +_fopen$DARWIN_EXTSN +_fork +_forkpty +_fparseln +_fprintf +_fprintf_l +_fpurge +_fputc +_fputrune +_fputs +_fputwc +_fputwc_l +_fputws +_fputws_l +_fread +_free +_free_printf_comp +_free_printf_domain +_freeifaddrs +_freelocale +_freopen +_fscanf +_fscanf_l +_fsctl +_fseek +_fseeko +_fsetpos +_fstat +_fstat$INODE64 +_fstatfs +_fstatfs$INODE64 +_fstatvfs +_fstatx64_np +_fstatx_np +_fstatx_np$INODE64 +_fsync$NOCANCEL +_fsync_volume_np +_ftell +_ftello +_ftime +_ftok +_ftruncate +_ftrylockfile +_fts_children +_fts_children$INODE64 +_fts_close +_fts_close$INODE64 +_fts_open +_fts_open$INODE64 +_fts_open_b +_fts_open_b$INODE64 +_fts_read +_fts_read$INODE64 +_fts_set +_fts_set$INODE64 +_ftw +_ftw$INODE64 +_fungetrune +_funlockfile +_funopen +_fwide +_fwprintf +_fwprintf_l +_fwrite +_fwscanf +_fwscanf_l +_fxprintf +_fxprintf_exec +_gcvt +_getattrlist +_getbsize +_getc +_getc_unlocked +_getchar +_getchar_unlocked +_getcwd +_getdate +_getdate_err +_getdelim +_getdirentries +_getdiskbyname +_getdtablesize +_getenv +_geteuid +_getfsstat +_getfsstat$INODE64 +_getfsstat64 +_getgrgid +_getgrnam +_getgroupcount +_getgrouplist +_getgroups$DARWIN_EXTSN +_gethostid +_gethostname +_getifaddrs +_getipv4sourcefilter +_getlastlogx +_getlastlogxbyname +_getline +_getloadavg +_getlogin +_getlogin_r +_getmntinfo +_getmntinfo$INODE64 +_getmntinfo64 +_getmode +_getopt +_getopt_long +_getopt_long_only +_getpagesize +_getpass +_getpeereid +_getpgrp +_getpid +_getpriority +_getprogname +_getpwnam +_getpwuid +_getpwuid_r +_getrlimit +_getrusage +_gets +_getsectiondata +_getsockopt +_getsourcefilter +_getsubopt +_gettimeofday +_getttyent +_getttynam +_getuid +_getusershell +_getutmp +_getutmpx +_getutxent +_getutxent_wtmp +_getutxid +_getutxline +_getvfsbyname +_getw +_getwc +_getwc_l +_getwchar +_getwchar_l +_getwd +_glob +_glob$INODE64 +_glob_b +_glob_b$INODE64 +_globfree +_gmtime +_gmtime_r +_grantpt +_hash_create +_hash_destroy +_hash_purge +_hash_search +_hash_stats +_hash_traverse +_hcreate +_hdestroy +_heapsort +_heapsort_b +_host_get_clock_service +_hsearch +_if_nametoindex +_imaxabs +_imaxdiv +_index +_inet_addr +_inet_aton +_inet_lnaof +_inet_makeaddr +_inet_net_ntop +_inet_net_pton +_inet_neta +_inet_netof +_inet_network +_inet_nsap_addr +_inet_nsap_ntoa +_inet_ntoa +_inet_ntop +_inet_ntop4 +_inet_ntop6 +_inet_pton +_initstate +_insque +_ioctl +_isalnum +_isalnum_l +_isalpha +_isalpha_l +_isascii +_isatty +_isblank +_isblank_l +_iscntrl +_iscntrl_l +_isdigit +_isdigit_l +_isgraph +_isgraph_l +_ishexnumber +_ishexnumber_l +_isideogram +_isideogram_l +_islower +_islower_l +_isnumber +_isnumber_l +_isphonogram +_isphonogram_l +_isprint +_isprint_l +_ispunct +_ispunct_l +_isrune +_isrune_l +_issetugid +_isspace +_isspace_l +_isspecial +_isspecial_l +_isupper +_isupper_l +_iswalnum +_iswalnum_l +_iswalpha +_iswalpha_l +_iswascii +_iswblank +_iswblank_l +_iswcntrl +_iswcntrl_l +_iswctype +_iswctype_l +_iswdigit +_iswdigit_l +_iswgraph +_iswgraph_l +_iswhexnumber +_iswhexnumber_l +_iswideogram +_iswideogram_l +_iswlower +_iswlower_l +_iswnumber +_iswnumber_l +_iswphonogram +_iswphonogram_l +_iswprint +_iswprint_l +_iswpunct +_iswpunct_l +_iswrune +_iswrune_l +_iswspace +_iswspace_l +_iswspecial +_iswspecial_l +_iswupper +_iswupper_l +_iswxdigit +_iswxdigit_l +_isxdigit +_isxdigit_l +_jrand48 +_kill +_killpg +_l64a +_labs +_lchflags +_lchmod +_lcong48 +_ldiv +_lfind +_link_addr +_link_ntoa +_llabs +_lldiv +_localeconv +_localeconv_l +_localtime +_localtime_r +_lockf +_lockf$NOCANCEL +_login +_login_tty +_logout +_logwtmp +_lrand48 +_lsearch +_lseek +_lstat +_lstat$INODE64 +_lstatx64_np +_lstatx_np +_lstatx_np$INODE64 +_lutimes +_mach_absolute_time +_mach_error_string +_mach_host_self +_mach_port_deallocate +_mach_task_self_ +_mach_timebase_info +_malloc +_mblen +_mblen_l +_mbmb +_mbr_gid_to_uuid +_mbr_uid_to_uuid +_mbr_uuid_to_id +_mbrlen +_mbrlen_l +_mbrrune +_mbrtowc +_mbrtowc_l +_mbrune +_mbsinit +_mbsinit_l +_mbsnrtowcs +_mbsnrtowcs_l +_mbsrtowcs +_mbsrtowcs_l +_mbstowcs +_mbstowcs_l +_mbtowc +_mbtowc_l +_memccpy +_memchr +_memcmp +_memcpy +_memmem +_memmove +_memset +_memset_pattern16 +_memset_pattern4 +_memset_pattern8 +_memset_s +_mergesort +_mergesort_b +_mkdir +_mkdirx_np +_mkdtemp +_mkfifox_np +_mkpath_np +_mkstemp +_mkstemps +_mktemp +_mktime +_mmap +_monaddition +_moncontrol +_moncount +_moninit +_monitor +_monoutput +_monreset +_monstartup +_mpool_close +_mpool_filter +_mpool_get +_mpool_new +_mpool_open +_mpool_put +_mpool_sync +_mrand48 +_munmap +_nan +_nanf +_nanl +_nanosleep +_nanosleep$NOCANCEL +_new_printf_comp +_new_printf_domain +_newlocale +_nextwctype +_nextwctype_l +_nftw +_nftw$INODE64 +_nice +_nl_langinfo +_nl_langinfo_l +_notify_cancel +_notify_check +_notify_monitor_file +_notify_post +_notify_register_check +_nrand48 +_off32 +_off64 +_offtime +_open$NOCANCEL +_opendev +_opendir +_opendir$INODE64 +_openpty +_openx_np +_optarg +_opterr +_optind +_optopt +_optreset +_pathconf +_pause +_pause$NOCANCEL +_pclose +_perror +_pipe +_popen +_popen$DARWIN_EXTSN +_posix2time +_posix_openpt +_posix_spawn +_posix_spawn_file_actions_addclose +_posix_spawn_file_actions_adddup2 +_posix_spawn_file_actions_destroy +_posix_spawn_file_actions_init +_posix_spawnattr_destroy +_posix_spawnattr_init +_posix_spawnattr_setflags +_posix_spawnattr_setsigdefault +_posix_spawnattr_setsigmask +_posix_spawnp +_pread$NOCANCEL +_printf +_printf_l +_proc_name +_pselect +_pselect$1050 +_pselect$DARWIN_EXTSN +_pselect$DARWIN_EXTSN$NOCANCEL +_pselect$NOCANCEL +_psignal +_psort +_psort_b +_psort_r +_pthread_get_stackaddr_np +_pthread_get_stacksize_np +_pthread_getspecific +_pthread_key_create +_pthread_key_init_np +_pthread_kill +_pthread_mutex_destroy +_pthread_mutex_init +_pthread_mutex_lock +_pthread_mutex_trylock +_pthread_mutex_unlock +_pthread_once +_pthread_rwlock_destroy +_pthread_rwlock_rdlock +_pthread_rwlock_unlock +_pthread_rwlock_wrlock +_pthread_self +_pthread_setspecific +_pthread_sigmask +_pthread_testcancel +_ptsname +_putc +_putc_unlocked +_putchar +_putchar_unlocked +_putenv +_puts +_pututxline +_putw +_putwc +_putwc_l +_putwchar +_putwchar_l +_pwrite$NOCANCEL +_qsort +_qsort_b +_qsort_r +_querylocale +_radixsort +_raise +_rand +_rand_r +_random +_rb_tree_count +_rb_tree_find_node +_rb_tree_find_node_geq +_rb_tree_find_node_leq +_rb_tree_init +_rb_tree_insert_node +_rb_tree_iterate +_rb_tree_remove_node +_read$NOCANCEL +_readdir +_readdir$INODE64 +_readdir_r +_readdir_r$INODE64 +_readlink +_readpassphrase +_realloc +_reallocf +_realpath +_realpath$DARWIN_EXTSN +_recv +_recv$NOCANCEL +_regcomp +_regcomp_l +_regerror +_regexec +_regfree +_register_printf_domain_function +_register_printf_domain_render_std +_regncomp +_regncomp_l +_regnexec +_regwcomp +_regwcomp_l +_regwexec +_regwncomp +_regwncomp_l +_regwnexec +_remove +_remque +_rewind +_rewinddir +_rewinddir$INODE64 +_rindex +_rmdir +_sbrk +_scandir +_scandir$INODE64 +_scandir_b +_scandir_b$INODE64 +_scanf +_scanf_l +_seed48 +_seekdir +_seekdir$INODE64 +_select +_select$1050 +_select$DARWIN_EXTSN +_select$DARWIN_EXTSN$NOCANCEL +_select$NOCANCEL +_semaphore_create +_send +_send$NOCANCEL +_setattrlist +_setbuf +_setbuffer +_setenv +_sethostid +_sethostname +_setinvalidrune +_setipv4sourcefilter +_setitimer +_setkey +_setlinebuf +_setlocale +_setlogin +_setmode +_setpgid +_setpgrp +_setpriority +_setprogname +_setregid +_setreuid +_setrgid +_setrlimit +_setruid +_setrunelocale +_setsid +_setsockopt +_setsourcefilter +_setstate +_settimeofday +_setttyent +_setusershell +_setutxent +_setutxent_wtmp +_setvbuf +_sigaction +_sigaddset +_sigaltstack +_sigblock +_sigdelset +_sigemptyset +_sigfillset +_sighold +_sigignore +_siginterrupt +_sigismember +_signal +_sigpause +_sigpause$NOCANCEL +_sigprocmask +_sigrelse +_sigset +_sigsetmask +_sigsuspend +_sigsuspend$NOCANCEL +_sigvec +_skip +_sl_add +_sl_find +_sl_free +_sl_init +_sleep +_sleep$NOCANCEL +_snprintf +_snprintf_l +_sockatmark +_socket +_socketpair +_spin_lock +_spin_unlock +_sprintf +_sprintf_l +_sradixsort +_srand +_srand48 +_sranddev +_srandom +_srandomdev +_sscanf +_sscanf_l +_stat +_stat$INODE64 +_statfs$INODE64 +_statvfs +_statx64_np +_statx_np +_statx_np$INODE64 +_stpcpy +_stpncpy +_strcasecmp +_strcasecmp_l +_strcasestr +_strcasestr_l +_strcat +_strchr +_strcmp +_strcoll +_strcoll_l +_strcpy +_strcspn +_strdup +_strerror +_strerror_r +_strfmon +_strfmon_l +_strftime +_strftime_l +_strlcat +_strlcpy +_strlen +_strmode +_strncasecmp +_strncasecmp_l +_strncat +_strncmp +_strncpy +_strndup +_strnlen +_strnstr +_strpbrk +_strptime +_strptime_l +_strrchr +_strsep +_strsignal +_strspn +_strstr +_strtod +_strtod_l +_strtof +_strtof_l +_strtofflags +_strtoimax +_strtoimax_l +_strtok +_strtok_r +_strtol +_strtol_l +_strtold +_strtold_l +_strtoll +_strtoll_l +_strtoq +_strtoq_l +_strtoul +_strtoul_l +_strtoull +_strtoull_l +_strtoumax +_strtoumax_l +_strtouq +_strtouq_l +_strunvis +_strunvisx +_strvis +_strvisx +_strxfrm +_strxfrm_l +_suboptarg +_swab +_swprintf +_swprintf_l +_swscanf +_swscanf_l +_sxprintf +_sxprintf_exec +_sync_volume_np +_sys_errlist +_sys_nerr +_sys_siglist +_sys_signame +_sysconf +_sysctl +_sysctlbyname +_sysctlnametomib +_syslog +_system +_system$NOCANCEL +_task_set_special_port +_tcdrain +_tcdrain$NOCANCEL +_tcflow +_tcflush +_tcgetattr +_tcgetpgrp +_tcgetsid +_tcsendbreak +_tcsetattr +_tcsetpgrp +_tdelete +_telldir +_telldir$INODE64 +_tempnam +_tfind +_thread_stack_pcs +_time +_time2posix +_timegm +_timelocal +_timeoff +_times +_timezone +_tmpfile +_tmpnam +_toascii +_tolower +_tolower_l +_toupper +_toupper_l +_towctrans +_towctrans_l +_towlower +_towlower_l +_towupper +_towupper_l +_tsearch +_ttyname +_ttyname_r +_ttyslot +_twalk +_tzname +_tzset +_tzsetwall +_ualarm +_ulimit +_umask +_umaskx_np +_uname +_ungetc +_ungetwc +_ungetwc_l +_unlink +_unlockpt +_unsetenv +_unvis +_uselocale +_usleep +_usleep$NOCANCEL +_utime +_utimes +_utmpxname +_uuid_clear +_uuid_compare +_uuid_copy +_uuid_generate +_uuid_generate_random +_uuid_generate_time +_uuid_is_null +_uuid_pack +_uuid_parse +_uuid_unpack +_uuid_unparse +_uuid_unparse_lower +_uuid_unparse_upper +_vasprintf +_vasprintf_l +_vasxprintf +_vasxprintf_exec +_vdprintf +_vdprintf_l +_vdxprintf +_vdxprintf_exec +_verr +_verrc +_verrx +_vfprintf +_vfprintf_l +_vfscanf +_vfscanf_l +_vfwprintf +_vfwprintf_l +_vfwscanf +_vfwscanf_l +_vfxprintf +_vfxprintf_exec +_vis +_vm_allocate +_vprintf +_vprintf_l +_vscanf +_vscanf_l +_vsnprintf +_vsnprintf_l +_vsprintf +_vsprintf_l +_vsscanf +_vsscanf_l +_vswprintf +_vswprintf_l +_vswscanf +_vswscanf_l +_vsxprintf +_vsxprintf_exec +_vwarn +_vwarnc +_vwarnx +_vwprintf +_vwprintf_l +_vwscanf +_vwscanf_l +_vxprintf +_vxprintf_exec +_wait +_wait$NOCANCEL +_wait3 +_wait4 +_waitpid +_waitpid$NOCANCEL +_warn +_warnc +_warnx +_wcpcpy +_wcpncpy +_wcrtomb +_wcrtomb_l +_wcscasecmp +_wcscasecmp_l +_wcscat +_wcschr +_wcscmp +_wcscoll +_wcscoll_l +_wcscpy +_wcscspn +_wcsdup +_wcsftime +_wcsftime_l +_wcslcat +_wcslcpy +_wcslen +_wcsncasecmp +_wcsncasecmp_l +_wcsncat +_wcsncmp +_wcsncpy +_wcsnlen +_wcsnrtombs +_wcsnrtombs_l +_wcspbrk +_wcsrchr +_wcsrtombs +_wcsrtombs_l +_wcsspn +_wcsstr +_wcstod +_wcstod_l +_wcstof +_wcstof_l +_wcstoimax +_wcstoimax_l +_wcstok +_wcstol +_wcstol_l +_wcstold +_wcstold_l +_wcstoll +_wcstoll_l +_wcstombs +_wcstombs_l +_wcstoul +_wcstoul_l +_wcstoull +_wcstoull_l +_wcstoumax +_wcstoumax_l +_wcswidth +_wcswidth_l +_wcsxfrm +_wcsxfrm_l +_wctob +_wctob_l +_wctomb +_wctomb_l +_wctrans +_wctrans_l +_wctype +_wctype_l +_wcwidth +_wcwidth_l +_wmemchr +_wmemcmp +_wmemcpy +_wmemmove +_wmemset +_wordexp +_wordfree +_wprintf +_wprintf_l +_write$NOCANCEL +_writev$NOCANCEL +_wscanf +_wscanf_l +_wtmpxname +_xprintf +_xprintf_exec +dyld_stub_binder +mcount diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols new file mode 100644 index 00000000000..9d53dea7025 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols @@ -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 diff --git a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix new file mode 100644 index 00000000000..f09842630fd --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix @@ -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 + + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix new file mode 100644 index 00000000000..db467254f17 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix b/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix new file mode 100644 index 00000000000..edb7869269a --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix new file mode 100644 index 00000000000..8dce3fd3609 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix @@ -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" + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix new file mode 100644 index 00000000000..3427081bfaa --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix @@ -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 ' "" + + substituteInPlace SystemConfiguration.fproj/SCNetworkReachability.c \ + --replace ''$'#define\tHAVE_VPN_STATUS' "" + + substituteInPlace SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c \ + --replace '#include ' '#include "fake_xpc.h"' \ + --replace '#include ' "" \ + + # 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 </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 </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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix b/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix new file mode 100644 index 00000000000..c1a2acccaa9 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix @@ -0,0 +1,10 @@ +{ stdenv, appleDerivation }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/include/ + cp copyfile.h $out/include/ + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix new file mode 100644 index 00000000000..afaf602bec5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -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 diff --git a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix new file mode 100644 index 00000000000..5fcd04266d5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix new file mode 100644 index 00000000000..56b0d93f99b --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix b/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix new file mode 100644 index 00000000000..af9493fe32e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix @@ -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 + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix new file mode 100644 index 00000000000..c0e00ca1636 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix @@ -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 + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libauto/auto_dtrace.h b/pkgs/os-specific/darwin/apple-source-releases/libauto/auto_dtrace.h new file mode 100644 index 00000000000..bf367a3cabb --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libauto/auto_dtrace.h @@ -0,0 +1,129 @@ +/* + * Generated by dtrace(1M). + */ + +#ifndef _AUTO_DTRACE_H +#define _AUTO_DTRACE_H + +#include + +#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 */ diff --git a/pkgs/os-specific/darwin/apple-source-releases/libauto/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libauto/default.nix new file mode 100644 index 00000000000..1c61297c7d5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libauto/default.nix @@ -0,0 +1,74 @@ +{ stdenv, appleDerivation }: + +appleDerivation { + buildPhase = '' + cp ${./auto_dtrace.h} ./auto_dtrace.h + + substituteInPlace auto_zone.cpp \ + --replace "#include " ''$'#include \nstatic void msgtracer_log_with_keys(...) { };' + + substituteInPlace Definitions.h \ + --replace "#include " "" + + # 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 " "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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix new file mode 100644 index 00000000000..a0201f9db2c --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix @@ -0,0 +1,10 @@ +{ stdenv, appleDerivation }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/include + cp *.h $out/include/ + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix new file mode 100644 index 00000000000..56c00557d43 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix new file mode 100644 index 00000000000..5b82835d3e6 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix new file mode 100644 index 00000000000..027784e2ea6 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix @@ -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/ + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix new file mode 100644 index 00000000000..a74198e8ddd --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libunwind/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libunwind/default.nix new file mode 100644 index 00000000000..32c8d6717f0 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libunwind/default.nix @@ -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; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix b/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix new file mode 100644 index 00000000000..63674808d93 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/mDNSResponder/default.nix @@ -0,0 +1,10 @@ +{ stdenv, appleDerivation }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/include + cp mDNSShared/dns_sd.h $out/include + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix b/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix new file mode 100644 index 00000000000..cea5fc9a4e2 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/objc4/default.nix @@ -0,0 +1,35 @@ +{ stdenv, appleDerivation }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + # Not strictly necessary, since libSystem depends on it, but it's nice to be explicit so we + # can easily find out what's impure. + __propagatedImpureHostDeps = [ + "/usr/lib/libauto.dylib" + "/usr/lib/libc++abi.dylib" + "/usr/lib/libc++.1.dylib" + "/usr/lib/libSystem.B.dylib" + ]; + + installPhase = '' + mkdir -p $out/include/objc $out/lib + ln -s /usr/lib/libobjc.dylib $out/lib/libobjc.dylib + cp runtime/OldClasses.subproj/List.h $out/include/objc/List.h + cp runtime/NSObjCRuntime.h $out/include/objc/NSObjCRuntime.h + cp runtime/NSObject.h $out/include/objc/NSObject.h + cp runtime/Protocol.h $out/include/objc/Protocol.h + cp runtime/hashtable.h $out/include/objc/hashtable.h + cp runtime/hashtable2.h $out/include/objc/hashtable2.h + cp runtime/message.h $out/include/objc/message.h + cp runtime/objc-api.h $out/include/objc/objc-api.h + cp runtime/objc-auto.h $out/include/objc/objc-auto.h + cp runtime/objc-class.h $out/include/objc/objc-class.h + cp runtime/objc-exception.h $out/include/objc/objc-exception.h + cp runtime/objc-load.h $out/include/objc/objc-load.h + cp runtime/objc-runtime.h $out/include/objc/objc-runtime.h + cp runtime/objc-sync.h $out/include/objc/objc-sync.h + cp runtime/objc.h $out/include/objc/objc.h + cp runtime/runtime.h $out/include/objc/runtime.h + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/objc4/objc-probes.h b/pkgs/os-specific/darwin/apple-source-releases/objc4/objc-probes.h new file mode 100644 index 00000000000..4ad9ba9ad10 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/objc4/objc-probes.h @@ -0,0 +1,65 @@ +/* + * Generated by dtrace(1M). + */ + +#ifndef _OBJC_PROBES_H +#define _OBJC_PROBES_H + +#include + +#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 */ diff --git a/pkgs/os-specific/darwin/apple-source-releases/objc4/pure.nix b/pkgs/os-specific/darwin/apple-source-releases/objc4/pure.nix new file mode 100644 index 00000000000..28dcbdcb4a2 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/objc4/pure.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/objc4/spinlocks.patch b/pkgs/os-specific/darwin/apple-source-releases/objc4/spinlocks.patch new file mode 100644 index 00000000000..50c6a983fe4 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/objc4/spinlocks.patch @@ -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 + # include + # include +-# include + # include + # include +-# include + # 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 ++#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 diff --git a/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix new file mode 100644 index 00000000000..ffc19801c5d --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix @@ -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 + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix b/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix new file mode 100644 index 00000000000..315f93bef08 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix @@ -0,0 +1,10 @@ +{ stdenv, appleDerivation }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/include/ + cp removefile.h checkint.h $out/include/ + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix new file mode 100644 index 00000000000..8276d2f4b42 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -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 <