kernel: compare version against the base version

This makes it so that 5.10.1 > 5.10-rc5
This commit is contained in:
Atemu 2021-11-07 12:07:14 +01:00 committed by Alyssa Ross
parent 712db36fa2
commit 8d0f1c1725

View File

@ -97,13 +97,14 @@ let
(isModular || (config.isDisabled "FIRMWARE_IN_KERNEL")) && (isModular || (config.isDisabled "FIRMWARE_IN_KERNEL")) &&
(lib.versionOlder version "4.14"); (lib.versionOlder version "4.14");
in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // { in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // {
passthru = { passthru = rec {
inherit version modDirVersion config kernelPatches configfile inherit version modDirVersion config kernelPatches configfile
moduleBuildDependencies stdenv; moduleBuildDependencies stdenv;
inherit isZen isHardened isLibre; inherit isZen isHardened isLibre;
isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
kernelOlder = lib.versionOlder version; baseVersion = lib.head (lib.splitString "-rc" version);
kernelAtLeast = lib.versionAtLeast version; kernelOlder = lib.versionOlder baseVersion;
kernelAtLeast = lib.versionAtLeast baseVersion;
}; };
inherit src; inherit src;