Repository navigation
feat(scripts): make just init Nix-first; retire requirements.yaml - #672
Merged
c-vigo merged 2 commits intoJun 24, 2026
Merged
Conversation
Rewrite init.bats to assert the new contract — gate on Nix/direnv and the dev-shell, bootstrap the project, and no legacy OS installer — and drop the requirements.yaml test classes from test_utils.py. Refs: #671
Rework scripts/init.sh from a ~680-line multi-OS package installer into a Nix-first gate + project bootstrapper: it requires Nix (and direnv, unless --no-direnv) plus the dev-shell toolchain, then runs one-time, idempotent bootstrap (uv sync, git hooks path, commit template, pre-commit install-hooks) with advisory podman/gh checks. It installs no tools — the toolchain is the flake's devTools — and short-circuits inside the built image (IN_CONTAINER). Retire scripts/requirements.yaml, the redundant second toolchain SSoT that had drifted from flake.nix devTools: drop its docs/generate.py consumers (load_requirements / format_requirements_table / format_install_commands) and rewrite the CONTRIBUTE.md 'Requirements' table into a 'Prerequisites: Nix + direnv + host container runtime' section. Update the justfile init recipe comment and regenerate the docs. Refs: #671
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make
just initNix-first and retirescripts/requirements.yaml, closing a gapin the #625 migration: the contributor bootstrap was still a multi-OS package
installer driven by a second toolchain SSoT (
requirements.yaml) that haddrifted from
flake.nixdevTools.Type of Change
feat-- New featurerefactor-- Code restructuring (no behavior change)Changes Made
scripts/init.sh: rewritten from a ~680-line OS-detecting installer into aNix-first prerequisite gate + project bootstrapper. It requires Nix (and
direnv, unless
--no-direnv) plus the dev-shell toolchain, then runs one-time,idempotent bootstrap (
uv sync --frozen --all-extras, git hooks path, committemplate,
pre-commit install-hooks) with advisorypodman info/gh auth statuschecks. It installs no tools — the toolchain is the flake'sdevTools—and short-circuits inside the built image (
IN_CONTAINER=true). The gate pathuses only shell builtins so it works before any tool is on PATH.
scripts/requirements.yamland itsdocs/generate.pyconsumers(
load_requirements,format_requirements_table,format_install_commands)and their tests.
flake.nixdevToolsis now the sole toolchain SSoT.CONTRIBUTE.md.j2"Requirements" table → "Prerequisites: Nix +direnv + a working host container runtime (podman/Docker)". Regenerated
CONTRIBUTE.md/README.md; updated thejustfileinitrecipe comment.Changelog Entry
Changed
just initNix-first (#671)Removed
scripts/requirements.yaml(#671)Testing
bats tests/bats/= 243/243;pytest tests/test_utils.py tests/test_install_script.py= 52 passed;ruff checkclean; all pre-commit hooks pass incl. shellcheck + generate-docs sync)Manual Testing Details
init.sh --helpprints usage; unknown flags exit 1.nixpresent but nouv, it instructsdirenv allow/nix developand exits non-zero.IN_CONTAINER=true ./scripts/init.shis a no-op../scripts/init.sh --checkin a provisioned dev shell reports prerequisites OK without bootstrapping.Checklist
docs/templates/, ranjust docs)CHANGELOG.mdin the[Unreleased]sectioninit.batsfirst, then implementation)Closes #671