diff options
-rw-r--r-- | tvix/cli/src/derivation.rs | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/tvix/cli/src/derivation.rs b/tvix/cli/src/derivation.rs index 1508e3e6d935..5a04c2a11bb2 100644 --- a/tvix/cli/src/derivation.rs +++ b/tvix/cli/src/derivation.rs @@ -175,7 +175,6 @@ async fn handle_derivation_parameters( .to_list() .context("looking at the `outputs` parameter of the derivation")?; - drv.outputs.clear(); populate_outputs(co, drv, outputs).await?; } @@ -264,20 +263,7 @@ mod derivation_builtins { Ok(None) } - populate_output_configuration( - &mut drv, - select_string(&co, &input, "outputHash") - .await - .context("evaluating the `outputHash` parameter")?, - select_string(&co, &input, "outputHashAlgo") - .await - .context("evaluating the `outputHashAlgo` parameter")?, - select_string(&co, &input, "outputHashMode") - .await - .context("evaluating the `outputHashMode` parameter")?, - )?; - - for (name, value) in input.into_iter_sorted() { + for (name, value) in input.clone().into_iter_sorted() { let value = generators::request_force(&co, value).await; if ignore_nulls && matches!(value, Value::Null) { continue; @@ -303,6 +289,19 @@ mod derivation_builtins { } } + populate_output_configuration( + &mut drv, + select_string(&co, &input, "outputHash") + .await + .context("evaluating the `outputHash` parameter")?, + select_string(&co, &input, "outputHashAlgo") + .await + .context("evaluating the `outputHashAlgo` parameter")?, + select_string(&co, &input, "outputHashMode") + .await + .context("evaluating the `outputHashMode` parameter")?, + )?; + // Scan references in relevant attributes to detect any build-references. let references = { let state = state.borrow(); |