Install
Install with PiG
pig install npm:pi-nix-buildInstall with Pi
pi install npm:pi-nix-buildPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./dist/index.mjs"
]
}README
Written by the package's publisher, shown as published in version 0.2.1 (README.md). PiG does not review it.
pi-nix-build
English | 简体中文
A pi extension for Nix builds and evaluation with live progress, failure diagnostics, and background job monitoring.
Showcase
Live Progress Widget
Displays evaluation progress, dependency tree, stdenv phases, remote builder hosts, duration estimates, active transfers, and Ctrl+Shift+B compact collapse above the editor.

Fullscreen Detail View (Ctrl+Shift+M)
Inspects every derivation in the dependency forest alongside its build log, with auto-follow pause/resume (↓ N newer lines) and keyboard or mouse navigation.

Failure Diagnostics & Hash Mismatch
Surfaces failed derivations, trailing log lines, dependency blocks (⊘), and fixed-output hash mismatches (specified vs got).

Features
- Live build progress: Displays evaluation status, dependency trees, build phases, remote builders, and estimated build times above the editor.
- Fullscreen detail view: Inspects all derivations and their captured logs during or after a build.
- Flake and non-flake support: Supports
nix build(flake installables),nix-build(files, expressions, and attribute paths), andnix flake check(nix_check). - Nix evaluation:
nix_evalreturns values fromnix evalornix-instantiate --eval, as JSON by default, with Nix's error trace on failure and live progress when evaluation fetches sources or builds derivations. - Failure diagnostics: Reports failed derivations with the error part of their logs, fixed-output hash mismatches, and evaluation errors. Notes when a failure repeats an earlier one unchanged.
- Build logs:
nix_logreads or searches the log of any derivation built in the session, or of a store path throughnix log. - Background builds and watches: Runs long builds and flake checks in the background with event notifications, and registers jobs in
/pswhenpi-processesis loaded. - Command redirection: Intercepts
nix build,nix-build, andnix flake checkinvocations in shell and process tools, routing them throughnix_buildornix_check.
Requirements
- pi
- Node.js
>= 22.19.0 nix/nix-build/nix-instantiateonPATH- A Nerd Font in the terminal for the icons, or
PI_NIX_BUILD_NERD_FONT=0for plain Unicode symbols
Installation
Using pi
# Install from npm
pi install npm:pi-nix-build
# Or install from GitHub
pi install git:github.com/Moraxyc/pi-nix-build
# Try for a single session without installing
pi -e npm:pi-nix-build
Using Nix
nix build github:Moraxyc/pi-nix-build
Load ./result/lib/node_modules/pi-nix-build with pi -e, or add it to pi's packages configuration.
From source
npm ci
npm run build
pi install .
Usage
After installation, ask pi to build or evaluate as usual:
- "Build the default package in this flake"
- "Run
nix flake checkwith--keep-going" - "Build attribute
hellofromdefault.nix" - "Run this build in the background and notify me if any derivation fails"
- "Which version of
hellodoes nixpkgs have?" - "List the attribute names of
.#packages.x86_64-linux"
Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Shift+B | Collapse or expand the live progress widget; with several builds, expand each in turn |
Ctrl+Shift+M | Open the fullscreen detail view for the expanded or latest build |