Add Nix flake for reproducible builds, dev shell and checks - #298
Add Nix flake for reproducible builds, dev shell and checks#298chrstnwhlrt wants to merge 2 commits into
Conversation
Provides: - `nix build` builds glues, glues-tui and glues-server with the workspace's pinned Rust 1.93 toolchain - `nix develop` dev shell with toolchain, rust-analyzer, cargo-llvm-cov (for the AGENTS.md coverage workflow), cargo-deny, cargo-audit and the usual cargo tooling - `nix flake check` workspace build + strict clippy + nextest - `nix fmt` formats Nix files - `overlays.default` for downstream consumers Stack: flake-parts, crane, rust-overlay, treefmt-nix.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 31 minutes and 16 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughA new Nix flake configuration is introduced for the Rust "glues" workspace, defining inputs, build process via crane with Rust toolchain pinning, development shell, package exports, and checks including clippy and nextest, plus treefmt integration for Nix code formatting. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@flake.nix`:
- Around line 17-19: The guidance to run `taplo fmt` from `nix develop` is
invalid because `pkgs.taplo` is not present in devShells.default.packages;
either add pkgs.taplo to the dev shell package list (update
devShells.default.packages to include pkgs.taplo) so `taplo` is available, or
remove/adjust the README/flake comments that instruct contributors to run `taplo
fmt` from the dev shell; look for the devShells.default.packages block and the
text mentioning `taplo fmt` and make them consistent.
- Around line 49-52: The dev-shell is missing rust-src and taplo: ensure
rust-src is available to match RUST_SRC_PATH by either adding "rust-src" to the
rust-toolchain.toml referenced by rustToolchain (so rustToolchain includes
rust-src) or explicitly adding rust-src to the dev shell toolchain provisioning,
and add "taplo" to the dev-shell packages list so the documented taplo fmt
command works; update references to rustToolchain, RUST_SRC_PATH, and the
dev-shell packages (where taplo should be appended) accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1860f426-d769-4eaa-ad70-a980580a171c
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
flake.nix
- Split glues-server into its own package so the default install ships only the client binaries - Add taplo to the dev shell to match the taplo fmt reference - Add rust-src to the toolchain override so RUST_SRC_PATH resolves for rust-analyzer
Provides:
nix buildbuilds glues, glues-tui and glues-server with theworkspace's pinned Rust 1.93 toolchain
nix developdev shell with toolchain, rust-analyzer,cargo-llvm-cov (for the AGENTS.md coverage workflow), cargo-deny,
cargo-audit and the usual cargo tooling
nix flake checkworkspace build + strict clippy + nextestnix fmtformats Nix filesoverlays.defaultfor downstream consumersStack: flake-parts, crane, rust-overlay, treefmt-nix.
Summary by CodeRabbit