Home Explore Blog CI



nix

src/nix/formatter-build.md
96dce1cb1d207ed0f7933c5f699e55555268b9cc94ad0054000000030000023f
R""(

# Description

`nix formatter build` builds the formatter specified in the flake.

Similar to [`nix build`](@docroot@/command-ref/new-cli/nix3-build.md),
unless `--no-link` is specified, after a successful
build, it creates a symlink to the store path of the formatter. This symlink is
named `./result` by default; this can be overridden using the
`--out-link` option.

It always prints the command to standard output.

# Examples

* Build the formatter:

  ```console
  # nix formatter build
  /nix/store/cb9w44vkhk2x4adfxwgdkkf5gjmm856j-treefmt/bin/treefmt
  ```
)""

Chunks
ee800b14 (1st chunk of `src/nix/formatter-build.md`)
Title: nix formatter build
Summary
The `nix formatter build` command builds the formatter specified in the flake, creating a symlink to the store path (./result by default) unless `--no-link` is specified. It prints the command to standard output.