-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
mesa: split out the Darwin build into a separate expression #319047
Conversation
Re-added split outputs to the Darwin expression to make libGL stubs build again. |
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.
Read through the Nix code carefully and built on x86_64-darwin x86_64-linux. Couple of in-no-way-blocking comments.
ofBorg is unhappy, though, due to pkgs/development/libraries/libva/default.nix
on Darwin. (It's marked as unsupported, but it doesn't eval with this PR.)
@ofborg eval |
ofBorg is still broken. An assertion on the right place would do it, I think. Or maybe there's some better way. |
Retargeted to next staging, current staging is unblocked by horrible hack. |
5edc006
to
b410040
Compare
mesa.drivers is basically an implementation detail and should never be used as a dependency of other expressions. It also no longer exists on Darwin. mesa.osmesa is very niche and should generally be avoided. mesa.libdrm is used in exactly one place and it's irrelevant there.
…clean up Linux The way we build Mesa for Linux (and potentially others) is very, very different from the way we build Mesa on Darwin. In short, on Linux we generally want to build as much of it as possible, while on Darwin we want to build just enough of it to get GLX for legacy X applications. So, split out the Darwin build into its own expression entirely, and give it just enough inputs and just enough feature flags to actually do the one thing we want it to do, and nothing else. The Linux expression can be simplified further now, but that would cause rebuilds, so we'll have to do that later.
On I did not try to build on x86_64-linux yet. |
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 hacked up glxgears to build on macOS and got a blazing 12445.432 FPS on XQuartz with this PR applied. LGTM
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
This PR breaks mesa build on riscv, as the valgrind is currently not supported on riscv, and the option for removing it from the buildInputs is deleted in this PR. |
The way we build Mesa for Linux (and potentially others) is very, very different from the way we build Mesa on Darwin. In short, on Linux we generally want to build as much of it as possible, while on Darwin we want to build just enough of it to get GLX for legacy X applications.
So, split out the Darwin build into its own expression entirely, and give it just enough inputs and just enough feature flags to actually do the one thing we want it to do, and nothing else.
Then use the newly gained flexibility to remove most of the platform conditionals from the Linux expression.
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.