-
Notifications
You must be signed in to change notification settings - Fork 19
/
flake.nix
32 lines (28 loc) · 966 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
description = "Flake for ktest kernel builds";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
utils.url = "github:numtide/flake-utils";
src.url = "https://evilpiepirate.org/git/bcachefs.git";
src.flake = false;
buildRoot.url = "path:dummy-kernel-build";
buildRoot.flake = false;
};
outputs = { self, utils, src,
buildRoot,
nixpkgs }:
utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
## TODO plumb kernel version automatically in to builds.
preBuiltKernel = pkgs.callPackage ./kernel_install.nix {
inherit src buildRoot;
};
srcBuildKernel = pkgs.buildLinux { inherit src; };
in {
packages = {
inherit preBuiltKernel srcBuildKernel;
default = if (import buildRoot).isPreBuilt then preBuiltKernel else srcBuildKernel;
};
});
}