Skip to content

[ENHANCEMENT] Add Nix support for reproducible builds and dev environment #10810

@randomizedcoder

Description

@randomizedcoder

Problem (one or two sentences)

Setting up a development environment for Roo Code requires manually installing the correct versions of Node.js, pnpm, and various native build dependencies (Python, pkg-config, OpenSSL, etc.). This leads to:

  • "Works on my machine" issues: Different contributors have different tool versions, causing inconsistent builds and hard-to-reproduce bugs

  • Onboarding friction: New contributors spend significant time setting up their environment before writing any code

  • CI/CD complexity: CI pipelines need to manually orchestrate tool installation

  • Native dependency headaches: @vscode/ripgrep and Puppeteer require system-level dependencies that vary by OS

Context (who is affected and when)

Who is affected:

  • New contributors setting up their development environment for the first time
  • Existing contributors switching machines or reinstalling their OS
  • Contributors on NixOS or using Nix as their package manager
  • CI/CD systems building and testing the project
  • Maintainers debugging issues that may be environment-specific

When it occurs:

  • During initial project setup when installing Node.js, pnpm, and native dependencies
  • When dependencies change (e.g., Node.js version bump, new native module added)
  • When troubleshooting build failures caused by mismatched tool versions
  • When onboarding team members or community contributors

Desired behavior (conceptual, not technical)

A contributor should be able to clone the repository and immediately have a fully working development environment with a single command, regardless of their operating system or what tools they have installed globally.
The environment should:

  • Provide all required tools at the correct versions
  • Handle platform-specific native dependencies automatically
  • Be identical for every contributor, eliminating "works on my machine" issues
  • Not require manual installation steps or reading lengthy setup documentation
  • Support building, testing, and packaging the extension without additional configuration

Constraints / preferences (optional)

  • Non-intrusive: Should not affect contributors who don't use Nix - existing workflow (pnpm install && pnpm build) must continue to work unchanged
  • Minimal footprint: Only add flake.nix and flake.lock to the repository; avoid Nix-specific configuration scattered across multiple files
  • Self-documenting: Include clear usage instructions in the flake header comment and README
  • Maintainable: Provide a simple way to update dependency hashes when pnpm-lock.yaml changes
  • Platform support: Should work on the same platforms the project already supports (Linux x86_64/aarch64, macOS Intel/Apple Silicon)
  • Aligned with nixpkgs: Follow patterns used by the existing vscode-extensions.rooveterinaryinc.roo-cline package in nixpkgs where applicable

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Roo Code Task Links (optional)

No response

Acceptance criteria (optional)

No response

Proposed approach (optional)

No response

Trade-offs / risks (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions