1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

doc/rl-next: nix-formatter

This commit is contained in:
John Ericson 2025-05-14 17:41:50 -04:00
parent c3684efa95
commit 44ca04b944

View file

@ -0,0 +1,16 @@
---
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`).