about summary refs log tree commit diff
path: root/tvix/nix-compat
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-03-14T19·52+0100
committerflokli <flokli@flokli.de>2023-03-14T20·53+0000
commita14880903cb63f80d857cb4062bbbc099c12c69e (patch)
tree0570a5c092383c6e9c89d0dbdb43715df7eaac7d /tvix/nix-compat
parent84a8ed265ce1f6287bfae0f5196950695c9a45f0 (diff)
refactor(tvix/nix-compat): rename helper func r/6000
This only trims the output paths from a Derivation struct, not the
output hashes.

Change-Id: I9250fec4602ed05bb64540c4a89ddb6fb052be1f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8303
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat')
-rw-r--r--tvix/nix-compat/src/derivation/tests/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/nix-compat/src/derivation/tests/mod.rs b/tvix/nix-compat/src/derivation/tests/mod.rs
index 2b5b8343201a..7f94f5e690ce 100644
--- a/tvix/nix-compat/src/derivation/tests/mod.rs
+++ b/tvix/nix-compat/src/derivation/tests/mod.rs
@@ -70,9 +70,9 @@ fn derivation_path(name: &str, expected_path: &str) {
     );
 }
 
-/// This trims all outputs from a Derivation struct,
+/// This trims all output paths from a Derivation struct,
 /// by setting outputs[$outputName].path and environment[$outputName] to the empty string.
-fn derivation_with_trimmed_outputs(derivation: &Derivation) -> Derivation {
+fn derivation_with_trimmed_output_paths(derivation: &Derivation) -> Derivation {
     let mut trimmed_env = derivation.environment.clone();
     let mut trimmed_outputs = derivation.outputs.clone();
 
@@ -120,7 +120,7 @@ fn output_paths(name: &str, drv_path: &str) {
     let data = read_file(&format!("{}/{}.json", RESOURCES_PATHS, drv_path));
     let expected_derivation: Derivation = serde_json::from_str(&data).expect("must deserialize");
 
-    let mut derivation = derivation_with_trimmed_outputs(&expected_derivation);
+    let mut derivation = derivation_with_trimmed_output_paths(&expected_derivation);
 
     // calculate the derivation_or_fod_hash of derivation
     // We don't expect the lookup function to be called for most derivations.