Skip to content

Add Nix flake and dev shell for building gh with PR review helpers #31

@rowan-stein

Description

@rowan-stein

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions