linuxPackages: use pname and version instead of name#365953
linuxPackages: use pname and version instead of name#365953philiptaron merged 26 commits intoNixOS:stagingfrom
Conversation
5d5061e to
a6c0b54
Compare
There was a problem hiding this comment.
With kernel modules in particular, it's really useful to have the particular kernel version be part of their name so you can see from the failing derivation itself what kernel version they failed against.
There was a problem hiding this comment.
Maybe we could make it a convention to add the kernel version to the derivation version.
i.e. version = "1.2.3-${kernel.version}";
There was a problem hiding this comment.
I like that convention, and it's going to be actually true -- the version is a tuple of the package's version and the kernel for which it's intended. Now that #234651 has landed, we could even encode that in a kernel-specific mkDerivation.
There was a problem hiding this comment.
The only major downside of this approach could be if someone wants to use finalAttrs.version for src.rev/src.tag.
If we had a kernel-specific mkDerivation, we could maybe store a moduleVersion and kernelVersion in finalAttrs though.
There was a problem hiding this comment.
If we had a kernel-specific
mkDerivation, we could maybe store amoduleVersionandkernelVersioninfinalAttrsthough.
Not only that -- we could use name to write out the name of the derivation however we wanted, while still requiring the users to use pname and version. The default mkDerivation behavior of name = "${pname}-${version}" is ours to change!
There was a problem hiding this comment.
One thing I would like to note:
Most of our out of tree drivers rely on their repo's master branch, as in we mostly fetch their latest commit. Having a simple version like 0-unstable-2024-12-05 instead of 0-unstable-2024-12-05-${kernel.version} helps the automatic updater script (unstableGitUpdater).
As our kernel module maintenance is really bad without these scripts, we should look to fix that.
There was a problem hiding this comment.
Haveing the kernel version included also breaks version comparision on sites like repology, which also get used by r-ryantm to check if a package needs an update.
There was a problem hiding this comment.
I am thinking about having something like mkKernelModule, that exposes a normal version and it automatically appends the kernel version to the name of the drv.
a6c0b54 to
7950bf7
Compare
|
Kernel version being gone from the store path is pretty inconvenient. Maybe version should be |
7950bf7 to
a0ff8e3
Compare
a0ff8e3 to
ba36856
Compare
philiptaron
left a comment
There was a problem hiding this comment.
There's a few errors in duplicated versions but I want this to land
ba36856 to
9f80316
Compare
|
I'm doing a build and will merge when complete. |
|
|
Nvidia didn't build because systemtap-5.4-i686-linux is currently broken on staging. That's fine. |
Works towards #103997
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.