This commit is contained in:
Henry Hiles 2025-07-12 10:24:54 -04:00
parent 277f6a3f79
commit 0ce1331346
No known key found for this signature in database

32
packages/kernel.nix Normal file
View file

@ -0,0 +1,32 @@
{
lib,
buildLinux,
fetchFromGitLab,
...
} @ args: let
src = fetchFromGitLab {
owner = "sdm845-mainline";
repo = "linux";
rev = "sdm845/6.16-dev";
hash = "sha256-Nu7BwSl40Ytm7nCzyctNed7nqwq7NcVVxHLF3KFMKC4=";
};
version = "${rec {
file = "${src}/Makefile";
version = toString (builtins.match ".+VERSION = ([0-9]+).+" (builtins.readFile file));
patchlevel = toString (builtins.match ".+PATCHLEVEL = ([0-9]+).+" (builtins.readFile file));
sublevel = toString (builtins.match ".+SUBLEVEL = ([0-9]+).+" (builtins.readFile file));
extraversion = toString (builtins.match ".+EXTRAVERSION = ([a-z0-9-]+).+" (builtins.readFile file));
string = "${version + "." + patchlevel + "." + sublevel + (lib.optionalString (extraversion != "") extraversion)}";
}.string}";
in (buildLinux (
args
// {
inherit src version;
modDirVersion = version;
extraMeta = {
platforms = ["aarch64-linux"];
hydraPlatforms = [""];
};
}
// (args.argsOverride or {})
))