From e28db541d494c968731dfc312e3f1e1d97c598b8 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 12 Sep 2025 13:33:36 +0200 Subject: [PATCH 1/3] haskell.compiler.ghc9102: drop Latest 9.10.x minor release is 9.10.3, which is also in Stackage 24.12+. Thus, dropping according to the GHC Deprecation Policy. --- pkgs/development/compilers/ghc/9.10.2.nix | 4 ---- .../compilers/ghc/common-hadrian.nix | 2 +- pkgs/top-level/haskell-packages.nix | 22 ------------------- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 pkgs/development/compilers/ghc/9.10.2.nix diff --git a/pkgs/development/compilers/ghc/9.10.2.nix b/pkgs/development/compilers/ghc/9.10.2.nix deleted file mode 100644 index 96e251654429c..0000000000000 --- a/pkgs/development/compilers/ghc/9.10.2.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common-hadrian.nix { - version = "9.10.2"; - sha256 = "55fd40a005575ac6b33ea928beda81e8c56ffea354b6ac474ee9f9911f23a8de"; -} diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 8f2541bea0099..482c2a630c4ef 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -304,7 +304,7 @@ ] # Unreleased or still in-progress upstream cross fixes - ++ lib.optionals (lib.versionAtLeast version "9.10.2" && lib.versionOlder version "9.15") [ + ++ lib.optionals (lib.versionAtLeast version "9.10" && lib.versionOlder version "9.15") [ # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13919 (fetchpatch { name = "include-modern-utimbuf.patch"; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index a5adeb6cab599..ad82a4609e4f0 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -144,23 +144,6 @@ in inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; inherit buildTargetLlvmPackages llvmPackages; }; - ghc9102 = callPackage ../development/compilers/ghc/9.10.2.nix { - bootPkgs = - if - stdenv.buildPlatform.isPower64 - && stdenv.buildPlatform.isBigEndian - && pkgs.stdenv.hostPlatform.isAbiElfv1 - then - # No bindist, "borrowing" the GHC from Debian - bb.packages.ghc966DebianBinary - else if stdenv.buildPlatform.isi686 then - bb.packages.ghc967 - else - bb.packages.ghc984Binary; - inherit (buildPackages.python3Packages) sphinx; - inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - inherit buildTargetLlvmPackages llvmPackages; - }; ghc9103 = callPackage ../development/compilers/ghc/9.10.3.nix { bootPkgs = if @@ -295,11 +278,6 @@ in ghc = bh.compiler.ghc984; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { }; }; - ghc9102 = callPackage ../development/haskell-modules { - buildHaskellPackages = bh.packages.ghc9102; - ghc = bh.compiler.ghc9102; - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.10.x.nix { }; - }; ghc9103 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc9103; ghc = bh.compiler.ghc9103; From 6a42f32f4b67671132778f675ccb803d51889a74 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 10 Apr 2026 10:37:18 +0200 Subject: [PATCH 2/3] ghc/common-hadrian: skip .1 on versionOlder checks This makes it a tad clearer that this matches only the prior major versions. --- pkgs/development/compilers/ghc/common-hadrian.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 482c2a630c4ef..58c9e868d939d 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -238,17 +238,17 @@ hash = "sha256-L3FQvcm9QB59BOiR2g5/HACAufIG08HiT53EIOjj64g="; }) ] - ++ lib.optionals (lib.versionOlder version "9.12.1") [ + ++ lib.optionals (lib.versionOlder version "9.12") [ (fetchpatch { name = "ghc-ppc-support-elf-v2-on-powerpc64-big-endian.patch"; url = "https://gitlab.haskell.org/ghc/ghc/-/commit/ead75532c9dc915bfa9ebaef0ef5d148e793cc0a.patch"; # ghc-platform was split out of ghc-boot in ddcdd88c2c95445a87ee028f215d1e876939a4d9 - postFetch = lib.optionalString (lib.versionOlder version "9.10.1") '' + postFetch = lib.optionalString (lib.versionOlder version "9.10") '' substituteInPlace $out \ --replace-fail 'libraries/ghc-platform/src/GHC' 'libraries/ghc-boot/GHC' ''; hash = - if lib.versionOlder version "9.10.1" then + if lib.versionOlder version "9.10" then "sha256-5SVSW1aYoItqHli5QjnudH4zGporYNLDeEo4gZksBZw=" else "sha256-vtjT+TL/7sYPu4rcVV3xCqJQ+uqkyBbf9l0KIi97j/0="; From 19885395bb05c186e12118d5b14153da788b79c8 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 10 Apr 2026 10:39:51 +0200 Subject: [PATCH 3/3] haskell.compiler.ghc9122: drop Latest 9.12.x minor release is 9.12.4, which is also in Stackage Nightly already, so will never be the latest in a Stackage major version. Thus, dropping according to the GHC Deprecation Policy. --- pkgs/development/compilers/ghc/9.12.2.nix | 4 -- .../compilers/ghc/common-hadrian.nix | 40 +++++++------------ pkgs/top-level/haskell-packages.nix | 13 ------ 3 files changed, 14 insertions(+), 43 deletions(-) delete mode 100644 pkgs/development/compilers/ghc/9.12.2.nix diff --git a/pkgs/development/compilers/ghc/9.12.2.nix b/pkgs/development/compilers/ghc/9.12.2.nix deleted file mode 100644 index 40ca6681a3913..0000000000000 --- a/pkgs/development/compilers/ghc/9.12.2.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common-hadrian.nix { - version = "9.12.2"; - sha256 = "0e49cd5dde43f348c5716e5de9a5d7a0f8d68d945dc41cf75dfdefe65084f933"; -} diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 58c9e868d939d..57b96292af1b2 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -254,35 +254,23 @@ "sha256-vtjT+TL/7sYPu4rcVV3xCqJQ+uqkyBbf9l0KIi97j/0="; }) ] - ++ - lib.optionals - ( - (lib.versions.majorMinor version == "9.12" && lib.versionOlder version "9.12.3") - || (lib.versions.majorMinor version != "9.12" && lib.versionOlder version "9.14.1") - ) - [ - (fetchpatch { - name = "ghc-rts-Fix-compile-on-powerpc64-elf-v1.patch"; - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/05e5785a3157c71e327a8e9bdc80fa7082918739.patch"; - hash = "sha256-xP5v3cKhXeTRSFvRiKEn9hPxGXgVgykjTILKjh/pdDU="; - }) - ] + ++ lib.optionals (lib.versionOlder version "9.12") [ + (fetchpatch { + name = "ghc-rts-Fix-compile-on-powerpc64-elf-v1.patch"; + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/05e5785a3157c71e327a8e9bdc80fa7082918739.patch"; + hash = "sha256-xP5v3cKhXeTRSFvRiKEn9hPxGXgVgykjTILKjh/pdDU="; + }) + ] # Fix build with gcc15 # https://gitlab.haskell.org/ghc/ghc/-/issues/25662 # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13863 - ++ - lib.optionals - ( - lib.versionOlder version "9.12.3" - && !(lib.versionAtLeast version "9.10.2" && lib.versionOlder version "9.12") - ) - [ - (fetchpatch { - name = "ghc-hp2ps-c-gnu17.patch"; - url = "https://src.fedoraproject.org/rpms/ghc/raw/9c26d7c3c3de73509a25806e5663b37bcf2e0b4e/f/hp2ps-C-gnu17.patch"; - hash = "sha256-Vr5wkiSE1S5e+cJ8pWUvG9KFpxtmvQ8wAy08ElGNp5E="; - }) - ] + ++ lib.optionals (lib.versionOlder version "9.10") [ + (fetchpatch { + name = "ghc-hp2ps-c-gnu17.patch"; + url = "https://src.fedoraproject.org/rpms/ghc/raw/9c26d7c3c3de73509a25806e5663b37bcf2e0b4e/f/hp2ps-C-gnu17.patch"; + hash = "sha256-Vr5wkiSE1S5e+cJ8pWUvG9KFpxtmvQ8wAy08ElGNp5E="; + }) + ] # Fix subword division regression in 9.12.3 https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15264 ++ lib.optionals (version == "9.12.3") [ (fetchpatch { diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index ad82a4609e4f0..0467e7ff2ae42 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -161,14 +161,6 @@ in inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; inherit buildTargetLlvmPackages llvmPackages; }; - ghc9122 = callPackage ../development/compilers/ghc/9.12.2.nix { - bootPkgs = - # No suitable bindist packaged yet - bb.packages.ghc9103; - inherit (buildPackages.python3Packages) sphinx; - inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - inherit buildTargetLlvmPackages llvmPackages; - }; ghc9123 = callPackage ../development/compilers/ghc/9.12.3.nix { bootPkgs = # No suitable bindist packaged yet @@ -283,11 +275,6 @@ in ghc = bh.compiler.ghc9103; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.10.x.nix { }; }; - ghc9122 = callPackage ../development/haskell-modules { - buildHaskellPackages = bh.packages.ghc9122; - ghc = bh.compiler.ghc9122; - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.12.x.nix { }; - }; ghc9123 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc9123; ghc = bh.compiler.ghc9123;