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

refactor darwin CC toolchain to work with nixpkgs 24.11 #639

Merged
merged 7 commits into from
Jan 29, 2025

Conversation

malt3
Copy link
Collaborator

@malt3 malt3 commented Jan 28, 2025

Fixes #623

@malt3 malt3 requested a review from a team as a code owner January 28, 2025 15:03
@malt3 malt3 force-pushed the mp/darwin-new-sdk branch 9 times, most recently from 440a0e6 to 03fba0e Compare January 29, 2025 16:36
tshaynik and others added 7 commits January 29, 2025 17:42
Nix completely overhauled how Apple SDKs are packaged and made available to
compilers: https://discourse.nixos.org/t/the-darwin-sdks-have-been-updated/55295/27

This commit introduces a separate `pkgs.wrapCCWith` for new `apple-sdk` packages.
Also removes postLinkSignHook from most places, since this is no longer
an input for cc in Nix.

Fixes #623
The Go standard library uses cgo with `#include <libresolv.h>`.
This header is now part of `pkgs.darwin.libresolvHeaders`.
nix 2_18 is no longer available via nixpkgs in 24.11
zlib 1.3 cannot be built with clang 19 and macOS SDK 11.
Upating the vendored zlib to the latest version resolves this issue.
This patch can be dropped once the following upstream issue is solved:

  bazelbuild/bazel#25124
rules_java builds native C code (zlib) as part of the toolchains //java_tools/zlib:zlib
@malt3 malt3 force-pushed the mp/darwin-new-sdk branch from 03fba0e to b66d712 Compare January 29, 2025 16:42
Copy link
Contributor

@tshaynik tshaynik left a comment

Choose a reason for hiding this comment

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

Looks great!

@malt3 malt3 merged commit 93b3ee0 into master Jan 29, 2025
11 checks passed
@malt3 malt3 deleted the mp/darwin-new-sdk branch January 29, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can't use nixpkgs_cc_configure on darwin with nixpkgs 24.11
2 participants