2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, buildLinux, ... } @ args:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
let
|
2021-08-22 07:53:02 +00:00
|
|
|
# having the full version string here makes it easier to update
|
2022-06-26 10:26:21 +00:00
|
|
|
modDirVersion = "5.18.5-zen1";
|
2021-08-22 07:53:02 +00:00
|
|
|
parts = lib.splitString "-" modDirVersion;
|
|
|
|
version = lib.elemAt parts 0;
|
|
|
|
suffix = lib.elemAt parts 1;
|
|
|
|
|
|
|
|
numbers = lib.splitString "." version;
|
|
|
|
branch = "${lib.elemAt numbers 0}.${lib.elemAt numbers 1}";
|
2022-03-30 09:31:56 +00:00
|
|
|
rev = if ((lib.elemAt numbers 2) == "0") then "v${branch}-${suffix}" else "v${modDirVersion}";
|
2020-08-20 17:08:02 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
buildLinux (args // {
|
2021-08-22 07:53:02 +00:00
|
|
|
inherit version modDirVersion;
|
2020-11-03 02:18:15 +00:00
|
|
|
isZen = true;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zen-kernel";
|
|
|
|
repo = "zen-kernel";
|
2022-03-30 09:31:56 +00:00
|
|
|
inherit rev;
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-q6a8Wyzs6GNQ39mV+q/9N6yo/kXS9ZH+QTfGka42gk4=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
structuredExtraConfig = with lib.kernel; {
|
|
|
|
ZEN_INTERACTIVE = yes;
|
2022-06-16 17:23:12 +00:00
|
|
|
# TODO: Remove once #175433 reaches master
|
|
|
|
# https://nixpk.gs/pr-tracker.html?pr=175433
|
|
|
|
WERROR = no;
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extraMeta = {
|
2021-08-22 07:53:02 +00:00
|
|
|
inherit branch;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ atemu andresilva ];
|
2020-12-29 15:07:52 +00:00
|
|
|
description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads.";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
} // (args.argsOverride or { }))
|