Skip to content

devenv 1.7: CUDA Support, Enhanced Tasks, and MCP support

devenv 1.7 brings several practical improvements:

We’ve started work on supporting multiple Nix implementations in devenv. The codebase now includes a backend abstraction layer that will allow users to choose between different Nix implementations.

This architectural change paves the way for integrating Snix (our development fork). While the Snix backend isn’t functional yet, the groundwork is in place for building out this Rust-based reimplementation to the C++ Nix implementation. See PR #1950 for implementation details.

Here’s how to enable CUDA support only on Linux systems while keeping your environment working smoothly on macOS:

  • CUDA-enabled packages are built with GPU support on Linux
  • macOS developers can still work on the same project without CUDA
  • The correct CUDA capabilities are set for your target GPUs
devenv.yaml
nixpkgs:
config:
allowUnfree: true
x86_64-linux:
cudaSupport: true
cudaCapabilities: ["7.5", "8.6", "8.9"]

Tasks now skip execution when their input files haven’t changed, using the new execIfModified option:

{
tasks = {
"frontend:build" = {
exec = "npm run build";
execIfModified = [ "src/**/*.tsx" "src/**/*.css" "package.json" ];
};
"backend:compile" = {
exec = "cargo build --release";
execIfModified = [ "src/**/*.rs" "Cargo.toml" "Cargo.lock" ];
};
};
}

This dramatically speeds up incremental builds by skipping unnecessary work.

Run all tasks within a namespace using prefix matching:

Terminal window
# Run all frontend tasks
$ devenv tasks run frontend

devenv now includes a built-in MCP server that enables AI assistants like Claude to better understand and generate devenv configurations:

Terminal window
# Start the MCP server
$ devenv mcp

AI assistants can now:

  • Search for packages and their options
  • Understand devenv’s configuration format
  • Generate valid configurations based on your requirements
  • Shell Integration: Your shell aliases and functions now work correctly
  • Clean Mode: Fixed shell corruption when using --clean
  • Error Messages: More helpful error messages when commands fail
  • State Handling: Automatically recovers from corrupted cache files
  • Direnv Integration: Fewer unnecessary environment reloads

Standardized Language Tooling Configuration

Section titled “Standardized Language Tooling Configuration”

All language modules will support the same configuration pattern (PR #1974):

{
languages.rust.dev = {
lsp.enable = false;
debugger.enable = false;
linter.enable = false;
formatter.enable = false;
};
}

Import Rust projects and their dependencies as Nix packages with the new languages.rust.import configuration (PR #1946):

{
languages.rust.enable = true;
languages.rust.import = {
mypackage = {
root = ./.;
};
};
packages = languages.rust.import.mypackage.packages;
}

That allows us to bridge the gap between developer environments and fully packaged Rust applications using Nix.

Operations that can run in parallel will (PR #1970).

Join our Discord community to share your experiences and help shape devenv’s future.

We’re particularly interested in feedback on the standardized language tooling configuration coming in 1.8 - let us know if this approach works for your use cases!

Domen