From e7221c7ce4d2fe50038713cccae972abc5f4afd3 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Wed, 13 Aug 2025 09:56:13 -0700 Subject: [PATCH 1/2] Revert "treewide: drop usage of nixfmt-rfc-style alias" This reverts commit c19b2c3c49ef67868f583c9fd12d43cdabb47c37. As per the discussion [here](https://github.com/NixOS/nixpkgs/pull/433100#issuecomment-3184482777), it's too early to drop usage of the alias in documentation. Removing the references is tracked by , which a member of the Nix Formatting team will do when the time is right. --- doc/languages-frameworks/python.section.md | 2 +- pkgs/applications/editors/vscode/extensions/README.md | 2 +- pkgs/by-name/gr/gren/update.sh | 2 +- pkgs/by-name/ni/nixfmt-tree/package.nix | 2 +- pkgs/os-specific/linux/kernel/update-xanmod.sh | 2 +- pkgs/servers/x11/xorg/update.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index d4b3b0d669289..e79a324b236c2 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -2121,7 +2121,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`. +* The file is formatted with `nixfmt-rfc-style`. * Commit names of Python libraries must reflect that they are Python libraries (e.g. `python313Packages.numpy: 1.11 -> 1.12` rather than `numpy: 1.11 -> 1.12`). * The current default version of python should be included diff --git a/pkgs/applications/editors/vscode/extensions/README.md b/pkgs/applications/editors/vscode/extensions/README.md index 59c45f1b26881..3977dc5a3e134 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` formatter is being used to format the VSCode extensions. +* Currently `nixfmt-rfc-style` formatter is being used to format the VSCode extensions. * Respect `alphabetical order` whenever adding extensions. On disorder, please, kindly open a PR re-establishing the order. diff --git a/pkgs/by-name/gr/gren/update.sh b/pkgs/by-name/gr/gren/update.sh index 9ebc456179cc3..5c79129f40587 100755 --- a/pkgs/by-name/gr/gren/update.sh +++ b/pkgs/by-name/gr/gren/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p cabal2nix curl jq nix-update nixfmt +#!nix-shell -i bash -p cabal2nix curl jq nix-update nixfmt-rfc-style set -euo pipefail diff --git a/pkgs/by-name/ni/nixfmt-tree/package.nix b/pkgs/by-name/ni/nixfmt-tree/package.nix index 2d5c3a7f14221..d66d23ef3d2e1 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 ]; + runtimeInputs = [ pkgs.nixfmt-rfc-style ]; settings = { # Log level for files treefmt won't format diff --git a/pkgs/os-specific/linux/kernel/update-xanmod.sh b/pkgs/os-specific/linux/kernel/update-xanmod.sh index 2e1d9724db2d1..fd786872fd3cd 100755 --- a/pkgs/os-specific/linux/kernel/update-xanmod.sh +++ b/pkgs/os-specific/linux/kernel/update-xanmod.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p bash nix-prefetch curl jq gawk gnused nixfmt +#!nix-shell -i bash -p bash nix-prefetch curl jq gawk gnused nixfmt-rfc-style set -euo pipefail diff --git a/pkgs/servers/x11/xorg/update.py b/pkgs/servers/x11/xorg/update.py index 65a2fe190a17c..a493f3821e5fe 100755 --- a/pkgs/servers/x11/xorg/update.py +++ b/pkgs/servers/x11/xorg/update.py @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])" +#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt-rfc-style "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])" # Usage: Run ./update.py from the directory containing tarballs.list. The script checks for the # latest versions of all packages, updates the expressions if any update is found, and commits From ae06776b858d4e4811a781b7918ef195efed36a5 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Wed, 13 Aug 2025 10:56:45 -0700 Subject: [PATCH 2/2] treewide: drop usage of `nixfmt-rfc-style` alias in update scripts --- pkgs/by-name/gr/gren/update.sh | 2 +- pkgs/os-specific/linux/kernel/update-xanmod.sh | 2 +- pkgs/servers/x11/xorg/update.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gr/gren/update.sh b/pkgs/by-name/gr/gren/update.sh index 5c79129f40587..9ebc456179cc3 100755 --- a/pkgs/by-name/gr/gren/update.sh +++ b/pkgs/by-name/gr/gren/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p cabal2nix curl jq nix-update nixfmt-rfc-style +#!nix-shell -i bash -p cabal2nix curl jq nix-update nixfmt set -euo pipefail diff --git a/pkgs/os-specific/linux/kernel/update-xanmod.sh b/pkgs/os-specific/linux/kernel/update-xanmod.sh index fd786872fd3cd..2e1d9724db2d1 100755 --- a/pkgs/os-specific/linux/kernel/update-xanmod.sh +++ b/pkgs/os-specific/linux/kernel/update-xanmod.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p bash nix-prefetch curl jq gawk gnused nixfmt-rfc-style +#!nix-shell -i bash -p bash nix-prefetch curl jq gawk gnused nixfmt set -euo pipefail diff --git a/pkgs/servers/x11/xorg/update.py b/pkgs/servers/x11/xorg/update.py index a493f3821e5fe..65a2fe190a17c 100755 --- a/pkgs/servers/x11/xorg/update.py +++ b/pkgs/servers/x11/xorg/update.py @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt-rfc-style "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])" +#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])" # Usage: Run ./update.py from the directory containing tarballs.list. The script checks for the # latest versions of all packages, updates the expressions if any update is found, and commits