-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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.Libsystem: add missing modulemaps #186251
Conversation
cc @NixOS/darwin-maintainers, don't know who to tag for this. 🙃 |
This makes sense to me. I learned what the modules/modulemaps do from here: https://clang.llvm.org/docs/Modules.html Since the extra files are copied from the sdk, I wonder if a separate package would provide the same benefits and avoid a rebuild. On the other hand, we're probably not too many years away from something using the same modules from C, so being in the default package makes sense. I'll try to give it a go on Intel tomorrow. |
This looks good to me at a high level, and I think it's better to change existing I have two high level questions which I'd like confirmation on, but if no one knows then I'm happy to go ahead based on my assumptions:
|
Those subdirectories are copied in full, so I assume they're already fine. (May also be stuff that is already used from ObjC.)
The modulemaps don't declare symbols, they reference header files. If any of the header files reference symbols elsewhere, that'd already be a problem, I think? But what I found is that not all header files referenced are present. I came up with this cludge:
All of these issues come from
I think the krb5 one is interesting. There are several modules like this, like SQLite, zlib, etc, and headers are already present in our libsystem, but we package all of those separately. So we are already packaging headers here for which symbols are not present. |
I see, so we should be changing a couple of derivations here so that the headers are together with their respective libraries, but it doesn't seem to cause any issues so far. Let's merge this as is, and fix up the headers and modulemaps being in the wrong derivation later. |
@viraptor I've tried to build this myself but it takes way too much disk space. It should be pretty safe since it only adds files, it doesn't modify them or remove them, so I'll go ahead and merge, but if you manage to build it after all leave a comment, we can always revert if there's issues. |
Yeah, that makes sense. The change should be very safe. |
Description of changes
These define the
Darwin
module, which I don't think is really used in ObjC, but is the primary means with which Swift code interacts with low-level libsystem API.I've done a stdenv rebuild on
aarch64-darwin
and confirmed my build issue goes away.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