feat(tvix/glue/tests): configure <nix NIX_PATH

This is also needed to make `<nix/fetchurl.nix>` available in the
testsuite.

At some point, we might want to classify different types of tests
excepting a different featureset, but for now, enabling this for all of
glue is fine.

Change-Id: Ided450bbb1f8eb7b66d454bd28bd19b17eb318e4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11546
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
Florian Klink 2024-04-30 00:14:57 +03:00 committed by flokli
parent fab9a07274
commit c192cd04b8

View file

@ -14,6 +14,7 @@ use rstest::rstest;
use crate::{
builtins::{add_derivation_builtins, add_fetcher_builtins, add_import_builtins},
configure_nix_path,
tvix_io::TvixIO,
tvix_store_io::TvixStoreIO,
};
@ -61,6 +62,7 @@ fn eval_test(code_path: PathBuf, expect_success: bool) {
add_derivation_builtins(&mut eval, tvix_store_io.clone());
add_fetcher_builtins(&mut eval, tvix_store_io.clone());
add_import_builtins(&mut eval, tvix_store_io.clone());
configure_nix_path(&mut eval, &None);
let result = eval.evaluate(code, Some(code_path.clone()));
let failed = match result.value {