mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 19:16:11 +00:00
linux_lqx, linux_zen: refactor to unify
Unify linux_zen and linux_lqx -> zen-kernels
This commit is contained in:
parent
09143afa61
commit
40674f0d7f
@ -1,26 +0,0 @@
|
||||
{ lib, fetchFromGitHub, buildLinux, linux_zen, ... } @ args:
|
||||
|
||||
let
|
||||
version = "5.15.16";
|
||||
suffix = "lqx2";
|
||||
in
|
||||
|
||||
buildLinux (args // {
|
||||
modDirVersion = "${version}-${suffix}";
|
||||
inherit version;
|
||||
isZen = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zen-kernel";
|
||||
repo = "zen-kernel";
|
||||
rev = "v${version}-${suffix}";
|
||||
sha256 = "sha256-kdT/hiASZ72pkS0Igta0KT0GWTgDRjxBnd5CQ0eonfg=";
|
||||
};
|
||||
|
||||
extraMeta = {
|
||||
branch = "5.14/master";
|
||||
maintainers = with lib.maintainers; [ atemu ];
|
||||
description = linux_zen.meta.description + " (Same as linux_zen but less aggressive release schedule)";
|
||||
};
|
||||
|
||||
} // (args.argsOverride or { }))
|
@ -1,39 +0,0 @@
|
||||
{ lib, fetchFromGitHub, buildLinux, ... } @ args:
|
||||
|
||||
let
|
||||
# having the full version string here makes it easier to update
|
||||
modDirVersion = "5.18.5-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-q6a8Wyzs6GNQ39mV+q/9N6yo/kXS9ZH+QTfGka42gk4=";
|
||||
};
|
||||
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
ZEN_INTERACTIVE = yes;
|
||||
# TODO: Remove once #175433 reaches master
|
||||
# https://nixpk.gs/pr-tracker.html?pr=175433
|
||||
WERROR = no;
|
||||
};
|
||||
|
||||
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 { }))
|
40
pkgs/os-specific/linux/kernel/zen-kernels.nix
Normal file
40
pkgs/os-specific/linux/kernel/zen-kernels.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ lib, fetchFromGitHub, buildLinux, ... } @ args:
|
||||
|
||||
let
|
||||
zenVariant = {
|
||||
version = "5.18.5";
|
||||
suffix = "zen1";
|
||||
sha256 = "sha256-q6a8Wyzs6GNQ39mV+q/9N6yo/kXS9ZH+QTfGka42gk4=";
|
||||
isLqx = false;
|
||||
};
|
||||
lqxVariant = {
|
||||
version = "5.15.16";
|
||||
suffix = "lqx2";
|
||||
sha256 = "sha256-kdT/hiASZ72pkS0Igta0KT0GWTgDRjxBnd5CQ0eonfg=";
|
||||
isLqx = true;
|
||||
};
|
||||
zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {
|
||||
inherit version;
|
||||
modDirVersion = "${lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version ++ [ "0" "0" ]))}-${suffix}";
|
||||
isZen = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zen-kernel";
|
||||
repo = "zen-kernel";
|
||||
rev = "v${version}-${suffix}";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
extraMeta = {
|
||||
branch = lib.versions.majorMinor version + "/master";
|
||||
maintainers = with lib.maintainers; [ atemu andresilva psydvl ];
|
||||
description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads." +
|
||||
lib.optionalString isLqx " (Same as linux_zen but less aggressive release schedule)";
|
||||
};
|
||||
|
||||
} // (args.argsOverride or { }));
|
||||
in
|
||||
{
|
||||
zen = zenKernelsFor zenVariant;
|
||||
lqx = zenKernelsFor lqxVariant;
|
||||
}
|
@ -196,19 +196,23 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
linux_zen = callPackage ../os-specific/linux/kernel/linux-zen.nix {
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
# Using zenKernels like this due lqx&zen came from one source, but may have different base kernel version
|
||||
# https://github.com/NixOS/nixpkgs/pull/161773#discussion_r820134708
|
||||
zenKernels = callPackage ../os-specific/linux/kernel/zen-kernels.nix;
|
||||
|
||||
linux_lqx = callPackage ../os-specific/linux/kernel/linux-lqx.nix {
|
||||
linux_zen = (zenKernels {
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
}).zen;
|
||||
|
||||
linux_lqx = (zenKernels {
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
}).lqx;
|
||||
|
||||
# This contains both the STABLE and EDGE variants of the XanMod kernel
|
||||
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix;
|
||||
|
Loading…
Reference in New Issue
Block a user