wip: copy from unionlabs/union/gnoland#1
Draft
benluelo wants to merge 6 commits into
Draft
Conversation
4 tasks
notJoon
added a commit
that referenced
this pull request
May 11, 2026
* chore: add nix flake for reproducible dev shell Adopt the flake from #1 (WIP) so the toolchain pins land ahead of that PR: nixpkgs 25.11, gno upstream at the same commit as .gno-version (e16676ee), gnopls, plus the Go/Python/Rust-adjacent tools the project's tooling already shells out to (go, gofumpt, rsync, jq). The flake builds gno/gnopls/gnodev from source but does NOT integrate this repo's native stdlibs — keccak256/bn254/cometbls bindings still need `make install-gno`, which symlinks stdlibs/ into a working gno checkout and re-runs `go generate`. The flake's role is the supporting toolchain (reproducible Python with pytest baked in for the regression tests, formatters via treefmt-nix, editor LSPs). Adjustments vs #1's flake: dropped `pkgsStatic` (dev shell doesn't need fully-static binaries and dynamic linking gives better binary cache hits), extracted `mkGnoTool` helper to dedupe the gno/gnodev derivations, used `modRoot` instead of the `prePatch cd` hack, dropped redundant `treefmt.programs.nixfmt.package` override, and stripped flake-parts template boilerplate. `.envrc` is a one-line `use flake` for direnv users; `.direnv/` added to .gitignore. CI continues to pin pytest inline; promoting CI to Nix is a separate change. Assisted-By: Claude Opus 4.7 (1M context) * docs: update README to include development setup instructions * ci(test): run workflow inside nix develop, pin toolchain via flake Replace `actions/setup-go@v5` + inline `pip install pytest` with the flake's pinned toolchain. The test job now installs Nix and sources a minimal `devShells.ci` (python+pytest, go, rsync — all from cache.nixos.org substitutes, no source builds) for every subsequent step. Refactors from /simplify: - `devShells.default` now inherits from `devShells.ci` via `inputsFrom`, so the python+go+rsync baseline has one source of truth. - `nix print-dev-env .#ci` is materialized once at job start; later steps source it through BASH_ENV instead of re-evaluating the flake on each `nix develop --command` call (saves ~10–20s per run). - `flake.lock` is added to the Go build-cache key so a nixpkgs bump that changes Go's version invalidates `~/.cache/go-build` cleanly. - `timeout-minutes: 30` guards against Nix download stalls. Workflow path triggers gain `flake.nix` and `flake.lock`. Out of scope: gno-coverage.yml and lint.yml (separate change), and /nix/store caching (premature without a measurement). Assisted-By: Claude Opus 4.7 (1M context) * fix(flake): prepend GOBIN to PATH in ci shell `nix print-dev-env` rebuilds PATH from the shell's store paths only, which dropped the runner's `~/go/bin` entry — `make install-gno` installs the gno binary there, and `make verify-gno` then failed with "ERROR: 'gno' not found on PATH". Add a shellHook that prepends `\${GOBIN:-\$HOME/go/bin}` to PATH so the gno binary stays reachable from every step that sources the dev env via BASH_ENV. Assisted-By: Claude Opus 4.7 (1M context) * ci(coverage): migrate workflow to nix develop, expand path triggers Match test.yml's setup: install Nix, materialize the ci dev shell once into BASH_ENV, drop `actions/setup-go@v5`. The custom GNO_REPO / GNO_COMMIT env vars (pointing at the gno fork that carries the `-cover` flag) pass through unchanged — the ci shell only supplies python/go/rsync, the experimental gno is still built by `make install-gno GNO_COMMIT=...`. Add `flake.nix` / `flake.lock` to the path triggers so flake-only changes still fire this workflow (the immediate motivation: this PR touched only flake files and skipped coverage entirely). Add `flake.lock` to the gobuild-cover cache key for the same reason as test.yml — Go-version bumps via nixpkgs invalidate `~/.cache/go-build`. `timeout-minutes: 30` guards against Nix download stalls, same as test.yml. Assisted-By: Claude Opus 4.7 (1M context)
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.
very wip, just copied the progress from unionlabs/union#5455.
TODO: