Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using MacOS SDK 11.0 on x86 #146385

Closed
arximboldi opened this issue Nov 17, 2021 · 1 comment
Closed

Using MacOS SDK 11.0 on x86 #146385

arximboldi opened this issue Nov 17, 2021 · 1 comment
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin

Comments

@arximboldi
Copy link
Contributor

arximboldi commented Nov 17, 2021

I am writting an application for Mac that is packaged using Nix. We need features SDK 10.14, namely setting the dark theme. Sadly, the provided Apple SDK is ancient, version 10.12. I notice that there is another issue #101229 trying to tackle this.

However, I've also noticed that SDK 11.0 is already provided fro AArch64 (I guess for new M1 Macs?). I have tried to use it on my my machine by doing directly:

let apple_sdk_11_0 = pkgs.callPackage (nixpkgs + "/pkgs/os-specific/darwin/apple-sdk-11.0") { };

And then referencing the frameworks I need:

    apple_sdk_11_0.frameworks.AppKit
    apple_sdk_11_0.frameworks.Cocoa
    apple_sdk_11_0.frameworks.CoreAudio
    apple_sdk_11_0.frameworks.CoreMIDI
    apple_sdk_11_0.frameworks.CoreServices
    apple_sdk_11_0.frameworks.Security
    apple_sdk_11_0.frameworks.OpenGL

However, I eventually get this error:

Fixing re-exports in /nix/store/wfbgjyxfi6f6alds7x776im99w4cwjc2-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation.tbd
Errors occurred during rewrite of /nix/store/wfbgjyxfi6f6alds7x776im99w4cwjc2-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation.tbd
Rewrite config:
Exact mappings:
Prefix mappings:
  - /System/Library/Frameworks/CoreFoundation.framework/ -> /nix/store/wfbgjyxfi6f6alds7x776im99w4cwjc2-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/
Required prefix: /nix/store
Check existence of resulting paths: yes

The following paths did not match any rewrite rule
  /usr/lib/libobjc.A.dylib
libc++abi.dylib: terminating with uncaught exception of type rewrite_errors: Rewriting failed
/nix/store/gwwzsi23mliqi2d70klrcy6xx53pphzp-stdenv-darwin/setup: line 1336:  1912 Abort trap: 6           rewrite-tbd -p /System/Library/Frameworks/CoreFoundation.framework/:$out/Library/Frameworks/CoreFoundation.framework/ -r /nix/store "$tbd"
builder for '/nix/store/ayinqb5wwn6xsibd4dwc43dwr12827zd-apple-framework-CoreFoundation-11.0.0.drv' failed with exit code 134
building '/nix/store/kifg6y51p2fbjh6qjl35nyb9v4aambgr-apple-framework-CoreImage-11.0.0.drv'...
cannot build derivation '/nix/store/f9q9qg05pizb9r05jrqavnimb4j7n8zj-apple-framework-CoreServices-11.0.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/75h9dnjjfk3aq1cx4jjj60zlhj0yq78s-apple-framework-AppKit-11.0.0.drv', '/nix/store/8nhl31v120g0l38p9wa4v7acrcbznnxr-apple-framework-Cocoa-11.0.0.drv', '/nix/store/f9q9qg05pizb9r05jrqavnimb4j7n8zj-apple-framework-CoreServices-11.0.0.drv', '/nix/store/fk7n2x1hihpgc07yqszxfnj9jg8h4gk9-apple-framework-CoreAudio-11.0.0.drv', '/nix/store/j4w77hd0wnbq5ry3q8rf34ab780f9h48-apple-framework-OpenGL-11.0.0.drv', '/nix/store/ski71253n10hsgb3i1rr7qi430l6glch-apple-framework-CoreMIDI-11.0.0.drv', '/nix/store/yn4224613x2h257axqbj1qazni3k58yb-apple-framework-Security-11.0.0.drv' failed

Is there a workaround for this? Any other workarounds that you can suggest?

@arximboldi arximboldi added the 0.kind: bug Something is broken label Nov 17, 2021
@domenkozar domenkozar added the 6.topic: darwin Running or building packages on Darwin label Nov 17, 2021
@reckenrode
Copy link
Contributor

The 11.0 SDK is now available on x86_64-darwin with the merging of #176661.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

3 participants