nix3-build
builds derivations from flakes
TLDR
SYNOPSIS
nix build [options] [installable...]
DESCRIPTION
nix build (invoked as nix3-build in this manual namespace to distinguish it from the legacy nix-build) builds the specified installables, which may be flake references, attribute paths, or store paths. On success it creates a symlink named result (or result-N for additional outputs) pointing to the build output in the Nix store.When multiple installables are given, each is built in parallel subject to the configured build concurrency.
PARAMETERS
INSTALLABLE
Flake reference, attribute path, or store path to build (e.g. .#default, nixpkgs#hello).--no-link
Do not create a result symlink.-o PATH, --out-link PATH
Use PATH as the prefix for the result symlink (default: result).--rebuild
Rebuild an already-built derivation and compare outputs.--print-out-paths
Print the resulting store paths to stdout.-L, --print-build-logs
Show full build logs on standard error.--json
Print build results as JSON.--dry-run
Show what would be built or fetched without actually doing it.--impure
Allow evaluation of impure expressions (e.g. references to environment variables).--refresh
Consider all previously downloaded files as stale.--help
Display help information.
CAVEATS
Part of the new nix CLI; requires the nix-command and flakes experimental features to be enabled (via nix.conf or --extra-experimental-features). Behavior may change between Nix releases.
HISTORY
nix3 refers to the Nix 3.x CLI, with build being the primary compilation command.
SEE ALSO
nix(1), nix-build(1), nix3-develop(1)
