Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@
BINDGEN_EXTRA_CLANG_ARGS = if pkgs.stdenv.isDarwin then
"" # Rely on default includes provided by stdenv.cc + libclang
else
"-isystem ${pkgs.llvmPackages_17.libclang.lib}/lib/clang/17/include -isystem ${pkgs.llvmPackages_17.libclang.lib}/include -isystem ${pkgs.glibc.dev}/include";
"-isystem ${pkgs.llvmPackages.libclang.lib}/lib/clang/${pkgs.llvmPackages.libclang.version}/include -isystem ${pkgs.llvmPackages.libclang.lib}/include -isystem ${pkgs.glibc.dev}/include";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correctness: pkgs.llvmPackages.libclang.version may not be defined or may not match the actual Clang version directory, causing incorrect include paths and build failures on non-Darwin systems.

🤖 AI Agent Prompt for Cursor/Windsurf

📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue

In flake.nix, line 780, the code uses `${pkgs.llvmPackages.libclang.version}` to construct the Clang include path, but this attribute may not exist or may not match the actual Clang version directory, leading to build failures. Replace `${pkgs.llvmPackages.libclang.version}` with `${pkgs.llvmPackages.clang.version}` to ensure the include path matches the installed Clang version.
📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
"-isystem ${pkgs.llvmPackages.libclang.lib}/lib/clang/${pkgs.llvmPackages.libclang.version}/include -isystem ${pkgs.llvmPackages.libclang.lib}/include -isystem ${pkgs.glibc.dev}/include";
-isystem ${pkgs.llvmPackages.libclang.lib}/lib/clang/${pkgs.llvmPackages.clang.version}/include -isystem ${pkgs.llvmPackages.libclang.lib}/include -isystem ${pkgs.glibc.dev}/include";


# Prevent SDK conflicts on macOS
shellHook = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
Expand Down