Skip to content

apple-sdk_26: init at 26.0#454747

Merged
emilazy merged 5 commits intoNixOS:masterfrom
Samasaur1:push-zxpzuwnvtqko
Oct 23, 2025
Merged

apple-sdk_26: init at 26.0#454747
emilazy merged 5 commits intoNixOS:masterfrom
Samasaur1:push-zxpzuwnvtqko

Conversation

@Samasaur1
Copy link
Member

It's October again, and you know what that means... a new macOS release! This year, building on the foundation of #346043 and following in the footsteps of #347862, we aim to introduce a new apple-sdk version, as part of what will hopefully continue to be a regular process.

This PR adds the macOS 26.0 Tahoe SDK as apple-sdk_26. I followed the steps that @emilazy thoroughly documented in #347862, so I won't go into too much detail, but I do have a few notes.

The biggest challenge I faced was coming up with a test package. I've never had a reason to go looking for APIs introduced in a specific version before, so I wasn't sure where to start. I ended up searching for __sqrtf16, which led me to the strategy of grepping inside /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include for macos(26. This worked, and I found many new APIs. I picked an API from the new Spatial framework and got down to business.

Everything seemed to be working as expected: my test program compiled with the Xcode toolchain and ran on my Tahoe VM, but took the fallback path after failing the availability check on my Sequoia laptop. It failed to compile with the latest apple-sdk in nixpkgs (15), but when I added the 26.0 SDK it built fine, exhibiting the same behavior as my Xcode-toolchain-built binary. However, things got confusing when I added (darwinMinVersionHook "26.0"): the resulting binary continued to work on my Tahoe VM but surprisingly also worked on my Sequoia laptop.

This was surprising and unintuitive to me. It sounds like (based on conversations on Matrix with people who understand this better than I do) that this implies Spatial was a private framework on Sequoia that was nonetheless usable. I went back to my ripgrep results and picked an old reliable posix_spawn API, which behaved as I expected it to.

The other note I have is about the software update catalog URL. I used the same gist with a list of URLs, but I noticed that the prediction there assumed that upcoming versions would be macOS 16, macOS 17, etc., while we instead got macOS 26. I checked and both of the following URLs produced the same download:

https://swscan.apple.com/content/catalogs/others/index-16-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
https://swscan.apple.com/content/catalogs/others/index-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz

Evidently this was done for backwards compatibility, but there is no guarantee that this will continue indefinitely (though admittedly, the presence of "10.16" instead of "11" supports the argument that it will). This was not an issue in practice, but is worth noting for the future, especially if this part of the process is automated. Fortunately, this was the only 16/26 related issue (if it can even be called that) that I faced while working on this PR.

I have no comments on the source releases; they were very straightforward once they were finally released by Apple.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. labels Oct 23, 2025
@nix-owners nix-owners bot requested a review from toonn October 23, 2025 02:17
@Sigmanificient
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 454747
Commit: 9f03a502d3caa1045aa394bcdcdc86332b0325ad (subsequent changes)
Merge: 750311633af73ac9cf2763db4eef1a4854ab5299

Logs: https://github.com/Sigmanificient/nixpkgs-review-gha/actions/runs/18752615277


x86_64-darwin (sandbox = true)

✅ 1 package built:
  • apple-sdk_26

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • apple-sdk_26

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for following in my first‐SDK‐addition journey footsteps :)

A few comments, but I’d be happy to merge this as‐is.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 23, 2025
This should compile with the Xcode 26 toolchain, and should run on all
versions of macOS. On 26+, it should print "/private/tmp", while on
earlier versions it should print ":(".

It should fail to build in nixpkgs
This should now build in nixpkgs, with the same behavior as when using
the Xcode toolchain.
This should continue to behave the same on macOS 26+, but on earlier
versions it should simply crash with missing symbol errors
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Your next task is to rewrite the entire stdenv bootstrap.

@emilazy emilazy added this pull request to the merge queue Oct 23, 2025
Merged via the queue into NixOS:master with commit ec65aa3 Oct 23, 2025
26 of 30 checks passed
@Samasaur1 Samasaur1 deleted the push-zxpzuwnvtqko branch October 23, 2025 21:40
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Nov 7, 2025

Backport failed for release-25.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.05
git worktree add -d .worktree/backport-454747-to-release-25.05 origin/release-25.05
cd .worktree/backport-454747-to-release-25.05
git switch --create backport-454747-to-release-25.05
git cherry-pick -x 088c4adc0a13161783e524c6891eb68da02d3b3d 23c079624b7cfe8f5e2de96be272d6dba8b94f41 e2734c5d78e0a1b7efc0d4615cf312db29fe7623 fbc33babd6daeab7b227ce2c6215600d2e08e0a3 e7e541877fcce8e2cfedeec174d99525e657c81f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants