generic/rust: set LIBCLANG_PATH

This commit is contained in:
Oystein Kristoffer Tveit 2024-12-05 13:44:55 +01:00
parent eef7d52e6d
commit 7425b281d9
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146

View File

@ -3,6 +3,8 @@
, stdenv , stdenv
, mkShell , mkShell
, llvmPackages
, rust-channel ? "stable" , rust-channel ? "stable"
, rust-bin , rust-bin
, rust-toolchain ? rust-bin.${rust-channel}.latest.default.override { , rust-toolchain ? rust-bin.${rust-channel}.latest.default.override {
@ -42,6 +44,7 @@ mkShell {
env = { env = {
RUST_SRC_PATH = "${rust-toolchain}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${rust-toolchain}/lib/rustlib/src/rust/library";
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
} // (lib.optionalAttrs (enableSccache) { } // (lib.optionalAttrs (enableSccache) {
RUSTC_WRAPPER = "${pkgsBuildBuild.sccache}/bin/sccache"; RUSTC_WRAPPER = "${pkgsBuildBuild.sccache}/bin/sccache";
}); });