linux: add flavor metadata

This commit is contained in:
Jonathan Ringer 2020-10-29 01:15:05 -07:00 committed by Jonathan Ringer
parent f89356b202
commit e6db435973
4 changed files with 15 additions and 1 deletions

View File

@ -45,6 +45,11 @@
stdenv.hostPlatform != stdenv.buildPlatform
, extraMeta ? {}
, isXen ? features.xen_dom0 or false
, isZen ? false
, isLibre ? false
, isHardened ? false
# easy overrides to stdenv.hostPlatform.platform members
, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules
, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false
@ -175,7 +180,9 @@ let
passthru = {
features = kernelFeatures;
inherit commonStructuredConfig;
inherit commonStructuredConfig isXen isZen isHardened isLibre;
kernelOlder = lib.versionOlder version;
kernelAtLeast = lib.versionAtLeast version;
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);
};

View File

@ -17,6 +17,7 @@ let
in linux.override {
argsOverride = {
modDirVersion = "${linux.modDirVersion}-gnu";
isLibre = true;
src = stdenv.mkDerivation {
name = "${linux.name}-libre-src";

View File

@ -7,6 +7,7 @@ in
buildLinux (args // {
modDirVersion = "${version}-zen1";
inherit version;
isZen = true;
src = fetchFromGitHub {
owner = "zen-kernel";

View File

@ -18014,6 +18014,10 @@ in
inherit kernel;
inherit (kernel) stdenv; # in particular, use the same compiler by default
# to help determine module compatibility
inherit (kernel) isXen isZen isHardened isLibre;
inherit (kernel) kernelOlder kernelAtLeast;
# Obsolete aliases (these packages do not depend on the kernel).
inherit (pkgs) odp-dpdk pktgen; # added 2018-05
@ -18277,6 +18281,7 @@ in
kernelPatches.hardened.${kernel.meta.branch}
];
modDirVersionArg = kernel.modDirVersion + "-hardened";
isHardened = true;
});
linuxPackages_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux { });