about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/build-go/build.pb.go2
-rw-r--r--tvix/build/protos/build.proto2
-rw-r--r--tvix/glue/src/tvix_build.rs14
3 files changed, 9 insertions, 9 deletions
diff --git a/tvix/build-go/build.pb.go b/tvix/build-go/build.pb.go
index 96fc09d3640f..6646d4e91f5b 100644
--- a/tvix/build-go/build.pb.go
+++ b/tvix/build-go/build.pb.go
@@ -86,7 +86,7 @@ type BuildRequest struct {
 	// slashes, and sorted.
 	ScratchPaths []string `protobuf:"bytes,4,rep,name=scratch_paths,json=scratchPaths,proto3" json:"scratch_paths,omitempty"`
 	// The path where the castore input nodes will be located at,
-	// "/nix/store" in case of Nix.
+	// "nix/store" in case of Nix.
 	// Builds might also write into here (Nix builds do that).
 	// This MUST be a clean relative path, without any ".", "..", or superfluous
 	// slashes.
diff --git a/tvix/build/protos/build.proto b/tvix/build/protos/build.proto
index 733636d2221c..f1f6bf0b05d8 100644
--- a/tvix/build/protos/build.proto
+++ b/tvix/build/protos/build.proto
@@ -71,7 +71,7 @@ message BuildRequest {
   repeated string scratch_paths = 4;
 
   // The path where the castore input nodes will be located at,
-  // "/nix/store" in case of Nix.
+  // "nix/store" in case of Nix.
   // Builds might also write into here (Nix builds do that).
   // This MUST be a clean relative path, without any ".", "..", or superfluous
   // slashes.
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(),
                     },