From 8d0f1c1725a1b2ab34f401cf1b7fda1fc5bf60e6 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sun, 7 Nov 2021 12:07:14 +0100 Subject: [PATCH] kernel: compare version against the base version This makes it so that 5.10.1 > 5.10-rc5 --- pkgs/os-specific/linux/kernel/manual-config.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 51ab51fb83c6..4f12337c893f 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -97,13 +97,14 @@ let (isModular || (config.isDisabled "FIRMWARE_IN_KERNEL")) && (lib.versionOlder version "4.14"); in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // { - passthru = { + passthru = rec { inherit version modDirVersion config kernelPatches configfile moduleBuildDependencies stdenv; inherit isZen isHardened isLibre; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; - kernelOlder = lib.versionOlder version; - kernelAtLeast = lib.versionAtLeast version; + baseVersion = lib.head (lib.splitString "-rc" version); + kernelOlder = lib.versionOlder baseVersion; + kernelAtLeast = lib.versionAtLeast baseVersion; }; inherit src;