Outputs allow you to define Nix derivations using the module system, exposing Nix packages or sets of packages to be consumed by other tools for installation and distribution. devenv provides a unified interface for packaging applications across all supported languages, automatically using each language’s best packaging tools.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cachix/devenv/llms.txt
Use this file to discover all available pages before exploring further.
Language integration
Each language provides animport function that wraps the best packaging tool for that ecosystem. You reference it through config.languages.<lang>.import:
devenv.nix
import functions automatically pick the right build backend:
Rust
Uses crate2nix for optimal
Cargo.toml and Cargo.lock handling.Python
Uses uv2nix for modern Python packaging with
pyproject.toml support.Building outputs
To build all defined outputs, rundevenv build:
Defining outputs as custom module options
For more flexibility, you can define outputs using the module system’s options API. This integrates them with the rest of your configuration and allows other modules to reference them:devenv.nix
outputs attribute as well as any options typed with config.lib.types.outputOf.
If you don’t need to expose an option’s output type, use
config.lib.types.output instead of config.lib.types.outputOf lib.types.package.