Toolchain — one Nix flake, Julia from the system or from Nix

flake.nix provides everything (ADR-0004):

ToolSourceWhy
Rust (rustc, cargo, clippy, rustfmt, rust-analyzer, rust-src)rust-toolchain.toml via rust-overlayOne pin for Nix and rustup users alike
cargo-nextest, cargo-deny, justnixpkgsTests, licence checks, task runner
vorbis-tools (oggenc)nixpkgsOgg Vorbis encoding of the demo renders (T-040)
clap-validator 0.4.1 + fixes (master 55f0ff0)built from source, revision pinned in flake.nix (not in nixpkgs); past 0.4.1 for its preset-discovery deadlock fix (T-019)CLAP conformance tests on the built bundle
graphicle (optional)system if installed; the flake’s build only with INSTRUMENTS_NIX_GRAPHICLE=1Code graph and memory for coding agents (CLI + MCP server)
Node 22nixpkgsQuartz (site/build.sh)
Juliasystem if ≥ 1.13, else nixpkgs julia-binTraining
ALSA, JACK, X11/xcb, xkbcommon, Wayland, GL, Vulkan (Linux)nixpkgs, also on LD_LIBRARY_PATHStandalone audio and plugin GUIs

Shells

  • nix develop — the default. Its shell hook looks for a julia on the PATH. If it is at least 1.13 (the minimum in training/Project.toml, which the committed Manifest.toml is resolved for), it is used (juliaup, distro packages and manual installs keep working). Otherwise the flake’s Julia is built/fetched on first use and put on the PATH. INSTRUMENTS_NIX_JULIA=1 nix develop forces the flake’s.
  • nix develop .#pure — Julia from the flake, always: for CI and exact reproduction.
  • nix develop .#gui-test (Linux) — adds Xvfb and Mesa’s software OpenGL from Nix (with the glvnd, EGL and driver paths set so it works outside NixOS) for scripts/gui-smoke-test.sh.
  • nix build .#julia — just the pinned Julia. nix build .#graphicle / nix run .#graphicle — just Graphicle.
  • direnv allow (.envrc holds use flake) loads the default shell on cd.
  • scripts/nix-develop-git.sh [args] — the same as nix develop [args] where GitHub’s API and archive downloads are blocked but git clone works (Claude Code cloud sessions): it overrides every github: input with git+https at its locked revision, without changing flake.lock.

What is pinned where

WhatPin
nixpkgs, rust-overlayflake.lock (nix flake update to move)
clap-validatorrelease tag in the clap-validator input of flake.nix; its git dependencies (clack) via allowBuiltinFetchGit at the revisions in its Cargo.lock
Graphiclerelease tag in the graphicle input of flake.nix (change the tag, then nix flake update graphicle)
Rustrust-toolchain.toml
Julia packagestraining/Manifest.toml
QuartzQUARTZ_REF in site/build.sh
npm packages for QuartzQuartz’s package-lock.json at that ref

Graphicle

Graphicle indexes the repository into a code graph (tree-sitter, no model) and serves it with the vault’s notes to coding agents over MCP. It is optional. A graphicle already on the PATH is used as it is. INSTRUMENTS_NIX_GRAPHICLE=1 nix develop puts the flake’s pinned build on the PATH instead (compiled from source, ~20 min the first time, then cached; its update check is turned off). Without either, the shell says so and carries on. Connecting it is a per-machine step:

  • graphicle setup builds the graph, registers the MCP server with the agents it finds (Claude Code, Codex, Cursor, …) and installs Git hooks that keep the graph current. It lists and backs up every file it changes; graphicle disconnect undoes it.
  • graphicle ask "…" queries from the terminal.