LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nix-build.2

builds Nix derivations

TLDR

Build default.nix
$ nix-build
copy
Build specific attribute
$ nix-build -A [package]
copy
Build from nixpkgs
$ nix-build '<nixpkgs>' -A [hello]
copy
Build without result link
$ nix-build --no-out-link
copy

SYNOPSIS

nix-build [options] [path]

DESCRIPTION

nix-build builds Nix derivations. This is an alternate documentation version.The tool evaluates Nix expressions. Produces store paths and result links.

PARAMETERS

PATH

Nix expression path.
-A ATTR
Attribute to build.
--no-out-link
Skip result symlink.
--help
Display help information.

CAVEATS

Part of Nix toolset. Legacy interface. Use nix build for flakes.

HISTORY

nix-build is a core Nix command for building derivations from expressions.

SEE ALSO

nix-build(1), nix(1), nix-shell(1)

Copied to clipboard
Kai