Skip to content

feat(nix): Nix image toolchain parity — pass the full testinfra suite (#666) - #667

Merged
c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
feature/666-nix-toolchain-parity
Jun 24, 2026
Merged

c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
feature/666-nix-toolchain-parity

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes the deferred discovery gap so the Nix image passes the full tests/test_image.py suite (63/63) — a prerequisite for making Nix the only build (#642).

  • Relaxed requires-python ==3.14.6 → >=3.14,<3.15 (root, vig-utils, workspace template) + regenerated uv.lock. flake.lock pins the exact interpreter now, so the == pin was redundant and unsatisfiable against nixpkgs (3.14.4) — uv sync was failing.
  • Baked the project Python toolchain (Nix-native): packaged vig-utils (hatchling, dep rich) and pip-licenses (from its PyPI wheel — not in nixpkgs) into a python314.withPackages env so import vig_utils + the console scripts work without a network-populated venv; added ruff, bandit, cargo-binstall, just-lsp, typstyle from nixpkgs. Replaces the Debian image's build-time uv pip install.
  • Adapted test_image.py: nixpkgs-pinned tools are checked presence/run-only (versions live in flake.lock, not the test; avoids breakage on every nixpkgs bump); the pre-commit cache dir is asserted present (a hermetic build can't pre-fetch hook repos). Made nix-image.yml's build-and-test job gate on testinfra (discovery phase closed; the push step stays tolerant of registry hiccups).

Verified locally

  • nix build .#devcontainerImage succeeds; podman load + TEST_CONTAINER_TAG=… uv run pytest tests/test_image.py → 63 passed (was 31).
  • Dev-shell still evaluates; devShellTools parity list unchanged (23).

Dependencies

Refs: #666

c-vigo added 3 commits June 24, 2026 09:12
nixpkgs pins the exact interpreter via flake.lock (26.05 ships CPython
3.14.x), so an == pin is both redundant and unsatisfiable against nixpkgs
(uv sync failed: 3.14.4 vs ==3.14.6). Relax the constraint in the root,
vig-utils, and workspace-template pyprojects and regenerate uv.lock.

Refs: #666
Package vig-utils (hatchling, dep rich) and pip-licenses (from its PyPI
wheel, since it is not in nixpkgs) as Nix python packages and expose them
via a python314.withPackages env, so `import vig_utils` and the console
scripts work without a network-populated uv venv. Add ruff, bandit,
cargo-binstall, just-lsp, and typstyle from nixpkgs to the image toolset.
This replaces the Debian image's build-time `uv pip install` with a
hermetic, Nix-native toolchain. Refresh the stale uv-download comment.

Refs: #666
…image testinfra

Tool versions are pinned by flake.lock now, so check fast-movers and
tools whose nixpkgs version differs from the old Debian pin (gh, just,
pre-commit, cargo-binstall, typstyle) for presence/run only, and trim the
unused EXPECTED_VERSIONS keys. The pre-commit cache dir is asserted
present (a hermetic build cannot pre-fetch hook repos; it populates on
first run). With the toolchain baked, the suite is 63/63, so drop
continue-on-error from the nix-image build-and-test job (the push step
stays tolerant of registry hiccups).

Refs: #666
@c-vigo
c-vigo merged commit 142e405 into feature/625-nix-claude-migration Jun 24, 2026
19 of 21 checks passed
@c-vigo
c-vigo deleted the feature/666-nix-toolchain-parity branch June 24, 2026 07:23
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