Home Explore Blog Models CI



nix

1st chunk of `src/nix/formatter-build.md`
b7006215c7a48492607c13b7e8cb94ace863726b427b5e09000000010000023f
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
  ```
)""

Title: `nix formatter build` Command Description
Summary
The `nix formatter build` command builds the formatter defined in a Nix flake. Like `nix build`, it creates a symlink (defaulting to `./result`) to the formatter's store path upon successful completion, unless `--no-link` is specified. The name of this symlink can be customized using the `--out-link` option. The command consistently prints the build command to standard output.