-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add Nix flake for declarative builds and development #413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds Nix support: a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
flake.nix (1)
17-66: Well-structured derivation using modern patterns.The use of
finalAttrspattern, reading version frompackage.json, and thepnpmConfigHookintegration are all idiomatic. A few observations:
Hardcoded hash (line 32): The
pnpmDepshash will need updating wheneverpnpm-lock.yamlchanges. Consider documenting this in a comment or the README.Empty maintainers list (line 62): Consider adding maintainer(s) for better discoverability if this gets upstreamed.
🔎 Optional: Add a comment about hash updates
pnpmDeps = pkgs.fetchPnpmDeps { inherit (finalAttrs) pname version src; + # Update this hash when pnpm-lock.yaml changes: + # nix build 2>&1 | grep 'got:' | awk '{print $2}' hash = "sha256-vAlqVFaBN7KMlyP4HKbsMkaYrA5Yf2l5a+PLCZ6KOzs="; fetcherVersion = 3; };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
.gitignoreREADME.mdflake.nix
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Check `openspec/project.md` for project conventions before creating specs
Applied to files:
README.md
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Use `openspec archive <change-id> --skip-specs --yes` for tooling-only changes
Applied to files:
README.md
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Search existing work using `openspec spec list --long`, `openspec list` for enumerating changes; use `rg` only for full-text search
Applied to files:
README.md
🔇 Additional comments (5)
.gitignore (1)
151-154: LGTM!The Nix-related ignore entries are appropriate:
resultis the default symlink fromnix build, and.direnv/caches thenix developenvironment when using direnv integration. The section header follows the existing file conventions.README.md (2)
147-160: LGTM!The collapsible Nix installation section is well-placed after the standard installation verification step. The commands are correct for flake-based usage, and using
<details>keeps the primary installation path uncluttered for most users.
394-395: LGTM!Clear and concise guidance for contributors using Nix.
flake.nix (2)
68-77: LGTM!The development shell and app definitions are clean and functional. The dev shell correctly provides
nodejsandpnpmmatching the build environment.
4-7: nixos-25.11 is a valid, released channel.The flake correctly pins to
nixos-25.11, which was released on November 30, 2025. This is the current stable release and an appropriate target for the project.
Summary
nix run github:Fission-AI/OpenSpecandnix developfor reproducible builds and development environmentsChanges
flake.nix: Declarative package definition with:
packages.default- Builds OpenSpec using pnpmdevShells.default- Dev environment with Node.js 22 + pnpmapps.default- Enablesnix runfinalAttrspattern and reads version frompackage.jsonflake.lock: Pinned dependencies (nixos-25.11, flake-utils)
README.md: Added Nix installation section and contributing note
.gitignore: Added
resultand.direnv/entriesTesting
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.