1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00
nix/doc/manual/rl-next/nix-formatter.md
2025-05-14 17:41:50 -04:00

16 lines
565 B
Markdown

---
synopsis: "Add `nix formatter build` and `nix formatter run` commands"
issues:
prs: [13063]
---
`nix formatter run` is an alias for `nix fmt`. Nothing new there.
`nix formatter build` is sort of like `nix build`: it builds, links, and prints a path to the formatter program:
```
$ nix formatter build
/nix/store/cb9w44vkhk2x4adfxwgdkkf5gjmm856j-treefmt/bin/treefmt
```
Note that unlike `nix build`, this prints the full path to the program, not just the store path (in the example above that would be `/nix/store/cb9w44vkhk2x4adfxwgdkkf5gjmm856j-treefmt`).