uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,9 @@
linkSystemCoreFoundationFramework() {
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}"
# gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not
# in the opensource release
# if the package needs private headers, we assume they also want to link with system CF
NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation"
}
preConfigureHooks+=(linkSystemCoreFoundationFramework)

View file

@ -0,0 +1,339 @@
{ stdenv, fetchurl, xar, cpio, pkgs, python3, pbzx, lib, darwin-stubs, print-reexports }:
let
# sadly needs to be exported because security_tool needs it
sdk = stdenv.mkDerivation rec {
pname = "MacOS_SDK";
version = "10.12";
# This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.12.merged-1.sucatalog, which we found by:
# 1. Google: site:swscan.apple.com and look for a name that seems appropriate for your version
# 2. In the resulting file, search for a file called DevSDK ending in .pkg
# 3. ???
# 4. Profit
src = fetchurl {
url = "http://swcdn.apple.com/content/downloads/33/36/041-90419-A_7JJ4H9ZHO2/xs88ob5wjz6riz7g6764twblnvksusg4ps/DevSDK_OSX1012.pkg";
sha256 = "13xq34sb7383b37hwy076gnhf96prpk1b4087p87xnwswxbrisih";
};
nativeBuildInputs = [ xar cpio python3 pbzx ];
outputs = [ "out" "dev" "man" ];
unpackPhase = ''
xar -x -f $src
'';
installPhase = ''
start="$(pwd)"
mkdir -p $out
cd $out
pbzx -n $start/Payload | cpio -idm
mv usr/* .
rmdir usr
mv System/* .
rmdir System
pushd lib
cp ${darwin-stubs}/usr/lib/libcups*.tbd .
ln -s libcups.2.tbd libcups.tbd
ln -s libcupscgi.1.tbd libcupscgi.tbd
ln -s libcupsimage.2.tbd libcupsimage.tbd
ln -s libcupsmime.1.tbd libcupsmime.tbd
ln -s libcupsppdc.1.tbd libcupsppdc.tbd
popd
'';
meta = with lib; {
description = "Apple SDK ${version}";
maintainers = with maintainers; [ copumpkin ];
platforms = platforms.darwin;
};
};
mkFrameworkSubs = name: deps:
let
deps' = deps // { "${name}" = placeholder "out"; };
substArgs = lib.concatMap (x: [ "--subst-var-by" x deps'."${x}" ]) (lib.attrNames deps');
in lib.escapeShellArgs substArgs;
framework = name: deps: stdenv.mkDerivation {
name = "apple-framework-${name}";
dontUnpack = true;
# because we copy files from the system
preferLocalBuild = true;
disallowedRequisites = [ sdk ];
nativeBuildInputs = [ print-reexports ];
extraTBDFiles = [];
installPhase = ''
linkFramework() {
local path="$1"
local nested_path="$1"
if [ "$path" == "JavaNativeFoundation.framework" ]; then
local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework"
fi
if [ "$path" == "JavaRuntimeSupport.framework" ]; then
local nested_path="JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework"
fi
local name="$(basename "$path" .framework)"
local current="$(readlink "/System/Library/Frameworks/$nested_path/Versions/Current")"
if [ -z "$current" ]; then
current=A
fi
local dest="$out/Library/Frameworks/$path"
mkdir -p "$dest/Versions/$current"
pushd "$dest/Versions/$current" >/dev/null
if [ -d "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" ]; then
cp -R "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current/Headers" .
elif [ -d "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" ]; then
current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")"
cp -R "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" .
fi
local tbd_source=${darwin-stubs}/System/Library/Frameworks/$nested_path/Versions/$current
if [ "${name}" != "Kernel" ]; then
# The Kernel.framework has headers but no actual library component.
cp -v $tbd_source/*.tbd .
fi
if [ -d "$tbd_source/Libraries" ]; then
mkdir Libraries
cp -v $tbd_source/Libraries/*.tbd Libraries/
fi
ln -s -L "/System/Library/Frameworks/$nested_path/Versions/$current/Resources"
if [ -f "/System/Library/Frameworks/$nested_path/module.map" ]; then
ln -s "/System/Library/Frameworks/$nested_path/module.map"
fi
pushd "${sdk.out}/Library/Frameworks/$nested_path/Versions/$current" >/dev/null
local children=$(echo Frameworks/*.framework)
popd >/dev/null
for child in $children; do
childpath="$path/Versions/$current/$child"
linkFramework "$childpath"
done
pushd ../.. >/dev/null
ln -s "$current" Versions/Current
ln -s Versions/Current/* .
popd >/dev/null
popd >/dev/null
}
linkFramework "${name}.framework"
# linkFramework is recursive, the rest of the processing is not.
local tbd_source=${darwin-stubs}/System/Library/Frameworks/${name}.framework
for tbd in $extraTBDFiles; do
local tbd_dest_dir=$out/Library/Frameworks/${name}.framework/$(dirname "$tbd")
mkdir -p "$tbd_dest_dir"
cp -v "$tbd_source/$tbd" "$tbd_dest_dir"
done
# Fix and check tbd re-export references
find $out -name '*.tbd' | while read tbd; do
echo "Fixing re-exports in $tbd"
substituteInPlace "$tbd" ${mkFrameworkSubs name deps}
echo "Checking re-exports in $tbd"
print-reexports "$tbd" | while read target; do
local expected="''${target%.dylib}.tbd"
if ! [ -e "$expected" ]; then
echo -e "Re-export missing:\n\t$target\n\t(expected $expected)"
echo -e "While processing\n\t$tbd"
exit 1
else
echo "Re-exported target $target ok"
fi
done
done
'';
propagatedBuildInputs = builtins.attrValues deps;
# don't use pure CF for dylibs that depend on frameworks
setupHook = ./framework-setup-hook.sh;
# Not going to be more specific than this for now
__propagatedImpureHostDeps = lib.optionals (name != "Kernel") [
# The setup-hook ensures that everyone uses the impure CoreFoundation who uses these SDK frameworks, so let's expose it
"/System/Library/Frameworks/CoreFoundation.framework"
"/System/Library/Frameworks/${name}.framework"
"/System/Library/Frameworks/${name}.framework/${name}"
];
meta = with lib; {
description = "Apple SDK framework ${name}";
maintainers = with maintainers; [ copumpkin ];
platforms = platforms.darwin;
};
};
tbdOnlyFramework = name: { private ? true }: stdenv.mkDerivation {
name = "apple-framework-${name}";
dontUnpack = true;
installPhase = ''
mkdir -p $out/Library/Frameworks/
cp -r ${darwin-stubs}/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework \
$out/Library/Frameworks
cd $out/Library/Frameworks/${name}.framework
versions=(./Versions/*)
if [ "''${#versions[@]}" != 1 ]; then
echo "Unable to determine current version of framework ${name}"
exit 1
fi
current=$(basename ''${versions[0]})
chmod u+w -R .
ln -s "$current" Versions/Current
ln -s Versions/Current/* .
# NOTE there's no re-export checking here, this is probably wrong
'';
};
in rec {
libs = {
xpc = stdenv.mkDerivation {
name = "apple-lib-xpc";
dontUnpack = true;
installPhase = ''
mkdir -p $out/include
pushd $out/include >/dev/null
cp -r "${lib.getDev sdk}/include/xpc" $out/include/xpc
cp "${lib.getDev sdk}/include/launch.h" $out/include/launch.h
popd >/dev/null
'';
};
Xplugin = stdenv.mkDerivation {
name = "apple-lib-Xplugin";
dontUnpack = true;
# Not enough
__propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ];
propagatedBuildInputs = with frameworks; [
OpenGL ApplicationServices Carbon IOKit CoreGraphics CoreServices CoreText
];
installPhase = ''
mkdir -p $out/include $out/lib
ln -s "${lib.getDev sdk}/include/Xplugin.h" $out/include/Xplugin.h
cp ${darwin-stubs}/usr/lib/libXplugin.1.tbd $out/lib
ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd
'';
};
utmp = stdenv.mkDerivation {
name = "apple-lib-utmp";
dontUnpack = true;
installPhase = ''
mkdir -p $out/include
pushd $out/include >/dev/null
ln -s "${lib.getDev sdk}/include/utmp.h"
ln -s "${lib.getDev sdk}/include/utmpx.h"
popd >/dev/null
'';
};
sandbox = stdenv.mkDerivation {
name = "apple-lib-sandbox";
dontUnpack = true;
installPhase = ''
mkdir -p $out/include $out/lib
ln -s "${lib.getDev sdk}/include/sandbox.h" $out/include/sandbox.h
cp "${darwin-stubs}/usr/lib/libsandbox.1.tbd" $out/lib
ln -s libsandbox.1.tbd $out/lib/libsandbox.tbd
'';
};
};
overrides = super: {
AppKit = lib.overrideDerivation super.AppKit (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps or [] ++ [
"/System/Library/PrivateFrameworks/"
];
});
Carbon = lib.overrideDerivation super.Carbon (drv: {
extraTBDFiles = [ "Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering.tbd" ];
});
CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: {
setupHook = ./cf-setup-hook.sh;
});
CoreMedia = lib.overrideDerivation super.CoreMedia (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps or [] ++ [
"/System/Library/Frameworks/CoreImage.framework"
];
});
CoreMIDI = lib.overrideDerivation super.CoreMIDI (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps or [] ++ [
"/System/Library/PrivateFrameworks/"
];
setupHook = ./private-frameworks-setup-hook.sh;
});
IMServicePlugIn = lib.overrideDerivation super.IMServicePlugIn (drv: {
extraTBDFiles = [ "Versions/A/Frameworks/IMServicePlugInSupport.framework/Versions/A/IMServicePlugInSupport.tbd" ];
});
Security = lib.overrideDerivation super.Security (drv: {
setupHook = ./security-setup-hook.sh;
});
QuartzCore = lib.overrideDerivation super.QuartzCore (drv: {
installPhase = drv.installPhase + ''
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
substituteInPlace "$f" \
--replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage"
'';
});
MetalKit = lib.overrideDerivation super.MetalKit (drv: {
installPhase = drv.installPhase + ''
mkdir -p $out/include/simd
cp ${lib.getDev sdk}/include/simd/*.h $out/include/simd/
'';
});
WebKit = lib.overrideDerivation super.WebKit (drv: {
extraTBDFiles = [
"Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore.tbd"
"Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd"
];
});
} // lib.genAttrs [ "ContactsPersistence" "CoreSymbolication" "GameCenter" "SkyLight" "UIFoundation" ] (x: tbdOnlyFramework x {});
bareFrameworks = lib.mapAttrs framework (import ./frameworks.nix {
inherit frameworks libs;
inherit (pkgs.darwin) libobjc;
});
frameworks = bareFrameworks // overrides bareFrameworks;
inherit sdk;
}

View file

@ -0,0 +1,42 @@
# On macOS, frameworks are linked to the system CoreFoundation but
# dynamic libraries built with nix use a pure version of CF this
# causes segfaults for binaries that depend on it at runtime. This
# can be solved in two ways.
# 1. Rewrite references to the pure CF using this setup hook, this
# works for the simple case but this can still cause problems if other
# dependencies (eg. python) use the pure CF.
# 2. Create a wrapper for the binary that sets DYLD_FRAMEWORK_PATH to
# /System/Library/Frameworks. This will make everything load the
# system's CoreFoundation framework while still keeping the
# dependencies pure for other packages.
fixupOutputHooks+=('fixDarwinFrameworksIn $prefix')
fixDarwinFrameworks() {
local systemPrefix='/System/Library/Frameworks'
for fn in "$@"; do
if [ -L "$fn" ]; then continue; fi
echo "$fn: fixing dylib"
for framework in $(otool -L "$fn" | awk '/CoreFoundation\.framework/ {print $1}'); do
install_name_tool -change "$framework" "$systemPrefix/CoreFoundation.framework/Versions/A/CoreFoundation" "$fn" >&2
done
done
}
fixDarwinFrameworksIn() {
local dir="$1"
fixDarwinFrameworks $(find "$dir" -name "*.dylib")
}
# This configures the stdenv to use /System/Library/Frameworks/CoreFoundation.framework
# instead of the nix version by including the system frameworks path
# as an rpath entry when creating binaries.
useSystemCoreFoundationFramework () {
export NIX_COREFOUNDATION_RPATH=/System/Library/Frameworks
}
addEnvHooks "$hostOffset" useSystemCoreFoundationFramework

View file

@ -0,0 +1,129 @@
# Current as of 10.12
# Epic weird knot-tying happening here.
# TODO: clean up the process for generating this and include it
{ frameworks, libs, libobjc, }:
with frameworks; with libs; {
AGL = { inherit Carbon OpenGL; };
AVFoundation = { inherit ApplicationServices CoreGraphics CoreMedia MediaToolbox; };
AVKit = {};
Accounts = {};
AddressBook = { inherit libobjc Carbon ContactsPersistence; };
AppKit = { inherit ApplicationServices AudioToolbox AudioUnit Foundation QuartzCore UIFoundation; };
AppKitScripting = {};
AppleScriptKit = {};
AppleScriptObjC = {};
AudioToolbox = { inherit CoreAudio CoreMIDI; };
AudioUnit = { inherit AudioToolbox Carbon CoreAudio; };
AudioVideoBridging = { inherit Foundation; };
Automator = {};
CFNetwork = {};
CalendarStore = {};
Cocoa = { inherit AppKit CoreData; };
Collaboration = {};
# Impure version of CoreFoundation, this should not be used unless another
# framework includes headers that are not available in the pure version.
CoreFoundation = {};
CoreAudio = { inherit IOKit; };
CoreAudioKit = { inherit AudioUnit; };
CoreData = {};
CoreGraphics = { inherit Accelerate IOKit IOSurface SystemConfiguration; };
CoreImage = {};
CoreLocation = {};
CoreMIDI = {};
CoreMIDIServer = { inherit CoreMIDI; };
CoreMedia = { inherit ApplicationServices AudioToolbox AudioUnit CoreAudio CoreGraphics CoreVideo; };
CoreMediaIO = { inherit CoreMedia; };
CoreText = { inherit CoreGraphics; };
CoreVideo = { inherit ApplicationServices CoreGraphics IOSurface OpenGL; };
CoreWLAN = { inherit SecurityFoundation; };
DVDPlayback = {};
DirectoryService = {};
DiscRecording = { inherit libobjc CoreServices IOKit; };
DiscRecordingUI = {};
DiskArbitration = { inherit IOKit; };
EventKit = {};
ExceptionHandling = {};
FWAUserLib = {};
ForceFeedback = { inherit IOKit; };
Foundation = { inherit libobjc CoreFoundation Security ApplicationServices SystemConfiguration; };
GLKit = {};
GLUT = { inherit OpenGL; };
GSS = {};
GameCenter = {};
GameController = {};
GameKit = { inherit Cocoa Foundation GameCenter GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit; };
GameplayKit = {};
Hypervisor = {};
ICADevices = { inherit libobjc Carbon IOBluetooth; };
IMServicePlugIn = {};
IOBluetoothUI = { inherit IOBluetooth; };
IOKit = {};
IOSurface = { inherit IOKit xpc; };
ImageCaptureCore = {};
ImageIO = { inherit CoreGraphics; };
InputMethodKit = { inherit Carbon; };
InstallerPlugins = {};
InstantMessage = {};
JavaFrameEmbedding = {};
JavaNativeFoundation = {};
JavaRuntimeSupport = {};
JavaScriptCore = { inherit libobjc; };
Kerberos = {};
Kernel = { inherit IOKit; };
LDAP = {};
LatentSemanticMapping = { inherit Carbon; };
LocalAuthentication = {};
MapKit = {};
MediaAccessibility = { inherit CoreGraphics CoreText QuartzCore; };
MediaPlayer = {};
MediaToolbox = { inherit AudioToolbox AudioUnit CoreMedia; };
Metal = {};
MetalKit = { inherit ModelIO Metal; };
ModelIO = {};
NetFS = {};
OSAKit = { inherit Carbon; };
OpenAL = {};
OpenCL = { inherit IOSurface OpenGL; };
OpenGL = {};
PCSC = { inherit CoreData; };
PreferencePanes = {};
PubSub = {};
QTKit = { inherit CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox; };
QuickLook = { inherit ApplicationServices; };
SceneKit = {};
ScreenSaver = {};
Scripting = {};
ScriptingBridge = {};
Security = { inherit IOKit; };
SecurityFoundation = {};
SecurityInterface = { inherit Security SecurityFoundation; };
ServiceManagement = { inherit Security; };
Social = {};
SpriteKit = {};
StoreKit = {};
SyncServices = {};
SystemConfiguration = { inherit Security; };
TWAIN = { inherit Carbon; };
Tcl = {};
VideoDecodeAcceleration = { inherit CoreVideo; };
VideoToolbox = { inherit CoreMedia CoreVideo; };
WebKit = { inherit libobjc ApplicationServices Carbon JavaScriptCore OpenGL; };
# Umbrellas
Accelerate = { inherit CoreWLAN IOBluetooth; };
ApplicationServices = { inherit CoreGraphics CoreServices CoreText ImageIO; };
Carbon = { inherit libobjc ApplicationServices CoreServices Foundation IOKit Security QuartzCore; };
CoreBluetooth = {};
# TODO: figure out which part of the umbrella depends on CoreFoundation and move it there.
CoreServices = { inherit CFNetwork CoreFoundation CoreAudio CoreData DiskArbitration Security NetFS OpenDirectory ServiceManagement; };
IOBluetooth = { inherit CoreBluetooth IOKit; };
JavaVM = {};
OpenDirectory = {};
Quartz = { inherit QuartzCore QuickLook QTKit; };
QuartzCore = { inherit libobjc ApplicationServices CoreVideo OpenCL CoreImage Metal; };
QuickTime = { inherit ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore; };
vmnet = {};
}

View file

@ -0,0 +1,256 @@
rec {
CFNetwork = [
"/System/Library/Frameworks/CFNetwork.framework"
"/usr/lib/libsqlite3.dylib"
"/usr/lib/libxml2.2.dylib"
];
ForceFeedback = [
"/System/Library/Frameworks/ForceFeedback.framework"
];
AGL = [
"/System/Library/Frameworks/AGL.framework"
];
IOKit = [
"/System/Library/Frameworks/IOKit.framework"
];
JavaScriptCore = [
"/System/Library/Frameworks/JavaScriptCore.framework"
];
QuickLook = [
"/System/Library/Frameworks/QuickLook.framework"
];
Quartz = [
"/System/Library/Frameworks/Quartz.framework"
"/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo"
"/System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF"
"/usr/lib/libspindump.dylib"
];
ImageCaptureCore = [
"/System/Library/Frameworks/ImageCaptureCore.framework"
];
VideoToolbox = [
"/System/Library/Frameworks/VideoToolbox.framework"
"/System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA"
];
QuickTime = [
"/System/Library/Frameworks/QuickTime.framework"
];
CoreMedia = [
"/System/Library/Frameworks/CoreMedia.framework"
];
CoreMediaIO = [
"/System/Library/Frameworks/CoreMediaIO.framework"
"/System/Library/PrivateFrameworks/AppSandbox.framework/Versions/A/AppSandbox"
"/System/Library/PrivateFrameworks/AppContainer.framework/Versions/A/AppContainer"
"/System/Library/PrivateFrameworks/SecCodeWrapper.framework/Versions/A/SecCodeWrapper"
"/System/Library/PrivateFrameworks/XPCService.framework/Versions/A/XPCService"
"/usr/lib/libsandbox.1.dylib"
"/usr/lib/libMatch.1.dylib"
];
MediaToolbox = [
"/System/Library/Frameworks/MediaToolbox.framework"
"/System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC"
"/System/Library/PrivateFrameworks/NetworkStatistics.framework/Versions/A/NetworkStatistics"
];
QTKit = [
"/System/Library/Frameworks/QTKit.framework"
"/System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreMediaAuthoring"
];
OSAKit = [
"/System/Library/Frameworks/OSAKit.framework"
"/usr/lib/libexslt.0.dylib"
];
WebKit = [
"/System/Library/Frameworks/WebKit.framework"
];
DiskArbitration = [
"/System/Library/Frameworks/DiskArbitration.framework"
];
Security = [
"/System/Library/Frameworks/Security.framework"
"/usr/lib/libbsm.0.dylib"
"/usr/lib/libbz2.1.0.dylib"
"/usr/lib/libpam.2.dylib"
"/usr/lib/libxar.1.dylib"
"/usr/lib/libxml2.2.dylib"
"/usr/lib/libsqlite3.dylib"
];
GSS = [
"/System/Library/Frameworks/GSS.framework"
];
Kerberos = [
"/System/Library/Frameworks/Kerberos.framework"
];
CoreServices = [
"/System/Library/Frameworks/CoreServices.framework"
"/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore"
"/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC"
"/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling"
"/usr/lib/libmecabra.dylib"
"/usr/lib/libcmph.dylib"
"/usr/lib/libiconv.2.dylib"
"/usr/lib/libxslt.1.dylib"
] ++ Foundation;
IOSurface = [
"/System/Library/Frameworks/IOSurface.framework"
];
CoreGraphics = [
"/System/Library/Frameworks/CoreGraphics.framework"
"/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport"
"/usr/lib/libbsm.0.dylib"
"/usr/lib/libz.1.dylib"
];
CoreText = [
"/System/Library/Frameworks/CoreText.framework"
];
ImageIO = [
"/System/Library/Frameworks/ImageIO.framework"
];
ApplicationServices = [
"/System/Library/Frameworks/ApplicationServices.framework"
"/usr/lib/libcups.2.dylib"
"/usr/lib/libresolv.9.dylib"
] ++ AudioToolbox;
OpenGL = [
"/System/Library/Frameworks/OpenGL.framework"
];
CoreVideo = [
"/System/Library/Frameworks/CoreVideo.framework"
];
QuartzCore = [
"/System/Library/Frameworks/QuartzCore.framework"
"/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport"
];
PCSC = [
"/System/Library/Frameworks/PCSC.framework"
];
AppKit = [
"/System/Library/Frameworks/AppKit.framework"
"/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211"
"/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG"
"/System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA"
"/System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup"
"/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary"
"/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth"
"/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication"
"/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI"
"/System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi"
"/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport"
"/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore"
"/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols"
"/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv"
"/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore"
"/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage"
"/System/Library/PrivateFrameworks/Heimdal.framework/Heimdal"
"/System/Library/PrivateFrameworks/Heimdal.framework/Versions/Current"
"/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal"
"/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices"
"/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling"
"/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport"
"/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth"
"/System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis"
"/System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices"
"/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing"
"/System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore"
"/System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication"
"/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC"
"/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation"
"/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport"
"/usr/lib/libCRFSuite.dylib"
"/usr/lib/libOpenScriptingUtil.dylib"
"/usr/lib/libarchive.2.dylib"
"/usr/lib/libbsm.0.dylib"
"/usr/lib/libbz2.1.0.dylib"
"/usr/lib/libc++.1.dylib"
"/usr/lib/libc++abi.dylib"
"/usr/lib/libcmph.dylib"
"/usr/lib/libcups.2.dylib"
"/usr/lib/libextension.dylib"
"/usr/lib/libheimdal-asn1.dylib"
"/usr/lib/libiconv.2.dylib"
"/usr/lib/libicucore.A.dylib"
"/usr/lib/liblangid.dylib"
"/usr/lib/liblzma.5.dylib"
"/usr/lib/libmecabra.dylib"
"/usr/lib/libpam.2.dylib"
"/usr/lib/libresolv.9.dylib"
"/usr/lib/libsqlite3.dylib"
"/usr/lib/libxar.1.dylib"
"/usr/lib/libxml2.2.dylib"
"/usr/lib/libxslt.1.dylib"
"/usr/lib/libz.1.dylib"
];
Foundation = [
"/System/Library/Frameworks/Foundation.framework"
"/usr/lib/libextension.dylib"
"/usr/lib/libarchive.2.dylib"
"/usr/lib/liblzma.5.dylib"
"/usr/lib/liblangid.dylib"
"/usr/lib/libCRFSuite.dylib"
];
CoreData = [
"/System/Library/Frameworks/CoreData.framework"
];
Cocoa = [
"/System/Library/Frameworks/Cocoa.framework"
"/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation"
"/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A"
];
Carbon = [
"/System/Library/Frameworks/Carbon.framework"
"/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI"
"/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv"
"/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices"
"/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary"
"/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing"
"/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211"
"/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage"
];
CoreAudio = [
"/System/Library/Frameworks/CoreAudio.framework"
];
AudioUnit = [
"/System/Library/Frameworks/AudioUnit.framework"
];
CoreMIDI = [
"/System/Library/Frameworks/CoreMIDI.framework"
];
AudioToolbox = [
"/System/Library/Frameworks/AudioToolbox.framework"
];
SystemConfiguration = [
"/System/Library/Frameworks/SystemConfiguration.framework"
];
NetFS = [
"/System/Library/Frameworks/NetFS.framework"
"/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth"
"/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport"
];
Accelerate = [
"/System/Library/Frameworks/Accelerate.framework"
];
OpenDirectory = [
"/System/Library/Frameworks/OpenDirectory.framework"
];
ServiceManagement = [
"/System/Library/Frameworks/ServiceManagement.framework"
];
OpenCL = [
"/System/Library/Frameworks/OpenCL.framework"
];
CoreWLAN = [
"/System/Library/Frameworks/CoreWLAN.framework"
];
IOBluetooth = [
"/System/Library/Frameworks/IOBluetooth.framework"
] ++ AudioUnit ++ CoreBluetooth;
CoreBluetooth = [
"/System/Library/Frameworks/CoreBluetooth.framework"
];
SecurityFoundation = [
"/System/Library/Frameworks/SecurityFoundation.framework"
];
Kernel = [
"/System/Library/Frameworks/Kernel.framework"
];
}

View file

@ -0,0 +1,8 @@
addPrivateFrameworks() {
flag="-F/System/Library/PrivateFrameworks"
if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then
NIX_CFLAGS_COMPILE+=" $flag"
fi
}
addEnvHooks "$hostOffset" addPrivateFrameworks

View file

@ -0,0 +1,10 @@
noDeprecatedDeclarations() {
# Security.framework has about 2000 deprecated constants, all of which the user will be
# warned about at compilation time
flag="-Wno-deprecated-declarations"
if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then
NIX_CFLAGS_COMPILE+=" $flag"
fi
}
addEnvHooks "$hostOffset" noDeprecatedDeclarations