Skip to content

Commit 32ccef3

Browse files
committed
nix: simplify example, add checkPhase with boot
1 parent 1134176 commit 32ccef3

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

example.nix

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
{ withCcache ? false,
22

3-
nixpkgs ? ./pinned.nix,
3+
doCheck ? true, # boot unikernel after building it
44
includeos ? import ./default.nix { inherit withCcache; },
5-
pkgs ? (import nixpkgs { }).pkgsStatic,
6-
llvmPkgs ? pkgs.llvmPackages_18
75
}:
86

97
includeos.stdenv.mkDerivation rec {
108
pname = "includeos_example";
11-
src = pkgs.lib.cleanSource ./example;
12-
doCheck = false;
9+
src = includeos.pkgs.lib.cleanSource ./example;
1310
dontStrip = true;
11+
inherit doCheck;
1412

1513
nativeBuildInputs = [
16-
pkgs.buildPackages.nasm
17-
pkgs.buildPackages.cmake
14+
includeos.pkgs.buildPackages.nasm
15+
includeos.pkgs.buildPackages.cmake
1816
];
1917

2018
buildInputs = [
2119
includeos
20+
includeos.chainloader
2221
];
2322

23+
nativeCheckInputs = [
24+
includeos.vmrunner
25+
includeos.pkgs.qemu
26+
];
27+
28+
checkPhase = ''
29+
boot *.elf.bin
30+
'';
31+
2432
version = "dev";
2533
}

0 commit comments

Comments
 (0)