-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
darwin.apple_sdk_12_3: init at 12.3 #326406
Conversation
065064e
to
6c13dd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i skipped some files but from what i can tell this downloads some tarballs and unpacks them then a bunch of derivations just copies files or creates symlinks from the unpacked tarballs.
so there are just some minor nits to align with the contribution guidelines like adding pre/post hooks if the Phase is overridden.
and then it seems that many of the derivations can just be using runCommandLocal as they are just copying files out of the unpacked SDK tarball.
I marked some but the comments are about the same on every derivation so i stopped.
pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_macOSNMOS_SDK.nix
Outdated
Show resolved
Hide resolved
pkgs/os-specific/darwin/apple-sdk-12.3/CLTools_macOSNMOS_SDK.nix
Outdated
Show resolved
Hide resolved
shouldn't there be a meta and license info somewhere in the derivations that download the sdk? |
There hasn’t been historically, and that’s not a can of worms I want to open. Putting a non-free license on big chunks of the SDK would make it effectively useless. |
ff7d3eb
to
7fb3f6f
Compare
I also dropped the CoreVideo and System framework overrides since they’re not necessary anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using stdenvNoCC
to be uniform across the derivations. does it actually matter? doubt it.
0054f17
to
9dbafcf
Compare
Making it fail at build time allows it to be used unversioned with `overrideSDK`. Unlike the QuickTime framework, which is present in the base SDK and was later removed, simd was added later.
9dbafcf
to
43d2975
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i started going over fframeworks/default.nix but realized large chunks are copy / paste from the sdk-11 framework (which perhaps is copy and pasted from the 10.12).
could the common code get pulled out? then i don't have to review it.
# Below this comment are entries migrated from before the generator was | ||
# added. If, for a given framework, you are able to reverify the extra | ||
# deps are really necessary on top of the generator deps, move it above | ||
# this comment (and maybe document your findings). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems unfortunate that these are not verified -- tho the top comment seems to say they are as it notes trial / error.
#229210 did that, but I wanted to keep this PR narrowly scoped by not touching the other SDKs if I could avoid it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok -- i am not going to review frameworks/default.nix since it is copy / paste. everything else LGTM
43d2975
to
6b28425
Compare
I switched the derivations with hooks and propagated inputs back to using |
6b28425
to
70e9ffd
Compare
Additionally, specify a 10.15 deployment target. According to the upstream documentation, 10.15 is the minimum macOS release supported at runtime.
70e9ffd
to
f635e39
Compare
Pushed one last round of cleanups. Confirmed that MoltenVK builds again on x86_64-darwin. |
Result of 172 packages marked as broken and skipped:
1 package failed to build:
22 packages built:
Executing cargoCheckHook
++ cargo test -j 10 --profile release --target aarch64-apple-darwin --offline -p rerun --workspace --exclude=crates/rerun/src/lib.rs -- --test-threads=10
warning: `/private/tmp/nix-build-rerun-0.13.0.drv-0/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: `/private/tmp/nix-build-rerun-0.13.0.drv-0/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
error: package ID specification `crates/rerun/src/lib.rs` looks like a file path, maybe try file:///private/tmp/nix-build-rerun-0.13.0.drv-0/source/crates/rerun/src/lib.rs |
rerun, the failed build, is broken on master $ hydra-check rerun --arch aarch64-darwin --short --channel master
Build Status for rerun.aarch64-darwin on master
✖ (Failed) rerun-0.13.0 from 2024-07-07 - https://hydra.nixos.org/build/265352979 |
Sounds good, thanks for double checking (and thanks for a new cli tool i need to use more often) |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
I just tried to use the
Now I'm getting the following error:
Maybe you have an idea? |
just found your comment #329653 (comment) on the same issue with |
CoreData should probably include CloudKit as one of its propagated frameworks. I submitted #331378 to fix that. The IOKit issue is probably the same as the Rust issue. Are you using |
No, I used:
(from |
See https://discourse.nixos.org/t/darwin-updates-news/42249/14 for more on using |
@reckenrode thanks. I've read through your article and through the code example. However I am not sure how to apply that to |
|
thanks! That was helpful. I did override
When building, it builds all the |
That looks right. Is the package materialx or a different one you’re working on? I‘m working on a Darwin refactor that changes how the SDKs work quite a bit. I’m looking for test cases if this is one that doesn’t work with (I realize this doesn’t help with your problem. What you’re doing should be update the stdenv, but it’s clearly still using the wrong libSystem, which is breaking your build. It may be this is another case that will be fixed once the refactor lands.) |
I'm sorry if its unrelated, I am quite confident it is but I am also not savvy enough with nix to know with certainty. |
Yes, it's
I have time. I just follow your darwin Updates thread in discourse and thought I give it a try. |
As part of the Darwin refactor, the following SDKs will be added: 10.12.2, 10.13.2, 10.14.6, 10.15.6, 11.3, 12.3, 13.3, 14.4. I assume one of those should have the APIs you need. There are two parts to the refactor:
Once the refactor lands, overriding SDKs will work by adding the required SDK as a build input. The SDK has all the required frameworks and buildInputs = lib.optionals stdenv.isDarwin [ apple-sdk_14 (darwinMinVersionHook "10.15") ]; Unfortunately, there’s probably not much you can do until this lands. You might be able to use xcodeenv, but I’m not very familiar with it.
I confirmed that MaterialX built using the above build inputs. Checking the shared objects in the result shows they are linked against the 14.4 SDK. I have the SDKs building and some packages building with them (now including MaterialX). It’s possible the refactor could make the next staging-next cycle, but that’s very unlikely. The one after is more likely, and making 24.11 is almost definitely. I still need to implement the hooks to implement resolution and get the bootstrap working. |
Description of changes
This PR extracts the 12.3 SDK from #229210 by @ConnorBaker.
Note that it does not replace the refactor work I plan to do nor does it integrate the Apple OSS releases to provide headers, but I am adding the 12.3 SDK for packages that need it before the rework can land. To use the 12.3 SDK, use
overrideSDK
. See the MoltenVK derivation for an example. Theapple_sdk.callPackage
pattern is not supported.Testing was done by updating MoltenVK to build with the 12.3 SDK.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.