about summary refs log tree commit diff
path: root/tvix/glue/src
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-05T15·41+0200
committerclbot <clbot@tvl.fyi>2024-01-05T16·49+0000
commit00aa3260c91b946736179133f353009cab7b9d35 (patch)
tree5c7aac19c5a0161dd858ec866c663d0bccf94c02 /tvix/glue/src
parent5f0360c566a8c3a6ebfea1c3b2ddb068ebba4859 (diff)
fix(tvix/build): fix inconsistencies around paths r/7353
Change-Id: I76ce4e042f6fbe4bc897767b55ce4eb1f7269e5c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10541
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/glue/src')
-rw-r--r--tvix/glue/src/tvix_build.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tvix/glue/src/tvix_build.rs b/tvix/glue/src/tvix_build.rs
index 3f0e92e2139d..b75191fe3980 100644
--- a/tvix/glue/src/tvix_build.rs
+++ b/tvix/glue/src/tvix_build.rs
@@ -152,7 +152,7 @@ where
                 .map(|(key, value)| EnvVar { key, value }),
         ),
         inputs,
-        inputs_dir: nix_compat::store_path::STORE_DIR.into(),
+        inputs_dir: nix_compat::store_path::STORE_DIR[1..].into(),
         constraints,
         working_dir: "build".into(),
         scratch_paths: vec!["build".into(), "nix/store".into()],
@@ -192,7 +192,7 @@ fn handle_pass_as_file(
                 Some((k, contents)) => {
                     let (new_k, path) = calculate_pass_as_file_env(&k);
 
-                    additional_files.insert(path.clone(), contents);
+                    additional_files.insert(path[1..].to_string(), contents);
                     environment_vars.insert(new_k, Bytes::from(path));
                 }
                 None => {
@@ -311,7 +311,7 @@ mod test {
                 outputs: vec!["nix/store/fhaj6gmwns62s6ypkcldbaj2ybvkhx3p-foo".into()],
                 environment_vars: expected_environment_vars,
                 inputs: vec![INPUT_NODE_FOO.clone()],
-                inputs_dir: nix_compat::store_path::STORE_DIR.into(),
+                inputs_dir: "nix/store".into(),
                 constraints: Some(BuildConstraints {
                     system: derivation.system.clone(),
                     min_memory: 0,
@@ -381,7 +381,7 @@ mod test {
                 outputs: vec!["nix/store/4q0pg5zpfmznxscq3avycvf9xdvx50n3-bar".into()],
                 environment_vars: expected_environment_vars,
                 inputs: vec![],
-                inputs_dir: nix_compat::store_path::STORE_DIR.into(),
+                inputs_dir: "nix/store".into(),
                 constraints: Some(BuildConstraints {
                     system: derivation.system.clone(),
                     min_memory: 0,
@@ -455,7 +455,7 @@ mod test {
                 outputs: vec!["nix/store/pp17lwra2jkx8rha15qabg2q3wij72lj-foo".into()],
                 environment_vars: expected_environment_vars,
                 inputs: vec![],
-                inputs_dir: nix_compat::store_path::STORE_DIR.into(),
+                inputs_dir: "nix/store".into(),
                 constraints: Some(BuildConstraints {
                     system: derivation.system.clone(),
                     min_memory: 0,
@@ -466,13 +466,13 @@ mod test {
                 additional_files: vec![
                     // baz env
                     AdditionalFile {
-                        path: "/build/.attr-15l04iksj1280dvhbzdq9ai3wlf8ac2188m9qv0gn81k9nba19ds"
+                        path: "build/.attr-15l04iksj1280dvhbzdq9ai3wlf8ac2188m9qv0gn81k9nba19ds"
                             .into(),
                         contents: "bar".into()
                     },
                     // bar env
                     AdditionalFile {
-                        path: "/build/.attr-1fcgpy7vc4ammr7s17j2xq88scswkgz23dqzc04g8sx5vcp2pppw"
+                        path: "build/.attr-1fcgpy7vc4ammr7s17j2xq88scswkgz23dqzc04g8sx5vcp2pppw"
                             .into(),
                         contents: "baz".into(),
                     },