linux-packages: fix argsOverride
This commit is contained in:
parent
b3057d1684
commit
988bf19f2c
@ -5,7 +5,7 @@
|
||||
sha256 = "0q3kg7dqvsiar3m70mvmn6bkkm4k1zn4fbh5r8ynib753wlhf504";
|
||||
}
|
||||
, ...
|
||||
}:
|
||||
} @ args:
|
||||
|
||||
let
|
||||
majorMinor = lib.versions.majorMinor linux.modDirVersion;
|
||||
@ -45,4 +45,4 @@ in linux.override {
|
||||
|
||||
maintainers = with lib.maintainers; [ qyliss ];
|
||||
};
|
||||
}
|
||||
} // (args.argsOverride or { })
|
||||
|
@ -64,16 +64,16 @@ def update_file(relpath, variant, version, suffix, sha256):
|
||||
for line in f:
|
||||
result = line
|
||||
result = re.sub(
|
||||
fr'^ version = ".+"; #{variant}',
|
||||
f' version = "{version}"; #{variant}',
|
||||
fr'^ version = ".+"; #{variant}',
|
||||
f' version = "{version}"; #{variant}',
|
||||
result)
|
||||
result = re.sub(
|
||||
fr'^ suffix = ".+"; #{variant}',
|
||||
f' suffix = "{suffix}"; #{variant}',
|
||||
fr'^ suffix = ".+"; #{variant}',
|
||||
f' suffix = "{suffix}"; #{variant}',
|
||||
result)
|
||||
result = re.sub(
|
||||
fr'^ sha256 = ".+"; #{variant}',
|
||||
f' sha256 = "{sha256}"; #{variant}',
|
||||
fr'^ sha256 = ".+"; #{variant}',
|
||||
f' sha256 = "{sha256}"; #{variant}',
|
||||
result)
|
||||
print(result, end='')
|
||||
|
||||
|
@ -1,23 +1,22 @@
|
||||
{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args:
|
||||
{ lib, stdenv, fetchFromGitHub, buildLinux, variant, ... } @ args:
|
||||
|
||||
let
|
||||
# These names are how they are designated in https://xanmod.org.
|
||||
|
||||
# NOTE: When updating these, please also take a look at the changes done to
|
||||
# kernel config in the xanmod version commit
|
||||
ltsVariant = {
|
||||
version = "6.6.46";
|
||||
hash = "sha256-ZtXFIHRM5YCb+5Ry3zcQt44OBqfhCI/Ig32jETUBrJo=";
|
||||
variant = "lts";
|
||||
variants = {
|
||||
lts = {
|
||||
version = "6.6.46";
|
||||
hash = "sha256-ZtXFIHRM5YCb+5Ry3zcQt44OBqfhCI/Ig32jETUBrJo=";
|
||||
};
|
||||
main = {
|
||||
version = "6.10.5";
|
||||
hash = "sha256-tETGtCNNgYj1IUNuI/Am5kimFndUC4O+cZwZzlPitFA=";
|
||||
};
|
||||
};
|
||||
|
||||
mainVariant = {
|
||||
version = "6.10.5";
|
||||
hash = "sha256-tETGtCNNgYj1IUNuI/Am5kimFndUC4O+cZwZzlPitFA=";
|
||||
variant = "main";
|
||||
};
|
||||
|
||||
xanmodKernelFor = { version, suffix ? "xanmod1", hash, variant }: buildLinux (args // rec {
|
||||
xanmodKernelFor = { version, suffix ? "xanmod1", hash }: buildLinux (args // rec {
|
||||
inherit version;
|
||||
pname = "linux-xanmod";
|
||||
modDirVersion = lib.versions.pad 3 "${version}-${suffix}";
|
||||
@ -64,7 +63,4 @@ let
|
||||
};
|
||||
} // (args.argsOverride or { }));
|
||||
in
|
||||
{
|
||||
lts = xanmodKernelFor ltsVariant;
|
||||
main = xanmodKernelFor mainVariant;
|
||||
}
|
||||
xanmodKernelFor variants.${variant}
|
||||
|
@ -1,20 +1,22 @@
|
||||
{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args:
|
||||
{ lib, stdenv, fetchFromGitHub, buildLinux, variant, ... } @ args:
|
||||
|
||||
let
|
||||
# comments with variant added for update script
|
||||
# ./update-zen.py zen
|
||||
zenVariant = {
|
||||
version = "6.10.5"; #zen
|
||||
suffix = "zen1"; #zen
|
||||
sha256 = "08ibz7560xsmlnrm8j13hxf8hjjcxfmnjdrwffqc81g9g6rvpqra"; #zen
|
||||
isLqx = false;
|
||||
};
|
||||
# ./update-zen.py lqx
|
||||
lqxVariant = {
|
||||
version = "6.10.5"; #lqx
|
||||
suffix = "lqx1"; #lqx
|
||||
sha256 = "09rscj20j94qkmvk0hlpjm6v1n1ndnkv2vl035gsp5lwggws2jqm"; #lqx
|
||||
isLqx = true;
|
||||
variants = {
|
||||
# ./update-zen.py zen
|
||||
zen = {
|
||||
version = "6.10.5"; #zen
|
||||
suffix = "zen1"; #zen
|
||||
sha256 = "08ibz7560xsmlnrm8j13hxf8hjjcxfmnjdrwffqc81g9g6rvpqra"; #zen
|
||||
isLqx = false;
|
||||
};
|
||||
# ./update-zen.py lqx
|
||||
lqx = {
|
||||
version = "6.10.5"; #lqx
|
||||
suffix = "lqx1"; #lqx
|
||||
sha256 = "09rscj20j94qkmvk0hlpjm6v1n1ndnkv2vl035gsp5lwggws2jqm"; #lqx
|
||||
isLqx = true;
|
||||
};
|
||||
};
|
||||
zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {
|
||||
inherit version;
|
||||
@ -123,7 +125,4 @@ let
|
||||
|
||||
} // (args.argsOverride or { }));
|
||||
in
|
||||
{
|
||||
zen = zenKernelsFor zenVariant;
|
||||
lqx = zenKernelsFor lqxVariant;
|
||||
}
|
||||
zenKernelsFor variants.${variant}
|
||||
|
@ -213,31 +213,46 @@ in {
|
||||
# https://github.com/NixOS/nixpkgs/pull/161773#discussion_r820134708
|
||||
zenKernels = callPackage ../os-specific/linux/kernel/zen-kernels.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 the variants of the XanMod kernel
|
||||
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix {
|
||||
linux_zen = zenKernels {
|
||||
variant = "zen";
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
|
||||
linux_xanmod = xanmodKernels.lts;
|
||||
linux_xanmod_stable = xanmodKernels.main;
|
||||
linux_xanmod_latest = xanmodKernels.main;
|
||||
linux_lqx = zenKernels {
|
||||
variant = "lqx";
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
|
||||
# This contains the variants of the XanMod kernel
|
||||
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix;
|
||||
|
||||
linux_xanmod = xanmodKernels {
|
||||
variant = "lts";
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
linux_xanmod_stable = xanmodKernels {
|
||||
variant = "main";
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
linux_xanmod_latest = xanmodKernels {
|
||||
variant = "main";
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
];
|
||||
};
|
||||
|
||||
linux_libre = deblobKernel packageAliases.linux_default.kernel;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user