fix: Fix compilation from outside
Change-Id: I6f2ad235e00b8a08a8ec061f0a822881a2d83bca
This commit is contained in:
parent
85fd360bfa
commit
240b6a8ba4
11 changed files with 16 additions and 25 deletions
|
@ -20,15 +20,15 @@ fn main() -> Result<()> {
|
|||
.extern_path(".tvix.castore.v1", "::tvix_castore::proto")
|
||||
.compile(
|
||||
&[
|
||||
"tvix/build/protos/build.proto",
|
||||
"tvix/build/protos/rpc_build.proto",
|
||||
"build/protos/build.proto",
|
||||
"build/protos/rpc_build.proto",
|
||||
],
|
||||
// If we are in running `cargo build` manually, using `../..` works fine,
|
||||
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
||||
// to a custom tree containing that structure.
|
||||
&[match std::env::var_os("PROTO_ROOT") {
|
||||
Some(proto_root) => proto_root.to_str().unwrap().to_owned(),
|
||||
None => "../..".to_string(),
|
||||
None => "..".to_string(),
|
||||
}],
|
||||
)
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ syntax = "proto3";
|
|||
|
||||
package tvix.build.v1;
|
||||
|
||||
import "tvix/castore/protos/castore.proto";
|
||||
import "castore/protos/castore.proto";
|
||||
|
||||
option go_package = "code.tvl.fyi/tvix/build-go;buildv1";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ syntax = "proto3";
|
|||
|
||||
package tvix.build.v1;
|
||||
|
||||
import "tvix/build/protos/build.proto";
|
||||
import "build/protos/build.proto";
|
||||
|
||||
option go_package = "code.tvl.fyi/tvix/build-go;buildv1";
|
||||
|
||||
|
|
|
@ -93,6 +93,3 @@ tonic-reflection = ["dep:tonic-reflection"]
|
|||
# Requires the following packages in $PATH:
|
||||
# cbtemulator, google-cloud-bigtable-tool
|
||||
integration = []
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -20,16 +20,16 @@ fn main() -> Result<()> {
|
|||
.type_attribute(".", "#[derive(Eq, Hash)]")
|
||||
.compile(
|
||||
&[
|
||||
"tvix/castore/protos/castore.proto",
|
||||
"tvix/castore/protos/rpc_blobstore.proto",
|
||||
"tvix/castore/protos/rpc_directory.proto",
|
||||
"castore/protos/castore.proto",
|
||||
"castore/protos/rpc_blobstore.proto",
|
||||
"castore/protos/rpc_directory.proto",
|
||||
],
|
||||
// If we are in running `cargo build` manually, using `../..` works fine,
|
||||
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
||||
// to a custom tree containing that structure.
|
||||
&[match std::env::var_os("PROTO_ROOT") {
|
||||
Some(proto_root) => proto_root.to_str().unwrap().to_owned(),
|
||||
None => "../..".to_string(),
|
||||
None => "..".to_string(),
|
||||
}],
|
||||
)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ syntax = "proto3";
|
|||
|
||||
package tvix.castore.v1;
|
||||
|
||||
import "tvix/castore/protos/castore.proto";
|
||||
import "castore/protos/castore.proto";
|
||||
|
||||
option go_package = "code.tvl.fyi/tvix/castore-go;castorev1";
|
||||
|
||||
|
|
|
@ -79,6 +79,3 @@ xp-store-composition = ["toml"]
|
|||
# Requires the following packages in $PATH:
|
||||
# cbtemulator, google-cloud-bigtable-tool
|
||||
integration = []
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -20,15 +20,15 @@ fn main() -> Result<()> {
|
|||
.extern_path(".tvix.castore.v1", "::tvix_castore::proto")
|
||||
.compile(
|
||||
&[
|
||||
"tvix/store/protos/pathinfo.proto",
|
||||
"tvix/store/protos/rpc_pathinfo.proto",
|
||||
"store/protos/pathinfo.proto",
|
||||
"store/protos/rpc_pathinfo.proto",
|
||||
],
|
||||
// If we are in running `cargo build` manually, using `../..` works fine,
|
||||
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
||||
// to a custom tree containing that structure.
|
||||
&[match std::env::var_os("PROTO_ROOT") {
|
||||
Some(proto_root) => proto_root.to_str().unwrap().to_owned(),
|
||||
None => "../..".to_string(),
|
||||
None => "..".to_string(),
|
||||
}],
|
||||
)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ syntax = "proto3";
|
|||
|
||||
package tvix.store.v1;
|
||||
|
||||
import "tvix/castore/protos/castore.proto";
|
||||
import "castore/protos/castore.proto";
|
||||
|
||||
option go_package = "code.tvl.fyi/tvix/store-go;storev1";
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ syntax = "proto3";
|
|||
|
||||
package tvix.store.v1;
|
||||
|
||||
import "tvix/castore/protos/castore.proto";
|
||||
import "tvix/store/protos/pathinfo.proto";
|
||||
import "castore/protos/castore.proto";
|
||||
import "store/protos/pathinfo.proto";
|
||||
|
||||
option go_package = "code.tvl.fyi/tvix/store-go;storev1";
|
||||
|
||||
|
|
|
@ -49,6 +49,3 @@ reqwest = [
|
|||
axum = [
|
||||
"dep:axum",
|
||||
]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
Loading…
Reference in a new issue