Fix moddirversion calculation for RC kernels

This commit is contained in:
Lan Tian 2025-12-24 21:19:27 -08:00
parent 42b263471f
commit 1944e4a1be
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B

View File

@ -57,13 +57,14 @@ lib.makeOverridable (
helpers = callPackage ../helpers.nix { }; helpers = callPackage ../helpers.nix { };
inherit (helpers) stdenvLLVM ltoMakeflags; inherit (helpers) stdenvLLVM ltoMakeflags;
splitted = lib.splitString "-" version; # For finding patches
ver0 = builtins.elemAt splitted 0; patchVersion = lib.versions.majorMinor version;
major = lib.versions.pad 2 ver0;
fullVersion = lib.versions.pad 3 ver0; # For use in moddirversion
fullVersion = lib.versions.pad 3 version;
cachyosConfigFile = "${inputs.cachyos-kernel.outPath}/${configVariant}/config"; 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" ] [ "all/0001-cachyos-base-all.patch" ]
++ (lib.optional (cpusched == "bore") "sched/0001-bore-cachy.patch") ++ (lib.optional (cpusched == "bore") "sched/0001-bore-cachy.patch")
++ (lib.optional (cpusched == "bmq") "sched/0001-prjc-cachy.patch") ++ (lib.optional (cpusched == "bmq") "sched/0001-prjc-cachy.patch")