-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathshell.nix
More file actions
48 lines (41 loc) · 1000 Bytes
/
shell.nix
File metadata and controls
48 lines (41 loc) · 1000 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
# Enable ccache support. See overlay.nix for details.
withCcache ? false,
# Enable multicore suport.
smp ? false,
# vmrunner path, for vmrunner development
vmrunner ? "",
includeos ? import (builtins.fetchGit {
url = "https://github.com/includeos/IncludeOS.git";
ref = "main";
}) { inherit smp; inherit withCcache; },
}:
let
stdenv = includeos.stdenv;
pkgs = includeos.pkgs;
pkgsStatic = includeos.pkgsStatic;
in
pkgs.mkShell.override { inherit (includeos) stdenv; } rec {
packages = [
includeos.vmrunner
stdenv.cc
pkgs.buildPackages.cmake
pkgs.buildPackages.nasm
pkgs.qemu
pkgs.which
pkgs.grub2
pkgs.iputils
];
buildInputs = [
includeos
includeos.chainloader
];
bootloader="${includeos}/boot/bootloader";
shellHook = ''
echo "To build the hello_world unikernel:"
echo " cmake src/CMakeLists.txt -B ./build"
echo " cd ./build"
echo " make"
echo " boot ./hello.elf.bin"
'';
}