Skip to content

linuxPackages: use pname and version instead of name#365953

Merged
philiptaron merged 26 commits intoNixOS:stagingfrom
jopejoe1:linuxPackages-pname
Jan 14, 2026
Merged

linuxPackages: use pname and version instead of name#365953
philiptaron merged 26 commits intoNixOS:stagingfrom
jopejoe1:linuxPackages-pname

Conversation

@jopejoe1
Copy link
Member

@jopejoe1 jopejoe1 commented Dec 17, 2024

Works towards #103997

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nvidia Nvidia-specific issues and fixes 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Dec 17, 2024
@jopejoe1 jopejoe1 marked this pull request as draft December 17, 2024 18:25
@ofborg ofborg bot added the 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. label Dec 18, 2024
@jopejoe1 jopejoe1 force-pushed the linuxPackages-pname branch from 5d5061e to a6c0b54 Compare January 17, 2025 10:03
@jopejoe1 jopejoe1 changed the base branch from master to staging January 17, 2025 10:05
@jopejoe1 jopejoe1 marked this pull request as ready for review January 17, 2025 10:05
@github-actions github-actions bot removed the 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. label Jan 17, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could make it a convention to add the kernel version to the derivation version.

i.e. version = "1.2.3-${kernel.version}";

Copy link
Contributor

@philiptaron philiptaron Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we had a kernel-specific mkDerivation, we could maybe store a moduleVersion and kernelVersion in finalAttrs though.

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!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

@jopejoe1 jopejoe1 Mar 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@JohnRTitor JohnRTitor Mar 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jopejoe1 jopejoe1 force-pushed the linuxPackages-pname branch from a6c0b54 to 7950bf7 Compare March 15, 2025 10:21
@github-actions github-actions bot added the 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. label Mar 15, 2025
@K900
Copy link
Contributor

K900 commented Mar 22, 2025

Kernel version being gone from the store path is pretty inconvenient. Maybe version should be $pkgver-$kver?

@JohnRTitor
Copy link
Member

#365953 (comment)

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 7, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 18, 2025
@jopejoe1 jopejoe1 force-pushed the linuxPackages-pname branch from 7950bf7 to a0ff8e3 Compare January 13, 2026 20:30
github-actions[bot]

This comment was marked as resolved.

@jopejoe1 jopejoe1 force-pushed the linuxPackages-pname branch from a0ff8e3 to ba36856 Compare January 13, 2026 20:33
@github-actions github-actions bot dismissed their stale review January 13, 2026 20:34

All good now, thank you!

@nixpkgs-ci nixpkgs-ci bot removed 2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md labels Jan 13, 2026
Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a few errors in duplicated versions but I want this to land

@jopejoe1 jopejoe1 force-pushed the linuxPackages-pname branch from ba36856 to 9f80316 Compare January 14, 2026 18:42
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 14, 2026
@philiptaron
Copy link
Contributor

I'm doing a build and will merge when complete.

@philiptaron
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 365953 --package linuxPackages.systemtap --package linuxPackages.system76-acpi --package linuxPackages.rtl8189fs --package linuxPackages.system76-io --package linuxPackages.bbswitch --package linuxPackages.ixgbevf --package linuxPackages.ena --package linuxPackages.nvidiabl --package linuxPackages.nvidia_x11 --package linuxPackages.ajantv2 --package linuxPackages.isgx --package linuxPackages.system76 --package linuxPackages.liquidtux --package linuxPackages.asus-ec-sensors --package linuxPackages.usbip --package linuxPackages.facetimehd --package linuxPackages.jool --package linuxPackages.rtl8189es --package linuxPackages.ndiswrapper --package linuxPackages.broadcom_sta --package linuxPackages.shufflecake --package linuxPackages.r8168 --package linuxPackages.it87 --package linuxPackages.sheep-net --package linuxPackages.virtio_vmmci --package linuxPackages.tp_smapi
Commit: 9f803160ebca08fde250d1f3fc2df1409f9cf579


x86_64-linux

❌ 4 packages failed to build:
  • linuxPackages.nvidia_x11
  • linuxPackages.nvidia_x11.bin (linuxPackages.nvidia_x11.bin.bin, linuxPackages.nvidia_x11.bin.firmware, linuxPackages.nvidia_x11.bin.lib32)
  • linuxPackages.nvidia_x11.firmware (linuxPackages.nvidia_x11.firmware.bin, linuxPackages.nvidia_x11.firmware.firmware, linuxPackages.nvidia_x11.firmware.lib32)
  • linuxPackages.nvidia_x11.lib32 (linuxPackages.nvidia_x11.lib32.bin, linuxPackages.nvidia_x11.lib32.firmware, linuxPackages.nvidia_x11.lib32.lib32)
✅ 21 packages built:
  • linuxPackages.ajantv2
  • linuxPackages.asus-ec-sensors
  • linuxPackages.bbswitch
  • linuxPackages.ena
  • linuxPackages.facetimehd
  • linuxPackages.it87
  • linuxPackages.jool
  • linuxPackages.liquidtux
  • linuxPackages.r8168
  • linuxPackages.rtl8189es
  • linuxPackages.rtl8189fs
  • linuxPackages.sheep-net
  • linuxPackages.shufflecake
  • linuxPackages.shufflecake.bin (linuxPackages.shufflecake.bin.bin)
  • linuxPackages.system76
  • linuxPackages.system76-acpi
  • linuxPackages.system76-io
  • linuxPackages.systemtap
  • linuxPackages.tp_smapi
  • linuxPackages.usbip
  • linuxPackages.virtio_vmmci

@philiptaron
Copy link
Contributor

Nvidia didn't build because systemtap-5.4-i686-linux is currently broken on staging. That's fine.

@philiptaron philiptaron added this pull request to the merge queue Jan 14, 2026
Merged via the queue into NixOS:staging with commit bfda2ae Jan 14, 2026
28 checks passed
@jopejoe1 jopejoe1 deleted the linuxPackages-pname branch January 14, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nvidia Nvidia-specific issues and fixes 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants