-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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: remove print-reexports #182094
base: master
Are you sure you want to change the base?
darwin.apple_sdk: remove print-reexports #182094
Conversation
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.
Other than the local stubs this LGTM.
while IFS= read -r -d $'\0' tbd; do | ||
echo "checkTbdRexports: checking re-exports in $tbd" | ||
rewrite-tbd -r "$NIX_STORE" "$tbd" | ||
done < <(find $prefix -type f -name '*.tbd' -print0) |
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.
Any reason the hook uses a different style from the apple_sdk installPhase? Very minor issue, feel free to ignore.
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.
No good reason. I think this version with null delimiters is technically more correct. I've used this style in both.
ln -s libSystem.B.tbd $out/lib/libSystem.tbd | ||
|
||
for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do | ||
ln -s libSystem.tbd $out/lib/lib$name.tbd | ||
done | ||
|
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.
Was this only necessary for print-reexports?
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.
It's a consequence of updating the darwin stubs to include NixOS/darwin-stubs#5. I'm not yet sure this is correct.
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.
Ah, right, I dropped them in this commit too, FWIW.
Unclear if this is still useful, given it's used in exactly one place.
Also includes the aliases/
c43f246
to
8e24473
Compare
Related to #181550. Not yet complete! Uses stubs from the no-prelink branch (NixOS/darwin-stubs#8).
Description of changes
Darwin support in nixpkgs uses textual api stubs (tbd files). These files refer to each other in "re-export" sections with absolute paths like
/System/Library/Foo.framework
. We want the entire closure to refer to the corresponding version in the nix store.In the 10.12 SDK, this uses a spread out process of pre-mangling to stubs to have
@Foo@
tokens which can then be easily replaced without parsing, andprint-reexports
to check that all referenced files exist. This requires only minimal shell in the bootstrap tools.In the 11.0 SDK, this uses a new tool called
rewrite-tbd
(https://github.com/thefloweringash/rewrite-tbd), which has prefix mapping, constant mapping, and checks that all paths exist and are in the nix store. This requires no preprocessing, but requiresrewrite-tbd
in the bootstrap tools.The
rewrite-tbd
method also usespassthru.tbdRewrites
attributes from dependencies, which makes fewer assumptions about which dependencies own which files.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes