diff options
author | Ryan Lahfa <tvl@lahfa.xyz> | 2023-12-26T01·03+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-01-03T23·23+0000 |
commit | 099ca6b7c0b95d1e7d5134ac465b50bbd86660c5 (patch) | |
tree | 7f582c23f9fbfa2a8d5a1ca4eb02b1bd8651fcbf /tvix/glue/benches/eval.rs | |
parent | 15309c7debfeb94977d1622dc6ed604d32710435 (diff) |
feat(tvix/glue): contextful derivation r/7338
We calculate the input context by performing the union of context over all input of the derivation. Then, we just pass the rest of it to the remaining machinery. Finally, we re-emit an `outPath` and a `drvPath` containing the expected contexts. Change-Id: I74905fb258b5bee8b08d1208c9eb87f51b92a890 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10436 Autosubmit: raitobezarius <tvl@lahfa.xyz> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/glue/benches/eval.rs')
-rw-r--r-- | tvix/glue/benches/eval.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/tvix/glue/benches/eval.rs b/tvix/glue/benches/eval.rs index a466a0e0fcfa..f5c9813c9063 100644 --- a/tvix/glue/benches/eval.rs +++ b/tvix/glue/benches/eval.rs @@ -29,7 +29,7 @@ fn interpret(code: &str) { let mut eval = tvix_eval::Evaluation::new_impure(); let known_paths: Rc<RefCell<KnownPaths>> = Default::default(); - add_derivation_builtins(&mut eval, known_paths.clone()); + add_derivation_builtins(&mut eval, known_paths); configure_nix_path( &mut eval, // The benchmark requires TVIX_BENCH_NIX_PATH to be set, so barf out @@ -37,15 +37,12 @@ fn interpret(code: &str) { &Some(env::var("TVIX_BENCH_NIX_PATH").expect("TVIX_BENCH_NIX_PATH must be set")), ); - eval.io_handle = Box::new(tvix_glue::tvix_io::TvixIO::new( - known_paths.clone(), - TvixStoreIO::new( - BLOB_SERVICE.clone(), - DIRECTORY_SERVICE.clone(), - PATH_INFO_SERVICE.clone(), - TOKIO_RUNTIME.handle().clone(), - ), - )); + eval.io_handle = Box::new(tvix_glue::tvix_io::TvixIO::new(TvixStoreIO::new( + BLOB_SERVICE.clone(), + DIRECTORY_SERVICE.clone(), + PATH_INFO_SERVICE.clone(), + TOKIO_RUNTIME.handle().clone(), + ))); let result = eval.evaluate(code, None); |