Closed jys1670 closed 13 hours ago
same underlying issue as #190722 it seems
Can confirm that this patch fix the issue for zen and lqx kernels:
diff --git a/pkgs/os-specific/linux/kernel/update-zen.py b/pkgs/os-specific/linux/kernel/update-zen.py
index 3c51f806d..a8a363761 100755
--- a/pkgs/os-specific/linux/kernel/update-zen.py
+++ b/pkgs/os-specific/linux/kernel/update-zen.py
@@ -64,16 +64,16 @@ def update_file(relpath, variant, version, suffix, sha256):
for line in f:
result = line
result = re.sub(
- fr'^ version = ".+"; #{variant}',
- f' version = "{version}"; #{variant}',
+ fr'^ version = ".+"; #{variant}',
+ f' version = "{version}"; #{variant}',
result)
result = re.sub(
- fr'^ suffix = ".+"; #{variant}',
- f' suffix = "{suffix}"; #{variant}',
+ fr'^ suffix = ".+"; #{variant}',
+ f' suffix = "{suffix}"; #{variant}',
result)
result = re.sub(
- fr'^ sha256 = ".+"; #{variant}',
- f' sha256 = "{sha256}"; #{variant}',
+ fr'^ sha256 = ".+"; #{variant}',
+ f' sha256 = "{sha256}"; #{variant}',
result)
print(result, end='')
diff --git a/pkgs/os-specific/linux/kernel/zen-kernels.nix b/pkgs/os-specific/linux/kernel/zen-kernels.nix
index 3acf40121..9e2c968ac 100644
--- a/pkgs/os-specific/linux/kernel/zen-kernels.nix
+++ b/pkgs/os-specific/linux/kernel/zen-kernels.nix
@@ -1,20 +1,22 @@
-{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args:
+{ lib, stdenv, fetchFromGitHub, buildLinux, variant, ... } @ args:
let
# comments with variant added for update script
- # ./update-zen.py zen
- zenVariant = {
- version = "6.9.8"; #zen
- suffix = "zen1"; #zen
- sha256 = "1ixrdx2a6jp1x8kryjmxnrgl0fsrjg6fngg5c48vbl2574nizlbz"; #zen
- isLqx = false;
- };
- # ./update-zen.py lqx
- lqxVariant = {
- version = "6.9.8"; #lqx
- suffix = "lqx1"; #lqx
- sha256 = "1r5ld2xibr0qkwi1yy7h746sclsmd8cq68z0zdpbbn2qrgyx302k"; #lqx
- isLqx = true;
+ variants = {
+ # ./update-zen.py zen
+ zen = {
+ version = "6.9.8"; #zen
+ suffix = "zen1"; #zen
+ sha256 = "1ixrdx2a6jp1x8kryjmxnrgl0fsrjg6fngg5c48vbl2574nizlbz"; #zen
+ isLqx = false;
+ };
+ # ./update-zen.py lqx
+ lqx = {
+ version = "6.9.8"; #lqx
+ suffix = "lqx1"; #lqx
+ sha256 = "1r5ld2xibr0qkwi1yy7h746sclsmd8cq68z0zdpbbn2qrgyx302k"; #lqx
+ isLqx = true;
+ };
};
zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {
inherit version;
@@ -123,7 +125,4 @@ let
} // (args.argsOverride or { }));
in
-{
- zen = zenKernelsFor zenVariant;
- lqx = zenKernelsFor lqxVariant;
-}
+zenKernelsFor variants.${variant}
\ No newline at end of file
diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix
index bc80ec658..edc94fc34 100644
--- a/pkgs/top-level/linux-kernels.nix
+++ b/pkgs/top-level/linux-kernels.nix
@@ -227,19 +227,21 @@ in {
# https://github.com/NixOS/nixpkgs/pull/161773#discussion_r820134708
zenKernels = callPackage ../os-specific/linux/kernel/zen-kernels.nix;
- linux_zen = (zenKernels {
+ linux_zen = zenKernels {
+ variant = "zen";
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
- }).zen;
+ };
- linux_lqx = (zenKernels {
+ linux_lqx = zenKernels {
+ variant = "lqx";
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
- }).lqx;
+ };
# This contains the variants of the XanMod kernel
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix {
@AtaraxiaSjel have you submitted these changes as a PR that I can review?
@Pandapip1 sorry for the late response. I created a new PR with this changes.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4351
Describe the bug
Mainline / hardened / testing / ... kernels can be painlessly modified via
argsOverride
:Sadly, this does not work with a bunch of other kernel variants:
Expected behavior
All kernels should honor
argsOverride
Additional context
I am not entirely sure how dynamic binding is implemented in kernel stuff, however slightly changing xanmod parts this way
seems to fix
argsOverride
:zen and lqx look similar to xanmod, no idea about libre
Notify maintainers
Pinging people who seem to update affected packages often @zzzsyyy @JerrySM64 @K900
Metadata
Add a :+1: reaction to issues you find important.