Setting up a seL4 development environment with nix

Hi All,

I would like to setup a development environment for hacking on seL4 using nix. I found the icecap project which uses nix to build seL4 plus Rust and MirageOS/OCaml, but it its using a modified seL4 version and relies on some broken packages.

I am hacking on that base to make a plain seL4 version for building ARM/Rpi4 binaries. While I am doing that I wanted to see if anyone else has already attempted turning the Getting Started setup into a nice nix script.

Alternatively I did find the seL4-CAmkES-L4v-dockerfiles. Are they a supported alternative for setting up an seL4 build environment? The Getting Started page doesn’t seem to mention using docker files.

Thanks for taking the time to read and respond.

I know of one unofficial flake for all the seL4 dependencies that you may want to take from or use for inspiration: GitHub - 1000teslas/sel4-nix-shells. It currently has more dependencies than just for building seL4.

Have you tried Colias Group / IceCap (Colias Group branches) / icecap · GitLab? It looks like Nick is keeping it up-to-date at least in terms of packages.

Personally I’ve been using Nix more so would be interested in helping making an official Nix flake/shell for seL4. The main problem with using Nix right now I’ve found is that you have to build a lot of compilers and dependencies, not all of them are cached. However, if we setup our own Nix cache or used Cachix, we could get around that problem. @gerwin.klein, what do you think?

Regarding the Dockerfiles, they are a supported (and widely used) way of building seL4 projects.

1 Like

Thank you for the link to sel4-nix-shells. I’ll have a look at that today.