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-frameworks: remove CF references #63381
Conversation
EventKit = []; | ||
ExceptionHandling = []; | ||
FWAUserLib = []; | ||
ForceFeedback = [ CF IOKit ]; | ||
Foundation = [ cf-private libobjc Security ApplicationServices SystemConfiguration ]; |
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.
You can't use Foundation without cf-private, so IMO at least this one should be left in.
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.
Can you elaborate? Currently we have darwin.CF, darwin.cf-private and frameworks.CoreFoundation. Using either of the three explicitly here means the others can't be used in builds without messing with flag ordering which I can't get to work for some reason.
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.
I think CoreServices or one of it's parts might also need it, was there a specific reason you determined this or was it just based on the various usages in nixpkgs?
IIRC those were these just to make it clear which frameworks actually use CoreFoundation directly. I agree that it's probably not too useful anymore. I would support removing the SDK frameworks altogether and replace them with a catch-all "apple_sdk" dependency (that also depends on cf-private). This makes things less granular, but also makes things much more convenient. Most things that use one framework end up using a lot more. But it's maybe not worth the trouble, right now. Besides the cf-private thing, this looks okay. |
In that case I'll look into folding cf-private/CoreFoundation, we shouldn't need both and with that there's only one to reference here. |
It is probably still useful to keep them separate. Basically we have 3 difference versions of CoreFoundation:
|
I don't think there's an advantage to have cf-private except for the hook, which can be moved. Now that we use the swift corelibs it's a weird hybrid of the sdk and swift headers while still linking against the system libs anyway. |
Foundation = [ cf-private libobjc Security ApplicationServices SystemConfiguration ]; | ||
GLKit = [ CF ]; | ||
ForceFeedback = [ IOKit ]; | ||
Foundation = [ libobjc CoreFoundation Security ApplicationServices SystemConfiguration ]; |
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.
I think that with this we can actually get rid of most of the remaining cf-private references, as well as some of the ugly cflags workaround needed before because of missing symbols.
It's probably just weird legacy stuff from when I was clueless putting the first pure stdenv together 😄 In principle this seems 👍, but maybe worth sending to staging first? |
Definitively, mainly opened it to get feedback in case the idea doesn't make sense. It also needs more testing to verify my assumptions about cf-private are actually correct. |
69e442a
to
5d11398
Compare
I think this is ready now, all the cleanup are cf-private references that are now not required anymore. |
fixed presumably in NixOS#63381
No longer needded since NixOS#63381.
No longer needed since NixOS#63381.
Motivation for this change
While trying to fix wx I ran into a bunch of problems that because it's very hard to actually replace what version of CoreFoundation is used. This change enables making the CF version configurable in the stdenv or omitting it entirely.
/cc @copumpkin @matthewbauer Do either of you know if there's a specific reason why these definitions are here, given that CF is a default stdenv input?
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)