Skip to content

linuxPackages.openrazer: install modules through modules_install - #576293

Merged
SuperSandro2000 merged 1 commit into
NixOS:masterfrom
jeanbono:openrazer-modules-install
Oct 20, 2026
Merged

SuperSandro2000 merged 1 commit into
NixOS:masterfrom
jeanbono:openrazer-modules-install

Conversation

@jeanbono

@jeanbono jeanbono commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The driver copied its .ko files by hand, so no single-module certificates (.ko.cer) were generated, and aggregateModules now fails when it merges the certificates of external modules:

cat: kernel/drivers/hid/razeraccessory.ko.cer: No such file or directory
cat: kernel/drivers/hid/razermouse.ko.cer: No such file or directory
cat: kernel/drivers/hid/razerkraken.ko.cer: No such file or directory
cat: kernel/drivers/hid/razerkbd.ko.cer: No such file or directory

The upstream Makefile has no Kbuild install target, so this runs modules_install on the kernel build directory, as suggested in #575192 and done in #575724. The modules keep their kernel/drivers/hid location and, like in-tree modules, are stripped (INSTALL_MOD_STRIP=1, as in #575724) and compressed.

Part of #575192.

Tested by building linuxPackages.openrazer (6.18.57) and linuxPackages_zen.openrazer (7.2.11): each module now ships a .ko.cer, and aggregateModules succeeds with both kernels. The same change, applied as an override on a desktop with hardware.openrazer.enable (the loaded .ko.xz files are byte-identical to this PR's build), loads all four razer* modules and runs openrazer-daemon, and Polychromatic can still change the lighting of two Razer devices.

This change was investigated, written and tested with Claude Code (Claude Opus 5.5), and the commit carries an Assisted-by: trailer.

Things done

@jeanbono
jeanbono force-pushed the openrazer-modules-install branch from b4a4037 to 97a696d Compare October 20, 2026 08:46
The driver copied its .ko files by hand, so no .ko.cer certificates were
generated and aggregateModules failed. The upstream Makefile has no Kbuild
install target, so run modules_install on the kernel build directory.

Assisted-by: Claude Code (Claude Opus 5.5)
@jeanbono
jeanbono force-pushed the openrazer-modules-install branch from 97a696d to 0923331 Compare October 20, 2026 08:50
@nixpkgs-ci nixpkgs-ci Bot added 12.first-time contribution This PR is the author's first one; please be gentle! 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. llm-assisted Contributions that include code generation with LLMs labels Oct 20, 2026
@jeanbono

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 576293
Commit: 0923331843f01909ddbd657690468643cf2a5aec


x86_64-linux

✅ 9 packages built:
  • linuxPackages.openrazer (linuxKernel.packages.linux_6_18.openrazer)
  • linuxPackages_zen.openrazer (linuxKernel.packages.linux_zen.openrazer)
  • linuxPackages_xanmod_latest.openrazer (linuxPackages_xanmod_stable.openrazer, linuxKernel.packages.linux_xanmod_stable.openrazer, linuxKernel.packages.linux_xanmod_latest.openrazer)
  • linuxPackages_latest.openrazer (linuxKernel.packages.linux_7_3.openrazer)
  • linuxKernel.packages.linux_6_1.openrazer
  • linuxPackages_xanmod.openrazer (linuxKernel.packages.linux_xanmod.openrazer)
  • linuxKernel.packages.linux_7_2.openrazer
  • linuxKernel.packages.linux_6_12.openrazer
  • linuxKernel.packages.linux_6_6.openrazer

Run with Claude Code (Claude Opus 5.5).

@jeanbono
jeanbono marked this pull request as ready for review October 20, 2026 09:19
@nixpkgs-ci
nixpkgs-ci Bot requested a review from evanjs October 20, 2026 09:26

@SuperSandro2000 SuperSandro2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

works for me and compared to other kernel modules it looks very similar to them

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 20, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 20, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Oct 20, 2026
@SuperSandro2000
SuperSandro2000 added this pull request to the merge queue Oct 20, 2026
Merged via the queue into NixOS:master with commit 965f876 Oct 20, 2026
41 checks passed
@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/flake-update-breaks-drivers-patch-makes-kernel-panic/80732/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.first-time contribution This PR is the author's first one; please be gentle! llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants