Skip to content

nixfmt[-rfc-style]: unstable -> 1.0.0#425068

Merged
wolfgangwalther merged 4 commits intoNixOS:masterfrom
infinisil:nixfmt-stable
Jul 18, 2025
Merged

nixfmt[-rfc-style]: unstable -> 1.0.0#425068
wolfgangwalther merged 4 commits intoNixOS:masterfrom
infinisil:nixfmt-stable

Conversation

@infinisil
Copy link
Member

@infinisil infinisil commented Jul 14, 2025

Updates Nixfmt to the stable release, see NixOS/nixfmt#316 and NixOS/nixfmt#272.

Cc @GaetanLepage ;)

Also:

  • Updates the update script to use stable versions going forward
  • Make pkgs.nixfmt the -rfc-style version and remove the warning
  • Create a (delayed) warning for the -rfc-style version to encourage switching to pkgs.nixfmt in a couple releases

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

This work is funded by Antithesis and Tweag

Add a 👍 reaction to pull requests you find important.

@infinisil infinisil requested a review from a team July 14, 2025 11:41
This was referenced Jul 14, 2025
@acid-bong
Copy link
Contributor

yeah, i prefer yours 🌚

Also:
- Updates the update script to use stable versions going forward
- Make pkgs.nixfmt the -rfc-style version and remove the warning
- Create a (delayed) warning for the -rfc-style version to encourage
  switching to pkgs.nixfmt in a couple releases
- Add a release note for the above
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 12.approvals: 1 This PR was reviewed and approved by one person. 6.topic: haskell General-purpose, statically typed, purely functional programming language 8.has: changelog This PR adds or changes release notes 6.topic: emacs Text editor 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: TeX Issues regarding texlive and TeX in general 6.topic: dotnet Language: .NET 8.has: documentation This PR adds or changes documentation labels Jul 14, 2025
@emilazy
Copy link
Member

emilazy commented Jul 14, 2025

We’ll need to do a (backported) treewide, right? Otherwise all these update scripts will produce results that break CI.

@infinisil
Copy link
Member Author

Yeah, once we update the pinned CI tooling (once the result of this PR is built by Hydra), we'll need to reformat Nixpkgs again and backport that.

@panchoh

This comment has been minimized.

@MattSturgeon
Copy link
Contributor

MattSturgeon commented Jul 20, 2025

it directly affects how contributors to nixpkgs and the rest of the nix ecosystem will happen

Contributions to nixpkgs should be using treefmt from nixpkgs' dev shell, so in that regard it shouldn't matter what version of nixfmt is packaged in any particular channel.

I'm a bit worried about the effects of not having a formatter on stable that reflects the Nixpkgs formatting, not just for Nixpkgs but also for third-party projects with less elaborate pinning mechanisms in CI.

I agree, some consistency would be better.

I believe we usually backport updates to unstable software, so it makes sense to backport the update to nixfmt-rfc-style, so that the package is up to date.

But I'm still not convinced we should backport the rename. Switching which package the nixfmt attribute refers to feels like something that should only be done on unstable.

(I was mostly thinking about the rename in my last comment, not the package bump itself)

Rhys-T added a commit to Rhys-T/nur-packages that referenced this pull request Jul 20, 2025
@wolfgangwalther
Copy link
Contributor

wolfgangwalther commented Jul 20, 2025

I believe we usually backport updates to unstable software, so it makes sense to backport the update to nixfmt-rfc-style, so that the package is up to date.

But I'm still not convinced we should backport the rename. Switching which package the nixfmt attribute refers to feels like something that should only be done on unstable.

I'm mostly thinking about the package bump for the backport, so a selective backport of that would be fine by me.

Edit: Anyone on 25.05 using nixfmt-rfc-style has an expectation that the results of this match the results of the official formatter used in nixpkgs. Thus, we must update the package.

@wolfgangwalther
Copy link
Contributor

Backport of only the version bump in #427082.

drupol added a commit to drupol/nixpkgs that referenced this pull request Aug 2, 2025
fm7-1 pushed a commit to stackbuilders/nixpkgs that referenced this pull request Aug 4, 2025
panchoh added a commit to panchoh/Koch that referenced this pull request Aug 7, 2025
panchoh added a commit to panchoh/Koch that referenced this pull request Aug 10, 2025
panchoh added a commit to panchoh/Koch that referenced this pull request Aug 16, 2025
vlaci added a commit to onekey-sec/unblob that referenced this pull request Aug 29, 2025
vlaci added a commit to onekey-sec/unblob that referenced this pull request Aug 29, 2025
@MattSturgeon MattSturgeon mentioned this pull request Sep 16, 2025
14 tasks
@MattSturgeon MattSturgeon mentioned this pull request Jan 9, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: dotnet Language: .NET 6.topic: emacs Text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: TeX Issues regarding texlive and TeX in general 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.