depot/third_party/nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix
Default email 8a45d4525b Project import generated by Copybara.
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
2022-03-30 11:31:56 +02:00

36 lines
1 KiB
Nix

{ lib, fetchFromGitHub, buildLinux, ... } @ args:
let
# having the full version string here makes it easier to update
modDirVersion = "5.17.0-zen1";
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}";
rev = if ((lib.elemAt numbers 2) == "0") then "v${branch}-${suffix}" else "v${modDirVersion}";
in
buildLinux (args // {
inherit version modDirVersion;
isZen = true;
src = fetchFromGitHub {
owner = "zen-kernel";
repo = "zen-kernel";
inherit rev;
sha256 = "sha256-8DCcO2oPnwXjjm3PW7vNZKbB3S7XsEB/svAMhbPRJIo=";
};
structuredExtraConfig = with lib.kernel; {
ZEN_INTERACTIVE = yes;
};
extraMeta = {
inherit branch;
maintainers = with lib.maintainers; [ atemu andresilva ];
description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads.";
};
} // (args.argsOverride or { }))