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
nixos: add some more related packages #41764
Conversation
@7c6f434c Could you please merge this? I think it's trivial enough. |
(mapAttrsToList (n: v: | ||
optional (hasPrefix "xf86video" n) { | ||
name = removePrefix "xf86video" n; | ||
prefix = "[pkgs.xf86video]"; |
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.
Should this generate [pkgs.xf86video]-modesetting
somewhere in the manual or do I fail at reviewing this code?
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 would, but pkgs/servers/x11/xorg/default.nix doesn't have it. grepping the repo gives the following fact: "modesetting does not have a xf86videomodesetting package as it is included in xorgserver"
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 meant general format: [pkgs.xf86video]nouveau
, say. I am trying to check if square brackets are intentional and what is their intent.
These things are packages. Normally `relatedPackages` would print package names as "pkgs.xf86videonouveau". Drivers specified in the option in question have to be specified without this "xf86video" prefix. Xserver module will then look for specified drivers by doing various things, including adding that prefix to the name and checking if such package exists.
So the intent of this display is to show the name of the actual package, but also highlight the part of the name you should use when using it in the option in question.
If you find it confusing, let's change it to something different.
Does "nouveau (pkgs.xorg.xf86videonouveau) (xf86-video-nouveau-1.0.15)" format look better?
Or maybe I just explain this in the description?
|
I would say that |
645835e
to
b01ccbb
Compare
I'd like to keep the meta name there, so I pushed a version that prints
`nouveau aka pkgs.xorg.xf86videonouveau (xf86-video-nouveau-1.0.15)`
Seems straightforward enough to me.
|
I don't like |
Thanks!
Well, I put it there originally, so I'm kinda interested why don't you like it there? My reasoning for having it there is: "related packages" are for discoverability, `nix-env` searches by name, `meta.name` is `name` without cross-target garbage.
|
It being there for some time means nobody cares to complain, and I try to avoid making judgement calls on controversial NixOS changes.
My idea of a perfect NixOS manual says that the text of the manual doesn't change at all if you apply a lot of patchlevel bumps that all (magically) happen to be completely bacwards compatible. |
Adds
relatedPackages
for xserver'sxf86video
packages for discoverability. Most of them don't have particularly useful docstrings, but that can be fixed later.