Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[RFC 0121] Migrate OpenGL References to API-Agnostic Terms #121
[RFC 0121] Migrate OpenGL References to API-Agnostic Terms #121
Changes from 2 commits
87c9bde
d376aff
9368cef
5d53fb0
70ad10a
5900f6f
fff5f1d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 this means that both
/run/opengl-drivers
and/run/current-system
need to be checked for drivers by the binaries right? Because on non-NixOS systems, we can't automatically update the drivers to now go to/run/current-system
.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, only one path will be written to the ELF files.
Current PR to change the name of
addOpenGLRunpath
, but not the implementation (still points to/run/opengl-driver/lib
)NixOS/nixpkgs#196174
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.
This makes replacing mesa in particular harder, as now it's a single list. Using an overlay isn't practical as it rebuilds far too much.
Making this a set so you can do
hardware.drivers.packages.mesa = myCustomMesa
could solve that. Leaving it as is after the rename also works.I originally commented this on the impl PR instead of the RFC accidentally.
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.
How special is
mesa
? Does everything use it now?I will concede that if it is special, that is not just an OpenGL thing, but also something that could be true in a Vulkan / many languages world.
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.
Having it as a set makes it easier to replace any specific package, we'd change anywhere in nixpkgs that sets it to eg do
hardware.drivers.packages.amdvlk-pro = something
orhardware.drivers.packages.nvidia
so it wouldn't be mesa specific and makes overriding any specific package easier.Mesa is sort of special - any system with working gl/vulkan is expected to have it, even when using other proprietary libs alongside it - but I don't think handling specifically for mesa is the right approach when we could make it easier to override any
hardware.drivers
package with the right approach.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 agree with the general point here that in the modules system, lists are poorly composable. They can only be appended to, or replaced outright. We don't have the tools to allow a user to remove or replace an element from a configuration system list.
There are too many options already that imo should be migrated to attrsets to let the user be in control. Let's not add more if we can.
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 wouldn't set across the board because names are arbitrary. Like, if I do
foo = <Nvidia-drivers-package>;
whose to say I'm doing anything wrong?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 aren't doing anything wrong if you do that and it isn't much of a problem if you do that, unless you get it included in nixpkgs I guess.
If you do that alongside something else setting
nvidia = <another nvidia drivers package>
you could get two version of the same package by mistake. That could be prevented by asserting that the pnames of the packages involved are unique although I'm not sure that's necessary.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 am not sure how express this, but we shouldn't design things around names. Perhaps other modules can make configurable what package they would add to this list, but unless we can characterize "structurally" how these package fit into different roles I would leave it just as is.
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.
Using a list to avoid the names is even worse, as your only options are to use an overlay and rebuild everything or to mkForce and have to keep track of any other entries that should be in the list.
If we keep it as is and have .package and .extraPackages then we aren't relying on names but we're also only making it easy to override mesa, and it's even easier to accidentally include duplicate packages of different versions in the list as instead of relying on a name there's nothing to prevent dupes.
e: I guess it's at least agreed that we shouldn't combine them into one list and that that's worse than the current approach?