feat: add Nix flake for reproducible development environment#10811
feat: add Nix flake for reproducible development environment#10811randomizedcoder wants to merge 5 commits intoRooCodeInc:mainfrom
Conversation
Review completed. All previously identified issues have been addressed. No new issues found in recent changes.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
flake.nix
Outdated
| pkg-config | ||
| gnumake | ||
| turbo | ||
| chromium |
There was a problem hiding this comment.
Chromium is not available in nixpkgs for Darwin (macOS) platforms. Since the flake uses eachDefaultSystem which includes x86_64-darwin and aarch64-darwin, this will cause nix develop to fail on macOS systems with an error like "chromium is not available for the platform".
Consider making Chromium conditional on Linux, or use lib.optionals pkgs.stdenv.isLinux [ chromium ] here. The same issue applies to the chromiumPath variable and the test check's nativeBuildInputs.
Fix it with Roo Code or mention @roomote and request a fix.
|
@roomote revert the changes to readme and changelog |
Reverted changes to README.md and CHANGELOG.md as requested. All local checks passed. |
|
@hannesrudolph - I managed to fix the test errors I was getting, which required upgrading the turbo project. I think/hope this will improve the Roo code project overall |
|
@hannesrudolph Sorry, can you see why the Windows tests are failing? My guess would be something about turbo version update
|
|
Hey Dave, appreciate the effort here. After thinking it through we've decided not to move forward with the nix support. It's not something we need as a team, and we're already carrying a fair bit in the plugin that doesn't apply to the general user — we don't want to add more in that direction. Closing this one out, but genuinely appreciate the contribution. |

Related GitHub Issue
Closes: #10810
Roo Code Task Context (Optional)
This PR was developed with assistance from an AI coding assistant.
Description
This PR adds a Nix flake (
flake.nix) to provide a reproducible development environment for contributors.Demo video: https://youtu.be/izhaXYkqT_4
Key features:
nix develop): Provides Node.js 20.x, pnpm, ripgrep, Chromium, and all native build dependenciesnix build .#vsix): Reproducible extension packaging usingfetchPnpmDepsandpnpmConfigHooknix flake check): Lint, typecheck, test, and format checksnix run .#update-deps): Automates updatingflake.lockand pnpm dependency hashImplementation details:
lib.cleanSourceWithfor efficient source filteringmanage-package-manager-versionsto work in Nix's sandboxed buildsTest Procedure
Install Nix (if not already installed):
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemonClone the repo:
git clone https://github.com/randomizedcoder/Roo-Code.git cd Roo-Code git checkout nixBuild the VSIX package:
nix build .#vsix(If flakes aren't enabled:
nix --extra-experimental-features 'nix-command flakes' build .#vsix)Verify the output:
ls result/ # Should show: roo-cline-3.41.2.vsixInstall the extension:
code --install-extension result/*.vsixPre-Submission Checklist
Screenshots / Videos
Demo video: https://youtu.be/izhaXYkqT_4
Demonstrates:
nix developnix build .#vsixDocumentation Updates
README.mdwith "Nix Flake" sectionCHANGELOG.mdwith entry for this featureAdditional Notes
x86_64-linux,aarch64-linux,x86_64-darwin, andaarch64-darwinnix --extra-experimental-features 'nix-command flakes' <command>vscode-extensions.rooveterinaryinc.roo-clineGet in Touch
Reply to pull request
Important
Adds a Nix flake for a reproducible development environment, updating
README.mdandCHANGELOG.mdwith usage instructions.flake.nixfor reproducible development environment with Node.js, pnpm, and build tools.nix develop,nix build .#vsix, andnix flake checkfor development, building, and CI checks.nix run .#update-depsto update dependencies.README.mdwith instructions for using the Nix flake.CHANGELOG.mdfor the Nix flake feature.flake.nixandflake.lockfor Nix flake configuration.This description was created by
for c5fa177. You can customize this summary. It will automatically update as commits are pushed.
Start a new Roo Code Cloud session on this branch