Skip to content

Commit e1a6779

Browse files
chore: fix nix development environment missing libclang (#718)
## What kind of change does this PR introduce? Explicitly list `libclang` dependency for the flake setup and configure the `LIBCLANG_PATH` variable to use that dependency for development using nix flake environment. I originally fixed it using `llvmPackages_16.libclang`, but it also works with `pkgs.libclang` so I am changing to this one in the last pushed commit. ## What is the current behavior? <img width="1851" height="694" alt="image" src="https://github.com/user-attachments/assets/d12041dc-b1cb-446a-8b97-361ee03377ab" />
1 parent cd65952 commit e1a6779

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
pkgs.protobuf
131131
pkgs.cargo-outdated
132132
pkgs.prom2json
133+
pkgs.libclang
133134
]
134135
++ lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk; [
135136
frameworks.System
@@ -142,6 +143,8 @@
142143
libs.libDER
143144
]);
144145

146+
env.LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
147+
145148
# Workaround for https://github.com/rust-lang/cargo/issues/5376
146149
env.RUSTFLAGS = lib.mkForce (lib.optionals pkgs.stdenv.isDarwin [
147150
"-L framework=${config.devenv.profile}/Library/Frameworks"

0 commit comments

Comments
 (0)