feat(tvix/eval): implement builtins.dirOf

This commit causes the test eval-okay-builtins.nix to pass.

It also adds tests/tvix_tests/eval-okay-dirof.nix which has better
coverage than the nix tests for this builtin.

Signed-off-by: Adam Joseph <adam@westernsemico.com>
Change-Id: I71d96b48680696fd6e4fea3a9861742b35cfaa66
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6987
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Adam Joseph 2022-10-12 02:46:20 -07:00 committed by clbot
parent d6088005ef
commit caf9cbf711
4 changed files with 27 additions and 0 deletions

View file

@ -276,6 +276,7 @@ impl Value {
gen_cast!(to_list, NixList, "list", Value::List(l), l.clone());
gen_cast!(to_closure, Closure, "lambda", Value::Closure(c), c.clone());
gen_is!(is_path, Value::Path(_));
gen_is!(is_number, Value::Integer(_) | Value::Float(_));
gen_is!(is_bool, Value::Bool(_));