Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
evix
A library-first Rust crate using nix-bindings for the Nix C API to evaluate Nix expressions and stream derivation info as JSON lines. It ships with a small CLI, but the evaluation logic is exposed as a reusable library so other tools can drive it programmatically.
Why evix?
- Faster evaluation by using multiple worker processes
- Memory used for evaluation is reclaimed when workers restart, so the build can use it.
- Evaluation of jobs can fail individually
- It's really cool!
Usage
Exactly one input is required:
# Evaluate the hydraJobs attribute of the patchelf flake
}}
}}
}}
}}
}}
Options
| Flag | Description |
|---|---|
--flake REF |
Evaluate a flake output |
--expr EXPR |
Evaluate an inline Nix expression |
--file PATH |
Evaluate a Nix file |
--arg NAME EXPR |
Pass a Nix expression argument |
--argstr NAME VALUE |
Pass a string argument |
--workers N |
Worker processes (default: 1) |
--max-memory-size MB |
Memory limit per worker; restarts when exceeded (default: 4096) |
--force-recurse |
Recurse into all attrsets, ignoring recurseForDerivations |
--gc-roots-dir DIR |
Register GC root symlinks for evaluated derivations |
-v, --verbose |
Increase logging verbosity (info -> debug -> trace) |
Logging is powered by tracing. The default level is
info; use -v for debug and -vv for trace. The RUST_LOG environment
variable overrides --verbose if set. Logs are written to stderr so they do not
interfere with the JSON output on stdout.
Output
Each line is a JSON object. Derivation attributes emit:
Non-derivation attrsets emit child attribute names for further recursion:
Errors are non-fatal unless "fatal": true:
Architecture
The library splits work between a master and worker processes. The master
maintains a queue of attribute paths, dispatches them to workers over
stdin/stdout, and collects Event values. Workers are restarted
automatically when they exceed the configured memory limit.
The CLI is a thin wrapper around the library. When the library spawns a worker,
it re-executes the current binary with the EVIX_WORKER environment variable
set; the binary then calls the worker entrypoint.
Library usage
use ;
let config = Config ;
evaluate?;
Building
Requires Rust 1.90.0+. Supported on x86_64-linux and aarch64-linux.
License
EUPL-1.2