add mix bootstrap function

This commit is contained in:
Emile Clark-Boman 2026-01-25 11:41:13 +10:00
parent 7c1dc8605f
commit 57fee5b63e

View file

@ -0,0 +1,10 @@
# WARNING: This file is strictly for bootstrapping nt
rec {
# NOTE: bootstrap does the equivalent to mix's `include.public` option.
# NOTE: It also provides itself as input to descendents.
bootstrap = args: paths: let
input = args // {inherit this bootstrap;};
this = paths |> builtins.foldl' (acc: el: acc // import el input) {};
in
this;
}