Rhesus
07/30/2026, 9:33 AMflake.nix has accumulated a lot of different responsibilities. It’s ~ 800 lines and includes both a dev shell and package outputs for CLI/Python/TypeScript, including debug/release, musl, and Darwin handling. As far as I can tell, all Nix logic lives in that one file; I don’t see a separate nix/ structure, checks, formatter, docs, or Nix CI.
It also seems to build from the older engine/ workspace, while the current Rust dev docs point contributors to baml_language/. On top of that, the Linux dev shell looks currently broken because it references removed pkgs.llvmPackages_17.libclang. .envrc also auto-selects use flake whenever nix-shell exists, and it sets RUSTC_WRAPPER=baml-sccache, but the Nix shell doesn’t include sccache.
So I’m wondering what maintainers want to do with Nix:
1. Keep it as dev-shell-only: then maybe simplify it, fix Linux/sccache, and remove or mark package outputs unsupported.
2. Support real packaging: then it probably needs a redesign around baml_language/, explicit supported systems, checks/CI, and a proper nix/ structure.
3. Treat it as unofficial/best-effort or external: then maybe keep upstream minimal and let a separate baml-nix flake handle packaging.
If upstream is interested in supported Nix packaging, I’d be willing to work on a refactor and split things into a nix/ directory, similar in spirit to packaging/aur, instead of keeping everything inside one large flake.nix.
Curious what direction you’d prefer.Vaibhav (BAML 🐑)
07/30/2026, 1:12 PMVaibhav (BAML 🐑)
07/30/2026, 1:13 PMVaibhav (BAML 🐑)
07/30/2026, 1:15 PMbaml-cli binary (which is the actual compiler/runtime)
2. baml binary (which is a wrapper similar to rustup that manages version control for baml-cli)Rhesus
07/31/2026, 9:07 AMRhesus
08/17/2026, 11:48 AMVaibhav (BAML 🐑)
08/17/2026, 4:38 PMbaml-sam
08/17/2026, 7:02 PMbaml.toml tie into baml-cli versioning? (Rust has rust-toolchain.toml for this and Nix somehow solves this there)Rhesus
08/18/2026, 6:58 AMnix flake update, baml version will not be changed. the revision can be pinned as follows:
- inputs.baml.url = github:BoundaryML/baml -> follows current default branch revision and pinned
- inputs.baml.url = github:BoundaryML/baml/vX.Y.Z -> follows release tag or branch
3. Nix does not interpret baml.toml or select the project toolchain itself. The Nix package installs the real baml wrapper with self-update disabled. At runtime, that wrapper reads the nearest project baml.toml, resolves its [toolchain] version/channel/path, installs the requested language toolchain under BAML_HOME when necessary, and then launches that toolchain’s baml-cli
The separate Nix baml-cli package is a fixed CLI built from the pinned repository revision. It is intended for CI, containers, or other cases where the toolchain should
be controlled entirely by Nix, and using it directly bypasses baml.toml toolchain selection.
rust-toolchain.toml in the flake is unrelated to BAML project versioning: it only pins the Rust compiler used to build BAML.baml-sam
08/18/2026, 7:28 PMvX.Y.Z tags on the monorepo are being used by the older engine/ releases, and we've also started doing the same for projects like Go, which for BAML v0 aka engine/ we just released directly out of the monorepo but for BAML v1 we're releasing out of BoundaryML/baml-go