doc: update references to nixfmt-rfc-style to treefmt

This completes https://github.com/NixOS/nixpkgs/issues/425583.

Rather than putting `nixfmt` everywhere, I opted to teach people to use
`treefmt` instead. This is more correct, as we have formatting rules for
non-nix files, and also may invoke `nixfmt` with non-default options.
This commit is contained in:
Jeremy Fleischman
2026-02-07 13:59:27 -08:00
parent 58b187378d
commit 2b115ef0cc
5 changed files with 9 additions and 7 deletions
@@ -49,7 +49,7 @@
(truename "imported.nix")))
(defun run-nix-formatter ()
(uiop:run-program '("nixfmt" "imported.nix")))
(uiop:run-program '("treefmt" "imported.nix")))
(defun main ()
(format t "~%")
+5 -3
View File
@@ -1,10 +1,12 @@
let
pkgs = import ../../../. { };
inherit (pkgs) mkShellNoCC sbcl nixfmt-rfc-style;
# Use CI-pinned (Hydra-cached) packages and formatter,
# rather than the local nixpkgs checkout.
inherit (import ../../../ci { }) pkgs fmt;
inherit (pkgs) mkShellNoCC sbcl;
in
mkShellNoCC {
packages = [
nixfmt-rfc-style
fmt.pkg
(sbcl.withPackages (
ps:
builtins.attrValues {