Repository navigation
Description
When doing the stable release, we announced that "The classic nixfmt will stay available for some more time as pkgs.nixfmt-classic" (https://github.com/NixOS/nixpkgs/blob/b3bc1e31d0fc920cc11a79ed4f4bd202961addfb/doc/release-notes/rl-2511.section.md#highlights-sec-nixpkgs-release-2511-highlights).
We should decide exactly how long that is. It seems reasonable to me to wait until the next release (26.05). Concretely, I propose that:
- We add a deprecation warning to
pkgs.nixfmt-classicnow, with the expectation that 25.11 is released with the deprecation warning. - Once 25.11 is cut off from master, we remove
pkgs.nixfmt-classic, with the expectation that 26.05 is released with nopkgs.nixfmt-classic.
The plan
-
Do immediately: Move
nixfmt-classicto aliases.nix. (It's currently in all-packages). -
Do immediately: Add a deprecation warning like this:
nixfmt-classic = ( if lib.oldestSupportedReleaseIsAtLeast 2605 then throw "nixfmt-classic has been removed as it is deprecated and unmaintained." else if lib.oldestSupportedReleaseIsAtLeast 2511 then lib.warnOnInstantiate "nixfmt-classic is deprecated and unmaintained. We recommend switching to nixfmt." else lib.id ) haskellPackages.nixfmt.bin;
-
Once 25.11 is the oldest supported version in master: list the deprecation in nixpkgs' release notes.
-
Once 26.05 is the oldest supported version in master: list the removal in nixpkgs' release notes.
-
Once 26.05 is the oldest supported version in master: simplify the above to just the
throw. -
Drop
haskellPackages.nixfmt.bin? (i.e., the deprecated package)- We can't fully remove it due to limitations in the hackage→nix pipeline.
- But we can shadow it with a
throwwhenallowAliasesis true.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
sternenseemann commentedon Sep 21, 2025
Please make sure to keep nixfmt building until then. Currently nixfmt-0.6.0 has too strict bounds to work with Stackage LTS 24 without further workarounds:
This could be fixed by a simple Hackage revision (in this case) to
jfly commentedon Sep 21, 2025
@sternenseemann, thanks for the heads up.
We have had some turnover in the team (I don't even know how to do a release to Hackage, because we thought we'd never have to). I know very little about the nixpkgs Haskell package set. Can we relax those constraints with a patch over in nixpkgs (knowing this will go away soon)? Or would it be simplest to get the change on Hackage?
sternenseemann commentedon Sep 21, 2025
We are currently working around this in Nixpkgs, but that is some extra code we need to keep track of. Also it does not help for anyone using
cabal-installor whatever to install directly from Hackage.Making a new release is not necessary, a Hackage revision can simply be made in the Hackage web interface. @infinisil of the current team (?) has access.
infinisil commentedon Sep 21, 2025
Then I think that's the signal that it should be deprecated it Nixpkgs, instead of spending any more effort on it. It's already deprecated on Hackage as of recently: #161.
sternenseemann commentedon Sep 22, 2025
Nevermind, I'll just note you won't fix this.
nixos-discourse commentedon Sep 30, 2025
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/formatting-team-meeting-2025-09-30/70099/1
nixfmt-classic: move to aliases.nix
nixfmt-classic: add (eventual) deprecation (and removal) for `nixfmt-…
Nixfmt deprecations and make default nixfmt. (#454)
MattSturgeon commentedon Aug 18, 2026
Since NixOS/nixpkgs#537394 bumped the "oldest supported release" to 26.05,
nixfmt-classichas become a throw (previously it was a warning).We've opened NixOS/nixpkgs#554007 which should mean the
nixfmt-classicandnixfmt-rfc-stylealiases get automatically cleaned up with other aliases. Therefore, this is now done. 🎉nixos-discourse commentedon Aug 18, 2026
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/formatting-team-meeting-2026-08-18/79653/1
MattSturgeon commentedon Aug 18, 2026
Actually there are some unresolved TODO items in the issue description; I'll re-open for now.
MattSturgeon commentedon Aug 19, 2026
The last remaining item is now the release notes.
However, I'm not convinced we need to add a release note entry for removing already deprecated attributes. IIUC, release notes should focus on more significant change.
If someone feels we should add release notes, please reference this issue in the PR. Otherwise, I think this issue is now complete.
jfly commentedon Aug 20, 2026
I'm fine closing this out.
mdaniels5757 commentedon Aug 20, 2026
FYI, I recently documented this: NixOS/nixpkgs@77b21fa