Skip to content

Conversation

@AnthonyRonning
Copy link
Contributor

This PR adds Nix flake support for reproducible builds of the Goose CLI. The flake provides a consistent build environment across different systems and makes it easy for Nix users to build, develop, and run Goose.

What's included

  • flake.nix - Main flake configuration that:
    • Dynamically reads package metadata from Cargo.toml files (no hardcoded versions)
    • Builds the goose-cli package with all required dependencies
    • Provides a development shell with cargo tools
    • Configures tests to run with proper HOME/XDG directories
    • Supports both Linux and macOS platforms
  • flake.lock - Pinned dependencies for reproducible builds
  • .gitignore - Added result symlink exclusion

Testing

✅ CLI build and execution tested on NixOS (Linux/aarch64)

  • nix build - Successfully builds the CLI binary
  • nix run - CLI runs and executes commands properly
  • Tests pass with proper environment configuration
  • Development shell (nix develop) works with cargo commands

⚠️ Note: Only the CLI has been tested as my NixOS environment doesn't have a desktop environment. The desktop app would need additional testing, but the flake focuses on the CLI package for now.

Usage

  # Build the CLI
  nix build

  # Run directly
  nix run . -- --help

  # Development shell
  nix develop
  cargo build -p goose-cli

Future improvements

  • Desktop app support could be added once tested
  • Additional Nix-specific documentation could be added to the main README

- Add flake.nix with goose-cli package definition
- Dynamically read metadata from Cargo.toml files
- Include all required dependencies (openssl, xcb, dbus)
- Configure tests to run with proper HOME environment
- Add development shell with cargo tools
- Support both Linux and macOS platforms
- Add flake.lock for reproducible dependencies
- Update .gitignore to exclude Nix result symlink

Signed-off-by: Tony Giorgio <[email protected]>
@michaelneale
Copy link
Collaborator

I think this is fine - nix gets mentioned from time to time and from what little I know, it seems amazing and love that people start to work with it, and this doesn't change any existing builds so why not. Thank you @AnthonyRonning !

@michaelneale michaelneale merged commit 39fefce into block:main Aug 20, 2025
10 checks passed
ayax79 pushed a commit to ayax79/goose that referenced this pull request Aug 21, 2025
Signed-off-by: Tony Giorgio <[email protected]>
Signed-off-by: Jack Wright <[email protected]>
michaelneale added a commit that referenced this pull request Aug 21, 2025
* main:
  docs: add figma tutorial (#4231)
  Add Nix flake for reproducible builds (#4213)
  Enhanced onboarding page visual design (#4156)
  feat: adds mtls to all providers (#2794) (#2799)
  Don't show a confirm dialog for quitting (#4225)
  Fix: Missing smart_approve in CLI /mode help text and error message (#4132)
  Clean up langfuse docs and scripts (#4220)
  feat: add remark-breaks plugin to preserve single newlines in markdown (#4217)
  feat(mcp/developer): accept -1 for insert_line number (#4112)
  Remove dead code and old settings migration (#4180)
  removed tests from lint-staged (#4203)
  docs: openrouter and ollama easy desktop setup (#4195)
  Custom providers update (#4099)
  docs: goose_terminal env var (#4205)
  Desktop alerts when suspicious unicode characters found in Recipe (#4080)
  chore: remove the google drive built-in extension (#4187)
  Move out app init (#4185)
michaelneale added a commit that referenced this pull request Aug 21, 2025
* main:
  Add PKCE support for Tetrate Agent Router Service (#4165)
  Read AGENTS.md by default (#4232)
  docs: configure provider and model (#4235)
  docs: add figma tutorial (#4231)
  Add Nix flake for reproducible builds (#4213)
  Enhanced onboarding page visual design (#4156)
  feat: adds mtls to all providers (#2794) (#2799)
katzdave added a commit that referenced this pull request Aug 21, 2025
* 'main' of github.com:block/goose:
  chore: upgrade rmcp to 0.6.0 (#4243)
  doc: uvx not npx (#4240)
  Add PKCE support for Tetrate Agent Router Service (#4165)
  Read AGENTS.md by default (#4232)
  docs: configure provider and model (#4235)
  docs: add figma tutorial (#4231)
  Add Nix flake for reproducible builds (#4213)
  Enhanced onboarding page visual design (#4156)
  feat: adds mtls to all providers (#2794) (#2799)
  Don't show a confirm dialog for quitting (#4225)
  Fix: Missing smart_approve in CLI /mode help text and error message (#4132)
@AnthonyRonning AnthonyRonning deleted the add-nix-flake branch August 21, 2025 21:41
lifeizhou-ap added a commit that referenced this pull request Aug 22, 2025
* main: (108 commits)
  Remove unused game (#4226)
  fix issue where app redirects to home after initialization but user has already started a chat (#4260)
  Feat: Let providers configure a fast model for summarization (#4228)
  docs: update tool selection strategy (#4258)
  feat: upgrade `@mcp-ui/client` package and improve UI message handling (#4164)
  stop replacing chat window when changing working directory (#4200)
  Only fetch session tokens when chat state is idle to avoid resetting during streaming (#4104)
  bump timeouts for e2e tests (#4251)
  docs: custom context files improvements (#4096)
  chore: upgrade rmcp to 0.6.0 (#4243)
  doc: uvx not npx (#4240)
  Add PKCE support for Tetrate Agent Router Service (#4165)
  Read AGENTS.md by default (#4232)
  docs: configure provider and model (#4235)
  docs: add figma tutorial (#4231)
  Add Nix flake for reproducible builds (#4213)
  Enhanced onboarding page visual design (#4156)
  feat: adds mtls to all providers (#2794) (#2799)
  Don't show a confirm dialog for quitting (#4225)
  Fix: Missing smart_approve in CLI /mode help text and error message (#4132)
  ...
michaelneale added a commit that referenced this pull request Aug 22, 2025
* main: (42 commits)
  feat: Add message queue system with interruption handling (#4179)
  Start extensions concurrently  (#4234)
  Add X-Title and referer headers on exchange to tetrate (#4250)
  docs: update View/Edit Recipe menu item name (#4267)
  Remove unused game (#4226)
  fix issue where app redirects to home after initialization but user has already started a chat (#4260)
  Feat: Let providers configure a fast model for summarization (#4228)
  docs: update tool selection strategy (#4258)
  feat: upgrade `@mcp-ui/client` package and improve UI message handling (#4164)
  stop replacing chat window when changing working directory (#4200)
  Only fetch session tokens when chat state is idle to avoid resetting during streaming (#4104)
  bump timeouts for e2e tests (#4251)
  docs: custom context files improvements (#4096)
  chore: upgrade rmcp to 0.6.0 (#4243)
  doc: uvx not npx (#4240)
  Add PKCE support for Tetrate Agent Router Service (#4165)
  Read AGENTS.md by default (#4232)
  docs: configure provider and model (#4235)
  docs: add figma tutorial (#4231)
  Add Nix flake for reproducible builds (#4213)
  ...
@alexhancock alexhancock mentioned this pull request Aug 22, 2025
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.

2 participants