build: package the kitchen CLI as a Nix flake #1

Merged
alexion merged 3 commits from task-0001-flake-build into main 2026-07-25 22:38:14 -04:00

3 Commits

Author SHA1 Message Date
fdede89e0c feat: add flake app, dev shell, direnv, and checks
Layer the remaining flake outputs onto the build: a default app pointing at
the compiled binary, a dev shell exposing the pinned Bun, biome, and bun2nix,
a `use flake` .envrc for direnv, and a checks set aggregating the Bun test
tiers, a build-seam smoke check against the Nix-built binary, and biome lint
through the treefmt-nix flake-parts module.

The dev shell and the build share the one pinned nixpkgs-bun input so Bun
cannot drift between them. treefmt's biome reuses the repo's biome.json with
VCS disabled for the sandbox, and packages/core/src/index_test.ts is
reformatted by biome so the new lint gate is green.
2026-07-25 22:28:10 -04:00
8fd2e53c53 build: package the kitchen CLI as a Nix flake
Add a flake-parts flake whose default package Bun-compiles the kitchen
CLI into a self-contained native binary, built in the sandbox with
dependencies vendored by bun2nix.

Bun is pinned via a dedicated nixpkgs-bun input (Bun 1.3.13) that
bun2nix follows, so nixpkgs can track unstable without moving the
compile toolchain onto a release that emits empty binaries.

bun2nix is both a flake input and an npm devDependency, and a
postinstall hook keeps the checked-in bun.nix in sync with the lockfile.
2026-07-25 22:28:10 -04:00
1af090caa3 docs: add nix flake packaging spec and ADR
Replace the stale Bun-only project-scaffold spec with a Nix-aware
packaging spec, and record the flake-parts + bun2nix + pinned-Bun
decision as ADR 0007.
2026-07-25 20:25:19 -04:00