Add Nix flake and dev shell for building gh with PR review helpers
Goal
Provide Nix configuration (flake) to build and install a gh binary that includes our new gh pr review commands, plus a dev shell for local development.
Scope
- Add
flake.nix and (if needed) flake.lock for reproducible builds.
- Outputs:
packages for: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin
defaultPackage for the host platform
devShells.default with Go toolchain, golangci-lint, and common tooling
apps.gh so nix run .#gh -- <args> works
- Build from branch
contrib/pr-review-commands by default (or the current checkout), with proper version stamping (e.g., GH_VERSION pulled from git tag or fallback pre-release version).
- Include an overlay to make
gh available via nix profile install for users who prefer overlays.
Acceptance Criteria
nix build .#gh produces a working gh binary exposing:
gh pr see-comments
gh pr reply-comment
gh pr review pending {open,add,submit}
nix develop provides a shell with Go toolchain (pinned), golangci-lint, and necessary tools to build/test.
nix run .#gh -- pr --help works on x86_64-linux.
- README updates: a short section with Nix build/install/run examples.
- Open a PR on the fork (do not merge) with the flake and README changes.
Notes
- Keep this PR separate from the upstream contribution; it’s purely packaging for our fork.
- Prefer flake-parts or standard flake layout; ensure CI can build
nix build if we enable it later.
Add Nix flake and dev shell for building gh with PR review helpers
Goal
Provide Nix configuration (flake) to build and install a
ghbinary that includes our newgh prreview commands, plus a dev shell for local development.Scope
flake.nixand (if needed)flake.lockfor reproducible builds.packagesfor: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwindefaultPackagefor the host platformdevShells.defaultwith Go toolchain, golangci-lint, and common toolingapps.ghsonix run .#gh -- <args>workscontrib/pr-review-commandsby default (or the current checkout), with proper version stamping (e.g.,GH_VERSIONpulled from git tag or fallback pre-release version).ghavailable vianix profile installfor users who prefer overlays.Acceptance Criteria
nix build .#ghproduces a workingghbinary exposing:gh pr see-commentsgh pr reply-commentgh pr review pending {open,add,submit}nix developprovides a shell with Go toolchain (pinned), golangci-lint, and necessary tools to build/test.nix run .#gh -- pr --helpworks on x86_64-linux.Notes
nix buildif we enable it later.