From 2036487de811bdb4153e34f461043c1ae9f9add6 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 13 Mar 2025 07:43:05 +0100 Subject: [PATCH] docs(tvix/glue): add_*_builtins: fix docstring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This modifies the EvaluationBuilder, not Evaluation. Also add some missing builtins from the docstrings. Change-Id: Ibf76b496874158fb85b21e52e7c3561e66cffaba Reviewed-on: https://cl.tvl.fyi/c/depot/+/13253 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: Domen Kožar --- tvix/glue/src/builtins/mod.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tvix/glue/src/builtins/mod.rs b/tvix/glue/src/builtins/mod.rs index 99be955d2..3aa64f707 100644 --- a/tvix/glue/src/builtins/mod.rs +++ b/tvix/glue/src/builtins/mod.rs @@ -12,9 +12,11 @@ mod utils; pub use errors::{DerivationError, FetcherError, ImportError}; -/// Adds derivation-related builtins to the passed [tvix_eval::Evaluation]. +/// Adds derivation-related builtins to the passed [tvix_eval::EvaluationBuilder]: /// -/// These are `derivation` and `derivationStrict`. +/// * `derivation` +/// * `derivationStrict` +/// * `toFile` /// /// As they need to interact with `known_paths`, we also need to pass in /// `known_paths`. @@ -28,7 +30,7 @@ pub fn add_derivation_builtins<'co, 'ro, 'env, IO>( .add_src_builtin("derivation", include_str!("derivation.nix")) } -/// Adds fetcher builtins to the passed [tvix_eval::Evaluation]: +/// Adds fetcher builtins to the passed [tvix_eval::EvaluationBuilder]: /// /// * `fetchurl` /// * `fetchTarball` @@ -40,9 +42,12 @@ pub fn add_fetcher_builtins<'co, 'ro, 'env, IO>( eval_builder.add_builtins(fetchers::fetcher_builtins::builtins(Rc::clone(&io))) } -/// Adds import-related builtins to the passed [tvix_eval::Evaluation]. +/// Adds import-related builtins to the passed [tvix_eval::EvaluationBuilder]: /// -/// These are `filterSource` and `path` +/// +/// * `filterSource` +/// * `path` +/// * `storePath` /// /// As they need to interact with the store implementation, we pass [`TvixStoreIO`]. pub fn add_import_builtins<'co, 'ro, 'env, IO>(