refactor(nix): replace manual bindgen env with rustPlatform.bindgenHook (#1255)

This commit is contained in:
Evgeny Khudoba 2026-04-16 06:06:59 +07:00 committed by GitHub
parent a4d671a601
commit c1e11faa71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,8 +60,6 @@
# Shared environment variables for Rust/native builds
commonEnv = pkgs: let lib = pkgs.lib; in {
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
BINDGEN_EXTRA_CLANG_ARGS = "-isystem ${pkgs.llvmPackages.libclang.lib}/lib/clang/${lib.getVersion pkgs.llvmPackages.libclang}/include -isystem ${pkgs.glibc.dev}/include";
ORT_LIB_LOCATION = "${pkgs.onnxruntime}/lib";
ORT_PREFER_DYNAMIC_LINK = "1";
GST_PLUGIN_SYSTEM_PATH_1_0 = "${lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (gstPlugins pkgs)}";
@ -148,7 +146,7 @@
pkgs.bun2nix.hook # Sets up node_modules from pre-fetched bun cache
jq
cmake
llvmPackages.libclang
rustPlatform.bindgenHook
shaderc
];
@ -246,13 +244,11 @@
# Build tools
cargo-tauri
pkg-config
llvmPackages.libclang
rustPlatform.bindgenHook
cmake
]);
inherit (commonEnv pkgs)
LIBCLANG_PATH
BINDGEN_EXTRA_CLANG_ARGS
ORT_LIB_LOCATION
ORT_PREFER_DYNAMIC_LINK
GST_PLUGIN_SYSTEM_PATH_1_0;