Skip to content

Drop nixfmt-classic from nixpkgs #340

@jfly

Description

@jfly

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:

  1. We add a deprecation warning to pkgs.nixfmt-classic now, with the expectation that 25.11 is released with the deprecation warning.
  2. Once 25.11 is cut off from master, we remove pkgs.nixfmt-classic, with the expectation that 26.05 is released with no pkgs.nixfmt-classic.

The plan

  • Do immediately: Move nixfmt-classic to 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.

    • TBD what (if anything) we do with haskellPackages.nixfmt.bin

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Blocked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions