Getting Started¶
This guide walks you through using Junix to turn Nix build logs into JUnit XML reports for your CI pipeline.
What You Need¶
- Python 3.10+
- Nix with flakes enabled
- A flake with packages or checks to build
Installation¶
Install Junix with your preferred method:
# With pipx
pipx install junix
# With uv
uv tool install junix
# With Nix
nix profile install gitlab:moduon/junix
Verify it works:
Your First Report¶
Translate an existing build¶
If you already have Nix build output, pipe it through Junix:
nix build --log-format internal-json -v --print-build-logs --no-link .#hello 2>&1 | junix translate -o nix-report.xml
This produces a nix-report.xml file you can upload to your CI system.
Build and report in one step¶
Let Junix drive the build:
Check all flake checks¶
For flakes with checks outputs:
Viewing the Report¶
In GitLab CI¶
Add the report as a test artifact:
GitLab will display build results in the merge request UI.
In Jenkins¶
Use the JUnit plugin to publish report.xml.
Locally¶
Open the XML in any JUnit viewer, or use xmllint to validate:
Next Steps¶
- Read the CLI Reference for all available commands and options
- Check the Usage Guide for detailed examples
- See the Contributing Guide to help improve Junix