xcode: Drop use of weak_import on enumerators.

GCC doesn't support attributes on enumerators, which could pose a
problem but fortunately not in this case. Here a
__attribute__((weak_import)) is used, which doesn't make much sense for
enumerators anyway (noone will die because the corresponding enumerator
won't be referenced either in older OS X versions).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>

aszlig a6621202 5eb3dd8a

+23 -3
+10 -3
pkgs/os-specific/darwin/xcode/default.nix
··· 1 1 { stdenv, requireFile, xpwn }: 2 2 3 - stdenv.mkDerivation rec { 3 + with stdenv.lib; 4 + 5 + let 6 + osxVersion = "10.9"; 7 + in stdenv.mkDerivation rec { 4 8 name = "xcode-${version}"; 5 9 version = "5.0.2"; 6 10 ··· 10 14 sha256 = "0mrligqkfqwx8cy883pxm4w5w7a17nfh227zdspfll23r9agf32k"; 11 15 }; 12 16 13 - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; 17 + phases = [ "unpackPhase" "patchPhase" "installPhase" "fixupPhase" ]; 14 18 outputs = [ "out" "toolchain" ]; 19 + 15 20 16 21 unpackCmd = let 17 22 basePath = "Xcode.app/Contents/Developer/Platforms/MacOSX.platform"; ··· 21 26 ${xpwn}/bin/hfsplus main.hfs extractall "${sdkPath}" > /dev/null 22 27 ''; 23 28 24 - setSourceRoot = "sourceRoot=MacOSX10.9.sdk"; 29 + setSourceRoot = "sourceRoot=MacOSX${osxVersion}.sdk"; 30 + 31 + patches = optional (osxVersion == "10.9") ./gcc-fix-enum-attributes.patch; 25 32 26 33 installPhase = '' 27 34 ensureDir "$out/share/sysroot"
+13
pkgs/os-specific/darwin/xcode/gcc-fix-enum-attributes.patch
··· 1 + diff --git a/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h b/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h 2 + index fa0c290..7da7e0c 100644 3 + --- a/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h 4 + +++ b/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h 5 + @@ -13,7 +13,7 @@ typedef NS_ENUM(NSInteger, NSUserNotificationActivationType) { 6 + NSUserNotificationActivationTypeNone = 0, 7 + NSUserNotificationActivationTypeContentsClicked = 1, 8 + NSUserNotificationActivationTypeActionButtonClicked = 2, 9 + - NSUserNotificationActivationTypeReplied NS_AVAILABLE(10_9, NA) = 3 10 + + NSUserNotificationActivationTypeReplied = 3 11 + } NS_ENUM_AVAILABLE(10_8, NA); 12 + 13 + NS_CLASS_AVAILABLE(10_8, NA)