fix(nix): export LIBCLANG_PATH in devShell for mupdf-sys bindgen

`inputsFrom` does not propagate the package's `env.*` attributes into
the dev shell, so running `npm run tauri dev` inside `nix develop`
failed at `mupdf-sys(build)` with "Unable to find libclang".

Re-export LIBCLANG_PATH on the shell itself.

Closes #312.

cc
This commit is contained in:
vicrodh committed 2026-04-14 21:47:45 -06:00
1 parent f7e51b980e
commit 551c986591
1 file changed
+8
+8
View File
@@ -93,6 +93,14 @@
# Dev shell with all build dependencies
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
# `inputsFrom` pulls in buildInputs/nativeBuildInputs from the
# package but does NOT propagate `env.*` attributes, so we must
# re-export LIBCLANG_PATH here — otherwise `mupdf-sys`'s bindgen
# fails with "Unable to find libclang" when running
# `npm run tauri dev` inside `nix develop` (issue #312).
LIBCLANG_PATH = "${pkgs.lib.getLib pkgs.llvmPackages.libclang}/lib";
packages = with pkgs; [
rust-analyzer
rustfmt