nixos-hardware/microsoft/surface/kernel/default.nix

38 lines
806 B
Nix
Raw Normal View History

2022-11-28 02:23:51 -05:00
{ lib,
buildLinux,
callPackage,
linuxPackagesFor,
...
}:
2022-11-28 02:23:51 -05:00
# To test the kernel build:
2022-11-28 02:28:52 -05:00
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel"
2022-11-28 02:23:51 -05:00
let
inherit (lib) kernel recurseIntoAttrs;
repos = callPackage ../repos.nix {};
linuxPackage =
{ version,
modDirVersion ? version,
branch,
src,
kernelPatches ? [],
...
}: let
buildLinux' = buildLinux {
inherit version src kernelPatches;
modDirVersion = version;
extraMeta.branch = branch;
};
linuxPackagesFor' = (linuxPackagesFor buildLinux');
in recurseIntoAttrs linuxPackagesFor';
linux-5_16_11 = linuxPackage (
callPackage ./linux-5.16.11.nix { inherit repos; }
);
in {
boot.kernelPackages = linux-5_16_11;
}