From 551c9865919aa5c3da574e7cf7cd12da7a0bb6e7 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 14 Apr 2026 21:47:45 -0600 Subject: [PATCH] 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 --- flake.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index e1f29f681..8005f1d90 100644 --- a/flake.nix +++ b/flake.nix @@ -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