nixpkgs/pkgs/by-name/kc/kclvm/enable_protoc_env.patch
2024-06-13 13:34:24 +03:00

38 lines
1.4 KiB
Diff

diff --git a/api/build.rs b/api/build.rs
index 617c1b9a..20d728e3 100644
--- a/api/build.rs
+++ b/api/build.rs
@@ -5,10 +5,10 @@ use prost_wkt_build::{FileDescriptorSet, Message};
/// According to the file kclvm/spec/gpyrpc/gpyrpc.proto, automatically generate
/// the corresponding rust source file to the directory src/model
fn main() {
- std::env::set_var(
- "PROTOC",
- protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
- );
+ // std::env::set_var(
+ // "PROTOC",
+ // protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
+ // );
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
let descriptor_file = out.join("kclvm_service_descriptor.bin");
diff --git b/third-party/prost-wkt/wkt-types/build.rs a/third-party/prost-wkt/wkt-types/build.rs
index e49222d5..a933ddf4 100644
--- a/third-party/prost-wkt/wkt-types/build.rs
+++ b/third-party/prost-wkt/wkt-types/build.rs
@@ -13,10 +13,10 @@ use regex::Regex;
fn main() {
//hack: set protoc_bin_vendored::protoc_bin_path() to PROTOC
- std::env::set_var(
- "PROTOC",
- protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
- );
+ // std::env::set_var(
+ // "PROTOC",
+ // protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
+ // );
let dir = PathBuf::from(env::var("OUT_DIR").unwrap());
process_prost_pbtime(&dir);