Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/RyanGibb/hillingar

Build Mirage unikernels with Nix
https://github.com/RyanGibb/hillingar

Last synced: 3 months ago
JSON representation

Build Mirage unikernels with Nix

Awesome Lists containing this project

README

        

# Hillingar

> An arctic mirage


Nix snowflake
Mirage logo

To build a [MirageOS](https://mirage.io) unikernel with [Nix](https://nixos.org):
```bash
# create a flake from Hillingar's default template
$ nix flake new . -t github:/RyanGibb/hillingar
# substitute the name of the unikernel you're building
$ sed -i 's/throw "Put the unikernel name here"/""/g' flake.nix
# build the unikernel with Nix for a particular target
$ nix build .\#
```

See an example in [examples/hello](examples/hello), and build it from the project root with `nix build .\?dir=examples/hello`.
If you've already configured your unikernel with `mirage configure` and checked in into version control, pass `configured = true;` to `mkUnikernelPackages`.

Other outputs which may be useful for debugging include:

- `-configured`: the project after having invoked `mirage configure`.
- `-monorepo`: the result of [opam monorepo](https://github.com/tarides/opam-monorepo) that is provided to the unikernel build in the `duniverse` directory.
- `-scope`: the [Nixpkgs scope](https://github.com/NixOS/nixpkgs/blob/a89c4f5411da503aedbce629be535ec2da1e7f7b/lib/customisation.nix#L417-L552) created by an opam solve for the `dune build`.
- `` is an alias for `-scope.