21 lines
734 B
Nix
Raw Permalink Normal View History

2021-04-07 12:11:32 -04:00
{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args:
2018-10-22 09:40:14 -04:00
2021-01-15 21:45:37 +07:00
with lib;
2018-10-22 09:40:14 -04:00
buildLinux (args // rec {
version = "4.19.215";
2018-10-22 09:40:14 -04:00
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
2018-10-22 09:40:14 -04:00
# branchVersion needs to be x.y
extraMeta.branch = versions.majorMinor version;
2018-10-22 09:40:14 -04:00
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1czjqa5wbsmzgl7wwqlp9qbdig45ibq11m9pcykrjaclrgwn884y";
2018-10-22 09:40:14 -04:00
};
2021-04-07 12:11:32 -04:00
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_4_19 ];
2018-10-22 09:40:14 -04:00
} // (args.argsOverride or {}))