Skip to content

Conversation

ghuntley
Copy link

@ghuntley ghuntley commented Oct 7, 2025

context

Onboarding for folks running NixOS is not smooth. Here's the default experience.

$ cd ~/work/boundaryml/baml
$ direnv allow .

direnv: loading ~/code/boundaryml/baml/.envrc
direnv: using flake
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/9v6qa656sq3xc58vkxslqy646p0ajj61-source/pkgs/stdenv/generic/make-derivation.nix:544:13

       … while evaluating attribute 'BINDGEN_EXTRA_CLANG_ARGS' of derivation 'nix-shell'
         at /nix/store/rgdhxcm6fzf2hjyc73cq3i6n1pd5rbka-source/flake.nix:777:13:
          776|             # UV_PYTHON = "${pythonEnv}/bin/python3"; // This doesn't work with maturin.
          777|             BINDGEN_EXTRA_CLANG_ARGS = if pkgs.stdenv.isDarwin then
             |             ^
          778|               "" # Rely on default includes provided by stdenv.cc + libclang

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: llvmPackages_17 has been removed, as it is unmaintained and obsolete
direnv: nix-direnv: Evaluating current devShell failed. Falling back to previous environment!

thoughts

  • Is unpinned LLVM acceptable or should we move to 19 (or 19+)
  • I note CONTRIBUTING.md references mise ala scripts/*.sh to bootstrap (bootstrapping rn so no feedback yet)

notes

  • This is a simple version bump/unpin which hasn't been tested (raising and slapping CI with the change instead) generated via a low-effort Claude Code 'fix it' prompt.

Copy link

vercel bot commented Oct 7, 2025

@ghuntley is attempting to deploy a commit to the Boundary Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

🔒 Entelligence AI Vulnerability Scanner

No security vulnerabilities found!

Your code passed our comprehensive security analysis.


"" # 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";

@imalsogreg
Copy link
Contributor

Thanks for this! I actually bumped dependencies in flake.nix and dropped the libclang_17 dep myself just a couple days ago. https://github.com/BoundaryML/baml/pull/2577/files

I'm curious if you are trying to use nix for your BAML apps? I just use this flake for local development of the BAML project, although I occasionally think about using nix to drive our packaging and deployment, as well as providing the baml-cli via nixpkgs.

@imalsogreg
Copy link
Contributor

@ghuntley Are you having luck with canary:HEAD (our version of main)? If so I will close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants