fix(build): support Bazel native builds on NixOS ARM64

This commit is contained in:
Oleg Pulatov
2026-07-31 02:09:54 +02:00
parent 4df68d6043
commit 1ffc461dcf
4 changed files with 110 additions and 82 deletions
+14
View File
@@ -0,0 +1,14 @@
--- a/build.rs
+++ b/build.rs
@@ -39,7 +39,10 @@ fn build_opus(is_static: bool) {
);
println!("cargo:info=Building Opus via CMake.");
- let opus_build_dir = cmake::build(opus_path);
+ let opus_build_dir = cmake::Config::new(opus_path)
+ // link_opus() expects the installed archive under <prefix>/lib.
+ .define("CMAKE_INSTALL_LIBDIR", "lib")
+ .build();
link_opus(is_static, opus_build_dir.display())
}