diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index f7a0ba9e4ba9..ce7ac04dd9b1 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -2136,7 +2136,7 @@ The following rules are desired to be respected: * `pythonImportsCheck` is set. This is still a good smoke test even if `pytestCheckHook` is set. * `meta.platforms` takes the default value in many cases. It does not need to be set explicitly unless the package requires a specific platform. -* The file is formatted with `nixfmt-rfc-style`. +* The file is formatted correctly (e.g., `nix-shell --run treefmt`). * Commit names of Python libraries must reflect that they are Python libraries (e.g. `python3Packages.numpy: 1.11 -> 1.12` rather than `numpy: 1.11 -> 1.12`). See also [`pkgs/README.md`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#commit-conventions). diff --git a/pkgs/applications/editors/vscode/extensions/README.md b/pkgs/applications/editors/vscode/extensions/README.md index 9cbbd2b8f94d..2b36a38de2bb 100644 --- a/pkgs/applications/editors/vscode/extensions/README.md +++ b/pkgs/applications/editors/vscode/extensions/README.md @@ -7,7 +7,7 @@ * When adding a new extension, place its definition in a `default.nix` file in a directory with the extension's ID (e.g. `publisher.extension-name/default.nix`) and refer to it in `./default.nix`, e.g. `publisher.extension-name = callPackage ./publisher.extension-name { };`. -* Currently `nixfmt-rfc-style` formatter is being used to format the VSCode extensions. +* Use `nix-shell --run treefmt` to format the VSCode extensions. * Respect `alphabetical order` whenever adding extensions. If out of order, please kindly open a PR re-establishing the order. diff --git a/pkgs/by-name/ni/nixfmt-tree/package.nix b/pkgs/by-name/ni/nixfmt-tree/package.nix index d66d23ef3d2e..2d5c3a7f1422 100644 --- a/pkgs/by-name/ni/nixfmt-tree/package.nix +++ b/pkgs/by-name/ni/nixfmt-tree/package.nix @@ -95,7 +95,7 @@ treefmtWithConfig.overrideAttrs { You can achieve similar results by manually configuring `treefmt`: ```nix pkgs.treefmt.withConfig { - runtimeInputs = [ pkgs.nixfmt-rfc-style ]; + runtimeInputs = [ pkgs.nixfmt ]; settings = { # Log level for files treefmt won't format diff --git a/pkgs/development/lisp-modules/import/main.lisp b/pkgs/development/lisp-modules/import/main.lisp index 6671b8f22b4f..c131dc6efdb5 100644 --- a/pkgs/development/lisp-modules/import/main.lisp +++ b/pkgs/development/lisp-modules/import/main.lisp @@ -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 "~%") diff --git a/pkgs/development/lisp-modules/shell.nix b/pkgs/development/lisp-modules/shell.nix index 811e8d3c1d28..02f9f2360828 100644 --- a/pkgs/development/lisp-modules/shell.nix +++ b/pkgs/development/lisp-modules/shell.nix @@ -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 {