darwin packages: Get ready for cross
If things build fine with `stdenvNoCC`, let them use that. If tools might be prefixed, prepare for that, either by directly splicing or just using the env vars provided by the wrapper setup-hooks. Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
This commit is contained in:
parent
912c8262b4
commit
7bba32a069
32 changed files with 213 additions and 186 deletions
|
@ -1,6 +1,6 @@
|
|||
{ lib, appleDerivation }:
|
||||
{ lib, appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, appleDerivation }:
|
||||
{ lib, appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/CommonCrypto
|
||||
cp include/* $out/include/CommonCrypto
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ lib, appleDerivation }:
|
||||
{ lib, appleDerivation', stdenv }:
|
||||
|
||||
appleDerivation' stdenv {
|
||||
|
||||
appleDerivation {
|
||||
prePatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/lib /lib \
|
||||
--replace /usr/local/lib /lib \
|
||||
--replace /usr/bin "" \
|
||||
--replace /bin/ "" \
|
||||
--replace "CC = " "CC = cc #" \
|
||||
--replace "CC = " "#" \
|
||||
--replace "SDK_DIR = " "SDK_DIR = . #" \
|
||||
|
||||
# Mac OS didn't support rpaths back before 10.5, but we don't care about it.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, appleDerivation, IOKitSrcs, xnu, darwin-stubs }:
|
||||
{ lib, appleDerivation', stdenv, IOKitSrcs, xnu, darwin-stubs }:
|
||||
|
||||
# Someday it'll make sense to split these out into their own packages, but today is not that day.
|
||||
appleDerivation {
|
||||
appleDerivation' stdenv {
|
||||
srcs = lib.attrValues IOKitSrcs;
|
||||
sourceRoot = ".";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation, ed, unifdef }:
|
||||
{ appleDerivation', stdenvNoCC, ed, unifdef }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
nativeBuildInputs = [ ed unifdef ];
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }:
|
||||
{ appleDerivation', stdenvNoCC, ed, unifdef, Libc_old, Libc_10-9 }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
nativeBuildInputs = [ ed unifdef ];
|
||||
|
||||
# TODO: asl.h actually comes from syslog project now
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
substituteInPlace xcodescripts/install_files.sh \
|
||||
--replace "/usr/local/" "/" \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp notify.h $out/include
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ lib, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo
|
||||
{ lib, stdenv, buildPackages
|
||||
, appleDerivation', cpio, xnu, Libc, Libm, libdispatch, Libinfo
|
||||
, dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto
|
||||
, copyfile, removefile, libresolv, Libnotify, libplatform, libpthread
|
||||
, mDNSResponder, launchd, libutil, hfs, darling, darwin-stubs }:
|
||||
, copyfile, removefile, libresolvHeaders, libresolv, Libnotify, libplatform, libpthread
|
||||
, mDNSResponder, launchd, libutilHeaders, hfsHeaders, darling, darwin-stubs
|
||||
, headersOnly ? false
|
||||
, withLibresolv ? !headersOnly
|
||||
}:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenv {
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
|
@ -21,13 +25,13 @@ appleDerivation {
|
|||
|
||||
for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} \
|
||||
${libclosure} ${CarbonHeaders} ${libdispatch} ${ncurses.dev} \
|
||||
${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
|
||||
${CommonCrypto} ${copyfile} ${removefile} ${libresolvHeaders} \
|
||||
${Libnotify} ${libplatform} ${mDNSResponder} ${launchd} \
|
||||
${libutil} ${libpthread} ${hfs}; do
|
||||
${libutilHeaders} ${libpthread} ${hfsHeaders}; do
|
||||
(cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
|
||||
done
|
||||
|
||||
(cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
|
||||
(cd ${buildPackages.darwin.cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
|
||||
|
||||
mkdir -p $out/include/os
|
||||
|
||||
|
@ -84,6 +88,7 @@ appleDerivation {
|
|||
#define TARGET_RT_64_BIT 1
|
||||
#endif /* __TARGETCONDITIONALS__ */
|
||||
EOF
|
||||
'' + lib.optionalString (!headersOnly) ''
|
||||
|
||||
# The startup object files
|
||||
cp ${Csu}/lib/* $out/lib
|
||||
|
@ -101,14 +106,15 @@ appleDerivation {
|
|||
for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
|
||||
ln -s libSystem.tbd $out/lib/lib$name.tbd
|
||||
done
|
||||
'' + lib.optionalString withLibresolv ''
|
||||
|
||||
# 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
|
||||
resolv_libSystem=$(${stdenv.cc.bintools.targetPrefix}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 \
|
||||
${stdenv.cc.bintools.targetPrefix}install_name_tool \
|
||||
-id $out/lib/libresolv.9.dylib \
|
||||
-change "$resolv_libSystem" /usr/lib/libSystem.dylib \
|
||||
$out/lib/libresolv.9.dylib
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation, darwin-stubs }:
|
||||
{ appleDerivation', stdenv, darwin-stubs }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenv {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
__propagatedImpureHostDeps = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, appleDerivation }:
|
||||
{ lib, appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
dontBuild = true;
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
{ lib, stdenv, appleDerivation, bison, flex }:
|
||||
{ lib, appleDerivation, stdenv, bison, flex }:
|
||||
|
||||
let
|
||||
|
||||
# Hard to get CC to pull this off without infinite recursion
|
||||
targetTargetPrefix = lib.optionalString
|
||||
(with stdenv; hostPlatform != targetPlatform)
|
||||
(stdenv.targetPlatform.config + "-");
|
||||
|
||||
in
|
||||
|
||||
appleDerivation {
|
||||
nativeBuildInputs = [ bison flex ];
|
||||
|
@ -12,7 +21,7 @@ appleDerivation {
|
|||
yacc -d parser.y
|
||||
flex --header-file=lexxer.yy.h -o lexxer.yy.c lexxer.l
|
||||
|
||||
cc -std=gnu99 -Os -dead_strip -DMIG_VERSION=\"$pname-$version\" -I. -o migcom *.c
|
||||
$CC -std=gnu99 -Os -dead_strip -DMIG_VERSION=\"$pname-$version\" -I. -o migcom *.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -29,6 +38,6 @@ appleDerivation {
|
|||
--replace 'arch=`/usr/bin/arch`' 'arch=${stdenv.targetPlatform.darwinArch}' \
|
||||
--replace '/usr/bin/' "" \
|
||||
--replace '/bin/rmdir' "rmdir" \
|
||||
--replace 'C=''${MIGCC}' "C=cc"
|
||||
--replace 'C=''${MIGCC}' "C=${targetTargetPrefix}cc"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, appleDerivation, launchd, bootstrap_cmds, xnu, ppp, IOKit, eap8021x, Security }:
|
||||
{ stdenv, appleDerivation', launchd, bootstrap_cmds, xnu, ppp, IOKit, eap8021x, Security }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenv {
|
||||
meta.broken = stdenv.cc.nativeLibc;
|
||||
|
||||
nativeBuildInputs = [ bootstrap_cmds ];
|
||||
|
@ -127,78 +127,78 @@ appleDerivation {
|
|||
mig -arch x86_64 -header derived/helper.h -user derived/helperUser.c -sheader /dev/null -server /dev/null helper/helper.defs
|
||||
mig -arch x86_64 -header derived/pppcontroller.h -user derived/pppcontrollerUser.c -sheader /dev/null -server /dev/null pppcontroller.defs
|
||||
|
||||
cc -I. -Ihelper -Iderived -F. -c SCSchemaDefinitions.c -o SCSchemaDefinitions.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCD.c -o SCD.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDKeys.c -o SCDKeys.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDPrivate.c -o SCDPrivate.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDPlugin.c -o SCDPlugin.o
|
||||
cc -I. -Ihelper -Iderived -F. -c CaptiveNetwork.c -o CaptiveNetwork.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDOpen.c -o SCDOpen.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDList.c -o SCDList.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDAdd.c -o SCDAdd.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDGet.c -o SCDGet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDSet.c -o SCDSet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDRemove.c -o SCDRemove.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotify.c -o SCDNotify.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierSetKeys.c -o SCDNotifierSetKeys.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierAdd.c -o SCDNotifierAdd.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierRemove.c -o SCDNotifierRemove.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierGetChanges.c -o SCDNotifierGetChanges.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierWait.c -o SCDNotifierWait.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaCallback.c -o SCDNotifierInformViaCallback.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaFD.c -o SCDNotifierInformViaFD.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaSignal.c -o SCDNotifierInformViaSignal.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDNotifierCancel.c -o SCDNotifierCancel.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDSnapshot.c -o SCDSnapshot.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCP.c -o SCP.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPOpen.c -o SCPOpen.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPLock.c -o SCPLock.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPUnlock.c -o SCPUnlock.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPList.c -o SCPList.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPGet.c -o SCPGet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPAdd.c -o SCPAdd.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPSet.c -o SCPSet.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPRemove.c -o SCPRemove.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPCommit.c -o SCPCommit.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPApply.c -o SCPApply.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPPath.c -o SCPPath.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDConsoleUser.c -o SCDConsoleUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCDHostName.c -o SCDHostName.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCLocation.c -o SCLocation.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetwork.c -o SCNetwork.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/pppcontrollerUser.c -o pppcontrollerUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkConnection.c -o SCNetworkConnection.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkConnectionPrivate.c -o SCNetworkConnectionPrivate.o
|
||||
cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c SCNetworkReachability.c -o SCNetworkReachability.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCProxies.c -o SCProxies.o
|
||||
cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
|
||||
cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
|
||||
cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
|
||||
cc -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
|
||||
cc -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
|
||||
cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkConfigurationInternal.c -o SCNetworkConfigurationInternal.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkInterface.c -o SCNetworkInterface.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
|
||||
cc -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
|
||||
cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
|
||||
cc -I. -Ihelper -Iderived -F. -c VPNPrivate.c -o VPNPrivate.o
|
||||
cc -I. -Ihelper -Iderived -F. -c VPNConfiguration.c -o VPNConfiguration.o
|
||||
cc -I. -Ihelper -Iderived -F. -c VPNTunnel.c -o VPNTunnel.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/helperUser.c -o helperUser.o
|
||||
cc -I. -Ihelper -Iderived -F. -c reachability/SCNetworkReachabilityServer_client.c -o SCNetworkReachabilityServer_client.o
|
||||
cc -I. -Ihelper -Iderived -F. -c reachability/rb.c -o rb.o
|
||||
cc -I. -Ihelper -Iderived -F. -c derived/SystemConfiguration_vers.c -o SystemConfiguration_vers.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCSchemaDefinitions.c -o SCSchemaDefinitions.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCD.c -o SCD.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDKeys.c -o SCDKeys.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDPrivate.c -o SCDPrivate.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDPlugin.c -o SCDPlugin.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c CaptiveNetwork.c -o CaptiveNetwork.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDOpen.c -o SCDOpen.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDList.c -o SCDList.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDAdd.c -o SCDAdd.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDGet.c -o SCDGet.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDSet.c -o SCDSet.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDRemove.c -o SCDRemove.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotify.c -o SCDNotify.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierSetKeys.c -o SCDNotifierSetKeys.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierAdd.c -o SCDNotifierAdd.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierRemove.c -o SCDNotifierRemove.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierGetChanges.c -o SCDNotifierGetChanges.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierWait.c -o SCDNotifierWait.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaCallback.c -o SCDNotifierInformViaCallback.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaFD.c -o SCDNotifierInformViaFD.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierInformViaSignal.c -o SCDNotifierInformViaSignal.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDNotifierCancel.c -o SCDNotifierCancel.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDSnapshot.c -o SCDSnapshot.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCP.c -o SCP.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPOpen.c -o SCPOpen.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPLock.c -o SCPLock.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPUnlock.c -o SCPUnlock.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPList.c -o SCPList.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPGet.c -o SCPGet.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPAdd.c -o SCPAdd.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPSet.c -o SCPSet.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPRemove.c -o SCPRemove.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPCommit.c -o SCPCommit.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPApply.c -o SCPApply.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPPath.c -o SCPPath.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDConsoleUser.c -o SCDConsoleUser.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCDHostName.c -o SCDHostName.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCLocation.c -o SCLocation.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetwork.c -o SCNetwork.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c derived/pppcontrollerUser.c -o pppcontrollerUser.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkConnection.c -o SCNetworkConnection.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkConnectionPrivate.c -o SCNetworkConnectionPrivate.o
|
||||
$CC -I. -Ihelper -Iderived -I../dnsinfo -F. -c SCNetworkReachability.c -o SCNetworkReachability.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCProxies.c -o SCProxies.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
|
||||
$CC -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
|
||||
$CC -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
|
||||
$CC -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkConfigurationInternal.c -o SCNetworkConfigurationInternal.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkInterface.c -o SCNetworkInterface.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
|
||||
$CC -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o
|
||||
$CC -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c VPNPrivate.c -o VPNPrivate.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c VPNConfiguration.c -o VPNConfiguration.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c VPNTunnel.c -o VPNTunnel.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c derived/helperUser.c -o helperUser.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c reachability/SCNetworkReachabilityServer_client.c -o SCNetworkReachabilityServer_client.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c reachability/rb.c -o rb.o
|
||||
$CC -I. -Ihelper -Iderived -F. -c derived/SystemConfiguration_vers.c -o SystemConfiguration_vers.o
|
||||
|
||||
cc -dynamiclib *.o -install_name $out/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration -dead_strip -framework CoreFoundation -single_module -o SystemConfiguration.framework/SystemConfiguration
|
||||
$CC -dynamiclib *.o -install_name $out/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration -dead_strip -framework CoreFoundation -single_module -o SystemConfiguration.framework/SystemConfiguration
|
||||
|
||||
popd >/dev/null
|
||||
'';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, stdenvNoCC, fetchurl, fetchzip, pkgs }:
|
||||
{ lib, stdenv, fetchurl, fetchzip, pkgs }:
|
||||
|
||||
let
|
||||
# This attrset can in theory be computed automatically, but for that to work nicely we need
|
||||
|
@ -154,7 +154,7 @@ let
|
|||
version = versions.${sdkName}.${pname};
|
||||
in fetchApple' pname version sha256;
|
||||
|
||||
appleDerivation' = pname: version: sdkName: sha256: attrs: stdenv.mkDerivation ({
|
||||
appleDerivation'' = stdenv: pname: version: sdkName: sha256: attrs: stdenv.mkDerivation ({
|
||||
inherit pname version;
|
||||
|
||||
src = if attrs ? srcs then null else (fetchApple' pname version sha256);
|
||||
|
@ -223,8 +223,9 @@ let
|
|||
applePackage' = namePath: version: sdkName: sha256:
|
||||
let
|
||||
pname = builtins.head (lib.splitString "/" namePath);
|
||||
appleDerivation = appleDerivation' pname version sdkName sha256;
|
||||
callPackage = self.newScope { inherit appleDerivation; };
|
||||
appleDerivation' = stdenv: appleDerivation'' stdenv pname version sdkName sha256;
|
||||
appleDerivation = appleDerivation' stdenv;
|
||||
callPackage = self.newScope { inherit appleDerivation' appleDerivation; };
|
||||
in callPackage (./. + "/${namePath}");
|
||||
|
||||
applePackage = namePath: sdkName: sha256: let
|
||||
|
@ -272,17 +273,16 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // {
|
|||
libplatform = applePackage "libplatform" "osx-10.12.6" "0rh1f5ybvwz8s0nwfar8s0fh7jbgwqcy903cv2x8m15iq1x599yn" {};
|
||||
libpthread = applePackage "libpthread" "osx-10.12.6" "1j6541rcgjpas1fc77ip5krjgw4bvz6jq7bq7h9q7axb0jv2ns6c" {};
|
||||
libresolv = applePackage "libresolv" "osx-10.12.6" "077j6ljfh7amqpk2146rr7dsz5vasvr3als830mgv5jzl7l6vz88" {};
|
||||
Libsystem = applePackage "Libsystem" "osx-10.12.6" "1082ircc1ggaq3wha218vmfa75jqdaqidsy1bmrc4ckfkbr3bwx2" {
|
||||
libutil = pkgs.darwin.libutil.override { headersOnly = true; };
|
||||
hfs = pkgs.darwin.hfs.override { headersOnly = true; };
|
||||
};
|
||||
Libsystem = applePackage "Libsystem" "osx-10.12.6" "1082ircc1ggaq3wha218vmfa75jqdaqidsy1bmrc4ckfkbr3bwx2" {};
|
||||
libutil = applePackage "libutil" "osx-10.12.6" "0lqdxaj82h8yjbjm856jjz9k2d96k0viimi881akfng08xk1246y" {};
|
||||
libunwind = applePackage "libunwind" "osx-10.12.6" "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {};
|
||||
mDNSResponder = applePackage "mDNSResponder" "osx-10.12.6" "02ms1p8zlgmprzn65jzr7yaqxykh3zxjcrw0c06aayim6h0dsqfy" {};
|
||||
objc4 = applePackage "objc4" "osx-10.12.6" "1cj1vhbcs9pkmag2ms8wslagicnq9bxi2qjkszmp3ys7z7ccrbwz" {};
|
||||
ppp = applePackage "ppp" "osx-10.12.6" "1kcc2nc4x1kf8sz0a23i6nfpvxg381kipi0qdisrp8x9z2gbkxb8" {};
|
||||
removefile = applePackage "removefile" "osx-10.12.6" "0jzjxbmxgjzhssqd50z7kq9dlwrv5fsdshh57c0f8mdwcs19bsyx" {};
|
||||
xnu = applePackage "xnu" "osx-10.12.6" "1sjb0i7qzz840v2h4z3s4jyjisad4r5yyi6sg8pakv3wd81i5fg5" {};
|
||||
xnu = applePackage "xnu" "osx-10.12.6" "1sjb0i7qzz840v2h4z3s4jyjisad4r5yyi6sg8pakv3wd81i5fg5" {
|
||||
python3 = pkgs.buildPackages.buildPackages.python3; # TODO(@Ericson2314) this shouldn't be needed.
|
||||
};
|
||||
hfs = applePackage "hfs" "osx-10.12.6" "1mj3xvqpq1mgd80b6kl1s04knqnap7hccr0gz8rjphalq14rbl5g" {};
|
||||
Librpcsvc = applePackage "Librpcsvc" "osx-10.11.6" "1zwfwcl9irxl1dlnf2b4v30vdybp0p0r6n6g1pd14zbdci1jcg2k" {};
|
||||
adv_cmds = applePackage "adv_cmds" "osx-10.11.6" "12gbv35i09aij9g90p6b3x2f3ramw43qcb2gjrg8lzkzmwvcyw9q" {};
|
||||
|
@ -297,6 +297,10 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // {
|
|||
top = applePackage "top" "osx-10.11.6" "0i9120rfwapgwdvjbfg0ya143i29s1m8zbddsxh39pdc59xnsg5l" {};
|
||||
PowerManagement = applePackage "PowerManagement" "osx-10.11.6" "1llimhvp0gjffd47322lnjq7cqwinx0c5z7ikli04ad5srpa68mh" {};
|
||||
|
||||
libutilHeaders = pkgs.darwin.libutil.override { headersOnly = true; };
|
||||
hfsHeaders = pkgs.darwin.hfs.override { headersOnly = true; };
|
||||
libresolvHeaders= pkgs.darwin.libresolv.override { headersOnly = true; };
|
||||
|
||||
# TODO(matthewbauer):
|
||||
# To be removed, once I figure out how to build a newer Security version.
|
||||
Security = applePackage "Security/boot.nix" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, appleDerivation }:
|
||||
{ lib, appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/include
|
||||
ln -s /usr/lib/dyld $out/lib/dyld
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenv }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenv {
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/Library/Frameworks/EAP8021X.framework/Headers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation, lib, headersOnly ? true }:
|
||||
{ appleDerivation', stdenv, stdenvNoCC, lib, headersOnly ? true }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
|
||||
installPhase = lib.optionalString headersOnly ''
|
||||
mkdir -p $out/include/hfs
|
||||
cp core/*.h $out/include/hfs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
# No clue why the same file has two different names. Ask Apple!
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/ $out/include/servers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
cp *.h $out/include/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r include $out/include
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, appleDerivation, libdispatch, xnu }:
|
||||
{ lib, appleDerivation', stdenvNoCC, libdispatch, xnu }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
propagatedBuildInputs = [ libdispatch xnu ];
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,37 +1,39 @@
|
|||
{ appleDerivation, Libinfo, configd, mDNSResponder }:
|
||||
{ lib, appleDerivation', stdenv, stdenvNoCC, Libinfo, configd, mDNSResponder
|
||||
, headersOnly ? false
|
||||
}:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ Libinfo configd mDNSResponder ];
|
||||
appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
|
||||
buildInputs = lib.optionals (!headersOnly) [ 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 -current_version 1.0.0 -compatibility_version 1.0.0 -o libresolv.9.dylib *.o
|
||||
buildPhase = lib.optionalString (!headersOnly) ''
|
||||
$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 -current_version 1.0.0 -compatibility_version 1.0.0 -o libresolv.9.dylib *.o
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -42,6 +44,7 @@ appleDerivation {
|
|||
cp nameser.h $out/include
|
||||
ln -s ../nameser.h $out/include/arpa
|
||||
cp resolv.h $out/include
|
||||
'' + lib.optionalString (!headersOnly) ''
|
||||
|
||||
cp libresolv.9.dylib $out/lib
|
||||
ln -s libresolv.9.dylib $out/lib/libresolv.dylib
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ lib, appleDerivation, xcbuildHook
|
||||
{ lib, stdenv, stdenvNoCC, appleDerivation', xcbuildHook
|
||||
|
||||
# headersOnly is true when building for libSystem
|
||||
, headersOnly ? false }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
|
||||
nativeBuildInputs = lib.optional (!headersOnly) xcbuildHook;
|
||||
|
||||
prePatch = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenv }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenv {
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/ppp
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ appleDerivation }:
|
||||
{ appleDerivation', stdenvNoCC }:
|
||||
|
||||
appleDerivation {
|
||||
appleDerivation' stdenvNoCC {
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/
|
||||
cp removefile.h checkint.h $out/include/
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{ appleDerivation, lib, bootstrap_cmds, bison, flex
|
||||
{ appleDerivation', lib, stdenv, stdenvNoCC, buildPackages
|
||||
, bootstrap_cmds, bison, flex
|
||||
, gnum4, unifdef, perl, python3
|
||||
, headersOnly ? true }:
|
||||
, headersOnly ? true
|
||||
}:
|
||||
|
||||
appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ({
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
appleDerivation ({
|
||||
nativeBuildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python3 ];
|
||||
|
||||
patches = [ ./python3.patch ];
|
||||
|
@ -44,16 +48,16 @@ appleDerivation ({
|
|||
|
||||
PLATFORM = "MacOSX";
|
||||
SDKVERSION = "10.11";
|
||||
CC = "cc";
|
||||
CXX = "c++";
|
||||
CC = "${stdenv.cc.targetPrefix or ""}cc";
|
||||
CXX = "${stdenv.cc.targetPrefix or ""}c++";
|
||||
MIG = "mig";
|
||||
MIGCOM = "migcom";
|
||||
STRIP = "strip";
|
||||
NM = "nm";
|
||||
STRIP = "${stdenv.cc.bintools.targetPrefix or ""}strip";
|
||||
NM = "${stdenv.cc.bintools.targetPrefix or ""}nm";
|
||||
UNIFDEF = "unifdef";
|
||||
DSYMUTIL = "dsymutil";
|
||||
HOST_OS_VERSION = "10.10";
|
||||
HOST_CC = "cc";
|
||||
HOST_CC = "${buildPackages.stdenv.cc.targetPrefix or ""}cc";
|
||||
HOST_FLEX = "flex";
|
||||
HOST_BISON = "bison";
|
||||
HOST_GM4 = "m4";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenvNoCC, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "darwin-stubs";
|
||||
version = "10.12";
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ in rec {
|
|||
'';
|
||||
};
|
||||
|
||||
darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenv fetchurl; };
|
||||
darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenvNoCC fetchurl; };
|
||||
|
||||
dyld = {
|
||||
name = "bootstrap-stage0-dyld";
|
||||
|
|
Loading…
Reference in a new issue