feat(tvix/eval): support builtins implemented in Nix itself

This makes it possible to inject builtins into the builtin set that
are written in Nix code, and which at runtime are represented by a
thunk that will compile them the first time they are used.

Change-Id: Ia632367328f66fb2f26cb64ae464f8f3dc9c6d30
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7891
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2023-01-21 15:18:45 +03:00 committed by tazjin
parent 8513a58b37
commit 5719763fd3
4 changed files with 109 additions and 18 deletions

View file

@ -2,6 +2,10 @@ use builtin_macros::builtins;
use pretty_assertions::assert_eq;
use test_generator::test_resources;
/// Module for one-off tests which do not follow the rest of the
/// test layout.
mod one_offs;
#[builtins]
mod mock_builtins {
//! Builtins which are required by language tests, but should not