From 25c708a963cff768d207dd4ad54358b78943e873 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Wed, 1 Oct 2025 10:19:14 -0700 Subject: [PATCH 1/2] nixfmt-classic: move to aliases.nix This is step 1 of https://github.com/NixOS/nixfmt/issues/340 --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1911c58b7e7c0..6916130d09cb6 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1857,6 +1857,7 @@ mapAliases { nix-simple-deploy = throw "'nix-simple-deploy' has been removed as it is broken and unmaintained"; # Added 2024-08-17 nix-universal-prefetch = throw "The nix-universal-prefetch package was dropped since it was unmaintained."; # Added 2024-06-21 nixFlakes = throw "'nixFlakes' has been renamed to/replaced by 'nixVersions.stable'"; # Converted to throw 2024-10-17 + nixfmt-classic = haskellPackages.nixfmt.bin; nixStable = nixVersions.stable; # Added 2022-01-24 nixUnstable = throw "nixUnstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest."; # Converted to throw 2024-04-22 nix_2_3 = throw "'nix_2_3' has been removed, because it was unmaintained and insecure."; # Converted to throw 2025-07-24 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e39009dfeb3a8..bd62aec71f9b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14840,8 +14840,6 @@ with pkgs; nix-visualize = python3.pkgs.callPackage ../tools/package-management/nix-visualize { }; - nixfmt-classic = haskellPackages.nixfmt.bin; - nixpkgs-manual = callPackage ../../doc/doc-support/package.nix { }; nixos-artwork = callPackage ../data/misc/nixos-artwork { }; From 93627b2595ca3f6a8b003d0344ef5c277251d98e Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Wed, 1 Oct 2025 10:32:56 -0700 Subject: [PATCH 2/2] nixfmt-classic: add (eventual) deprecation (and removal) for `nixfmt-classic` This is step 2 of https://github.com/NixOS/nixfmt/issues/340 --- pkgs/top-level/aliases.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6916130d09cb6..1e7c65304c240 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1857,7 +1857,16 @@ mapAliases { nix-simple-deploy = throw "'nix-simple-deploy' has been removed as it is broken and unmaintained"; # Added 2024-08-17 nix-universal-prefetch = throw "The nix-universal-prefetch package was dropped since it was unmaintained."; # Added 2024-06-21 nixFlakes = throw "'nixFlakes' has been renamed to/replaced by 'nixVersions.stable'"; # Converted to throw 2024-10-17 - nixfmt-classic = haskellPackages.nixfmt.bin; + 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; nixStable = nixVersions.stable; # Added 2022-01-24 nixUnstable = throw "nixUnstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest."; # Converted to throw 2024-04-22 nix_2_3 = throw "'nix_2_3' has been removed, because it was unmaintained and insecure."; # Converted to throw 2025-07-24