From 1944e4a1bea276ed0fa7890bfd867c6a8cb2c230 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Wed, 24 Dec 2025 21:19:27 -0800 Subject: [PATCH] Fix moddirversion calculation for RC kernels --- kernel-cachyos/mkCachyKernel.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel-cachyos/mkCachyKernel.nix b/kernel-cachyos/mkCachyKernel.nix index fa1628a..a7f8543 100644 --- a/kernel-cachyos/mkCachyKernel.nix +++ b/kernel-cachyos/mkCachyKernel.nix @@ -57,13 +57,14 @@ lib.makeOverridable ( helpers = callPackage ../helpers.nix { }; inherit (helpers) stdenvLLVM ltoMakeflags; - splitted = lib.splitString "-" version; - ver0 = builtins.elemAt splitted 0; - major = lib.versions.pad 2 ver0; - fullVersion = lib.versions.pad 3 ver0; + # For finding patches + patchVersion = lib.versions.majorMinor version; + + # For use in moddirversion + fullVersion = lib.versions.pad 3 version; cachyosConfigFile = "${inputs.cachyos-kernel.outPath}/${configVariant}/config"; - cachyosPatches = builtins.map (p: "${inputs.cachyos-kernel-patches.outPath}/${major}/${p}") ( + cachyosPatches = builtins.map (p: "${inputs.cachyos-kernel-patches.outPath}/${patchVersion}/${p}") ( [ "all/0001-cachyos-base-all.patch" ] ++ (lib.optional (cpusched == "bore") "sched/0001-bore-cachy.patch") ++ (lib.optional (cpusched == "bmq") "sched/0001-prjc-cachy.patch")