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

apple-sdk.privateFrameworksHook: drop; apple-sdk: don’t bundle various bintools #377168

Draft
wants to merge 7 commits into
base: staging
Choose a base branch
from

Conversation

emilazy
Copy link
Member

@emilazy emilazy commented Jan 26, 2025

In combination with #377162, should hopefully fix stdenv after #370750. Testing the build now. Not 100% confident in the last commit but this is what I have for now.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@emilazy emilazy requested a review from a team January 26, 2025 23:52
@github-actions github-actions bot added 10.rebuild-darwin: 5001+ 10.rebuild-darwin: 501+ 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 27, 2025
@@ -8,7 +8,6 @@ project('diskdev_cmds', 'c', 'objc', version : '@version@')
# Dependencies
cc = meson.get_compiler('c')

apfs = dependency('appleframeworks', modules : 'APFS')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the APFS framework being removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn’t seem to link any symbols, and apparently doesn’t even need anything from the headers:

mkdir -p "$out/include/APFS"
touch "$out/include/APFS/APFS.h"
touch "$out/include/APFS/APFSConstants.h"

As far as I can tell from the source, all the direct APFS API calls are guarded behind iOS conditionals. No point doing the private framework linking dance for programs that don’t use them. We could probably even just add the appropriate #ifs to their #includes instead.

This isn’t required. The build system sets up the necessary path
and they have their own reverse‐engineered declarations.
The Makefile works fine as long as you specify the old C++ standard and
tell it that SkyLight is there. (Actually, it can find SkyLight all by
itself, even inside the sandbox, but this guards against hypothetical
future sandbox tightening and cross‐compilation scenarios…)
Best not to mix reverse‐engineered headers that only Apple source
releases need and the upstream SDK, and a framework search path
isn’t really worth abstracting away in a hook.
These aren’t present in the bootstrap tools, and it seems better
to fix (or hack around) in Chromium builds and so on than adding
conditionals to this compatibility hack. Hopefully I won’t regret
trying this…
This should no longer be necessary.

This reverts commit 9cdac5f.
@github-actions github-actions bot added 10.rebuild-linux: 101-500 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants