|
1 | | -# `nixfmt` |
2 | | - |
3 | | -`nixfmt` is the official formatter for Nix language code, intended to easily apply a uniform style. |
4 | | - |
5 | 1 |  |
6 | 2 |
|
7 | | -## State |
8 | | - |
9 | | -`nixfmt` was originally developed by [Serokell](https://github.com/serokell). |
10 | | -It was used as the basis for the official standardised Nix formatter, as established by [RFC 166](https://github.com/NixOS/rfcs/pull/166). |
11 | | - |
12 | | -The official standard differs considerably from the original implementation. |
13 | | -Be aware of this if you track the [`master`](https://github.com/NixOS/nixfmt/tree/master) branch. |
14 | | -Until the [next release](https://github.com/NixOS/nixfmt/issues/272), expect `nixfmt` to change. |
| 3 | +# Nixfmt |
15 | 4 |
|
16 | | -A recent version of `nixfmt` is available as `pkgs.nixfmt-rfc-style` in Nixpkgs. |
17 | | -The original `nixfmt` is still available as `pkgs.nixfmt-classic`, but it is unmaintained and will eventually be removed. |
18 | | - |
19 | | -For more details, see the [RFC implementation tracking issue](https://github.com/NixOS/nixfmt/issues/153). |
| 5 | +Nixfmt is the official formatter for Nix language code. |
| 6 | +It is maintained by the [Nix formatting team](https://nixos.org/community/teams/formatting/). |
| 7 | +This document is the user documentation, see [CONTRIBUTING.md](./CONTRIBUTING.md) for contributor documentation. |
20 | 8 |
|
21 | 9 | ## Installation |
22 | 10 |
|
@@ -229,9 +217,6 @@ includes = ["*.nix"] |
229 | 217 |
|
230 | 218 | 6. Try to commit a badly formatted Nix file in order to make sure that everything works. |
231 | 219 |
|
232 | | -> [!WARNING] |
233 | | -> `nixfmt`’s integration with the `pre-commit` tool is relatively new. At the moment, none of the stable releases of `nixfmt` can be used with the `pre-commit` tool. You’ll have to use an unstable version for the time being. |
234 | | - |
235 | 220 | #### `git mergetool` |
236 | 221 |
|
237 | 222 | `nixfmt` provides a mode usable by [`git mergetool`](https://git-scm.com/docs/git-mergetool) |
@@ -304,34 +289,11 @@ to return back to the unmerged state. |
304 | 289 | } |
305 | 290 | ``` |
306 | 291 |
|
307 | | -## Development |
308 | | - |
309 | | -### With Nix |
310 | | - |
311 | | -Haskell dependencies will be built by Nix. |
312 | | - |
313 | | -* Enter `nix-shell` |
314 | | -* Build with `cabal new-build` |
315 | | - |
316 | | -### Without Nix |
317 | | - |
318 | | -Haskell dependencies will be built by Cabal. |
319 | | - |
320 | | -* Build with `cabal new-build` |
321 | | - |
322 | | - |
323 | 292 | ## Usage |
324 | 293 |
|
325 | 294 | * `nixfmt < input.nix` – reads Nix code from `stdin`, formats it, and outputs to `stdout` |
326 | 295 | * `nixfmt file.nix` – format the file in place |
327 | 296 |
|
328 | | -## About Serokell |
329 | | - |
330 | | -`nixfmt` is maintained and funded with :heart: by |
331 | | -[Serokell](https://serokell.io/). The names and logo for Serokell are trademark |
332 | | -of Serokell OÜ. |
| 297 | +## Acknowledgements |
333 | 298 |
|
334 | | -We love open source software! See |
335 | | -[our other projects](https://serokell.io/community?utm_source=github) or |
336 | | -[hire us](https://serokell.io/hire-us?utm_source=github) to design, develop and |
337 | | -grow your idea! |
| 299 | +`nixfmt` was originally developed by [Serokell](https://github.com/serokell) and later donated to become an official Nix project with the acceptance of [RFC 166](https://github.com/NixOS/rfcs/pull/166). |
0 commit comments