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