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: check apple headers #109368
darwin: check apple headers #109368
Conversation
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
Outdated
Show resolved
Hide resolved
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
6cfc811
to
89e9164
Compare
@veprbl could you review this? |
Strict header check diminishes the possibility that certain header file functionality will be lost. This, however, adds some burden to maintain those lists in the nixpkgs tree, as new headers may be added. Maybe I'm not aware of some common case that this is supposed to catch, but unless there is one, this would be better (IMO) implemented as an external experimental tool first. |
The problem is, we don't know the exact header list and which package a header comes from. For example, Apple is not much nice to opensource so we can't get the those headers from a tarball or a tool, and it's risky to update because apple may drop headers (they do!) in new release. But the headers we are using is several years old and it start to block normal use (#101229). This PR could make it easy to find the missing headers during updating. Since we are assembling Alternatively, we move all the headers to https://github.com/NixOS/darwin-stubs . (But this will take much more work comparing to this PR and #108590). |
89e9164
to
621c54c
Compare
992f862
to
e3748ab
Compare
pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix
Outdated
Show resolved
Hide resolved
e3748ab
to
c12df57
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.
Built stdenv, CoreFoundation, and libutil
Motivation for this change
We assemble
Libsystem
by borrowing headers for other lib packages, and when those packages update some headers may be dropped by APPLE. In order to updating without losing header files, we maintain a header list for each of them to reduce missing risk.This could also benefit knowing where a header file comes from, because some of them may overlap in separated packages.
Things done
Tested building all apple packages, but not for bootstrap.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)