Skip to content

feat(nix): package the gates as a reproducible flake (runtime-bundled bins)#13

Merged
bdelanghe merged 1 commit into
mainfrom
conformance/nix-flake
Jun 29, 2026
Merged

feat(nix): package the gates as a reproducible flake (runtime-bundled bins)#13
bdelanghe merged 1 commit into
mainfrom
conformance/nix-flake

Conversation

@bdelanghe

Copy link
Copy Markdown
Contributor

"Shouldn't we use flakes for bins?" — yes. A third consumption model alongside vendoring + npm: a nix flake exposing every ck-* gate/generator as a hermetic, pinned CLI. Fits the bounded-systems nix-everything ecosystem (tezcatl-flake et al.) and the kit's reproducibility ethos.

The win beyond consistency

Each bin bundles the runtime it shells out to, so it's self-contained — the way tezcatl-flake bundles WebKit:

  • ck-html-validator-gate carries a JRE (vnu is a Java jar)
  • ck-vuln-gate carries npm (for npm audit)

Verified each runs with no java/node on $PATH. The other gates are pure Node + their bundled node_modules. (ck-axe-gate still needs a browser via $AXE_RUNNER: tezcatl / Playwright.)

nix run github:bounded-systems/conformance-kit#ck-axe-gate -- dist

What

  • flake.nixbuildNpmPackage (npmDepsHash pinned, dontNpmBuild), per-bin apps, JRE/npm wraps.
  • flake.lock; README documents the third model.

Verification (local)

nix build succeeds; ck-vuln-gate / ck-html-validator-gate / ck-baseline-gate all run from the store with no runtime on $PATH; nix run .#ck-baseline-gate fails closed correctly. (npm test still 17/0.)

Maintenance note

npmDepsHash is pinned — when package-lock.json changes, recompute via nix run nixpkgs#prefetch-npm-deps -- package-lock.json. A nix flake check CI job would catch drift (follow-up).

🤖 Generated with Claude Code

…, runtime-bundled bins)

A third consumption model alongside vendoring + npm: a nix flake exposing every
ck-* gate/generator as a hermetic, pinned CLI — fitting the bounded-systems
nix-everything ecosystem (tezcatl-flake et al.) and the kit's reproducibility ethos.

The win beyond consistency: each bin bundles the runtime it shells out to, so it is
self-contained (the way tezcatl-flake bundles WebKit):
  • ck-html-validator-gate carries a JRE (vnu is a Java jar)
  • ck-vuln-gate carries npm (for `npm audit`)
— verified each runs with NO java/node on $PATH. The other gates are pure Node +
their bundled node_modules. (ck-axe-gate still needs a browser via $AXE_RUNNER.)

  nix run github:bounded-systems/conformance-kit#ck-axe-gate -- dist

flake.nix (buildNpmPackage, npmDepsHash pinned, dontNpmBuild) + flake.lock; README
documents the third model.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bdelanghe bdelanghe merged commit e6e0483 into main Jun 29, 2026
1 check passed
@bdelanghe bdelanghe deleted the conformance/nix-flake branch June 29, 2026 01:46
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.

1 participant