From bc0e51248fa2810a50264805bcfee8a726735732 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 18 Aug 2026 20:25:33 +0100 Subject: [PATCH] haskellPackages.nixfmt: drop Nixfmt is no longer released to Hackage; the package there is the unmaintained "Nixfmt Classic" which is being dropped in Nixpkgs 26.11. --- pkgs/development/haskell-modules/configuration-common.nix | 6 +++++- .../haskell-modules/configuration-hackage2nix/main.yaml | 6 ++++++ pkgs/development/haskell-modules/hackage-packages.nix | 1 + pkgs/top-level/aliases.nix | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index b6a4f399ac37..b7b7246d4fe5 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -720,8 +720,12 @@ with haskellLib; }) super.shell-conduit; # No maintenance planned until eventual removal + # Throw added 2026-08-19 # https://github.com/NixOS/nixfmt/issues/340#issuecomment-3315920564 - nixfmt = doJailbreak super.nixfmt; + nixfmt = + lib.throwIf pkgs.config.allowAliases + "haskell.packages.*.nixfmt has been removed as it is deprecated and unmaintained. Consider using top-level nixfmt instead." + (doJailbreak super.nixfmt); # Too strict upper bounds on turtle and text # https://github.com/awakesecurity/nix-deploy/issues/35 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index f40d8cc15fa2..4eaeabbce0da 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -856,6 +856,12 @@ dont-distribute-packages: # Depends on shine, which is a ghcjs project. - shine-varying + # these packages are deprecated or unmaintained upstream + # TODO: fully exclude. See: + # - https://github.com/NixOS/cabal2nix/pull/667 + # - https://github.com/NixOS/nixpkgs/pull/441204 + - nixfmt # 2026-08-18 maintained versions are not released on hackage + # these packages depend on software with an unfree license - accelerate-bignum - accelerate-blas diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 120c196d9c26..4b9b98f4df0a 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -496548,6 +496548,7 @@ self: { ]; description = "An opinionated formatter for Nix"; license = lib.licenses.mpl20; + hydraPlatforms = lib.platforms.none; mainProgram = "nixfmt"; } ) { }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 09db28ca2503..49af66ebfbd9 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1784,7 +1784,7 @@ mapAliases { nix-plugin-pijul = throw "nix-plugin-pijul has been removed due to being discontinued"; # Added 2025-05-18 nix_2_3 = throw "'nix_2_3' has been removed, because it was unmaintained and insecure."; # Converted to throw 2025-07-24 nixbang = throw "'nixbang' has been removed because it was unmaintained upstream. Use nix-shell shebang instead'"; # Added 2026-07-02 - nixfmt-classic = throw "nixfmt-classic has been removed as it is deprecated and unmaintained." haskellPackages.nixfmt.bin; # Converted to throw 2026-07-01 + nixfmt-classic = throw "nixfmt-classic has been removed as it is deprecated and unmaintained."; # Converted to throw 2026-07-01 nixfmt-rfc-style = warnAlias "nixfmt-rfc-style is now the same as pkgs.nixfmt which should be used instead." nixfmt; # Added 2025-07-14 nixForLinking = throw "nixForLinking has been removed, use `nixVersions.nixComponents_` instead"; # Added 2025-08-14 nixnote2 = throw "'nixnote2' has been removed as upstream has been unmaintained since 2017"; # Added 2026-04-26