generators/json
Generate a newline-delimited JSON report from result check outputs.
Prefer mkReport,
which accepts checks in their natural shape;
this generator takes the normalized form it produces.
Each line of the output is a JSON object with the following fields:
name: the attribute name of the checksuite: suite name, ornullfor flat checkskind: the check type ("result","snapshot", or"eval")status:"pass","fail", or"skip"exitCode: the raw exit code stringstdout: captured stdoutstderr: captured stderrdrvPath: path to the check derivation in the Nix storechildren: nested entries of the same shape, frompassthru.childrenon the check derivation (a list of{ name; check; }) — empty unless the check exposes any (snapshot checks expose their wrapped check as"actual")
kind reflects passthru.kind on the result check derivation.
status is "skip" when passthru.skip is set (by mkSkip); a
skipped check’s command output is never referenced, so it never
builds, and exitCode/stdout/stderr are all empty strings.
drvPath is still the real .drv path: computing it only requires
instantiation, not a build.
Type
json :: AttrSet -> Derivation
Arguments
- checks
- Attribute set of
{ check, suite }pairs, keyed by entry key.
Example
pkgs.resultChecks.json.override { inherit checks; }