diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-03-12 06:43:57 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-03-12 10:00:49 +0100 |
commit | a6621202af47c826bd731ebefcbe5f573dc16ddd (patch) | |
tree | f74d33c1ec47f93486e3972770399f789593adf8 /pkgs/os-specific/darwin | |
parent | 5eb3dd8a1b952aba821aa55557232ee443dc19bb (diff) | |
download | nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.tar nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.tar.gz nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.tar.bz2 nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.tar.lz nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.tar.xz nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.tar.zst nixpkgs-a6621202af47c826bd731ebefcbe5f573dc16ddd.zip |
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>
Diffstat (limited to 'pkgs/os-specific/darwin')
-rw-r--r-- | pkgs/os-specific/darwin/xcode/default.nix | 13 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/xcode/gcc-fix-enum-attributes.patch | 13 |
2 files changed, 23 insertions, 3 deletions
diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 5c8e7a3ef6c..5d4546d63bf 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -1,6 +1,10 @@ { stdenv, requireFile, xpwn }: -stdenv.mkDerivation rec { +with stdenv.lib; + +let + osxVersion = "10.9"; +in stdenv.mkDerivation rec { name = "xcode-${version}"; version = "5.0.2"; @@ -10,9 +14,10 @@ stdenv.mkDerivation rec { sha256 = "0mrligqkfqwx8cy883pxm4w5w7a17nfh227zdspfll23r9agf32k"; }; - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; + phases = [ "unpackPhase" "patchPhase" "installPhase" "fixupPhase" ]; outputs = [ "out" "toolchain" ]; + unpackCmd = let basePath = "Xcode.app/Contents/Developer/Platforms/MacOSX.platform"; sdkPath = "${basePath}/Developer/SDKs"; @@ -21,7 +26,9 @@ stdenv.mkDerivation rec { ${xpwn}/bin/hfsplus main.hfs extractall "${sdkPath}" > /dev/null ''; - setSourceRoot = "sourceRoot=MacOSX10.9.sdk"; + setSourceRoot = "sourceRoot=MacOSX${osxVersion}.sdk"; + + patches = optional (osxVersion == "10.9") ./gcc-fix-enum-attributes.patch; installPhase = '' ensureDir "$out/share/sysroot" diff --git a/pkgs/os-specific/darwin/xcode/gcc-fix-enum-attributes.patch b/pkgs/os-specific/darwin/xcode/gcc-fix-enum-attributes.patch new file mode 100644 index 00000000000..1e1895c2894 --- /dev/null +++ b/pkgs/os-specific/darwin/xcode/gcc-fix-enum-attributes.patch @@ -0,0 +1,13 @@ +diff --git a/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h b/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h +index fa0c290..7da7e0c 100644 +--- a/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h ++++ b/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h +@@ -13,7 +13,7 @@ typedef NS_ENUM(NSInteger, NSUserNotificationActivationType) { + NSUserNotificationActivationTypeNone = 0, + NSUserNotificationActivationTypeContentsClicked = 1, + NSUserNotificationActivationTypeActionButtonClicked = 2, +- NSUserNotificationActivationTypeReplied NS_AVAILABLE(10_9, NA) = 3 ++ NSUserNotificationActivationTypeReplied = 3 + } NS_ENUM_AVAILABLE(10_8, NA); + + NS_CLASS_AVAILABLE(10_8, NA) |