diff --git a/pkgs/development/compilers/ghc/9.12.4.nix b/pkgs/development/compilers/ghc/9.12.4.nix new file mode 100644 index 000000000000..284a98e7355f --- /dev/null +++ b/pkgs/development/compilers/ghc/9.12.4.nix @@ -0,0 +1,4 @@ +import ./common-hadrian.nix { + version = "9.12.4"; + sha256 = "02d1ee5080acf00e135b93b238f09015b06ff27254cde59669cf57c42c2bee43"; +} diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index d5f8092cf374..8f2541bea009 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -321,22 +321,34 @@ ] # Fix docs build with Sphinx >= 9 https://gitlab.haskell.org/ghc/ghc/-/issues/26810 - ++ lib.optionals (lib.versionOlder version "9.15.20260129") [ - ./ghc-9.6-or-later-docs-sphinx-9.patch - ] + ++ + lib.optionals + ( + lib.versionOlder version "9.12.4" + || (lib.versionAtLeast version "9.14" && lib.versionOlder version "9.15.20260129") + ) + [ + ./ghc-9.6-or-later-docs-sphinx-9.patch + ] # Fixes rts/Types.h missing from the install when targeting javascript # See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15740, krank:ignore-line # https://gitlab.haskell.org/ghc/ghc/-/issues/27033. krank:ignore-line - # TODO(@sternenseemann): patch likely included in 9.12.4 - ++ lib.optionals (lib.versionAtLeast version "9.12.3" && lib.versionOlder version "9.15") [ - (fetchpatch { - name = "ghc-9.12.3-ghcjs-install-rts-types.h.patch"; - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/5b1be555be4f0989d78c274991c5046d7ac6d25e.patch"; - hash = "sha256-pv4NDyQ6FlZgmTYZ4Ghis4qggt7nCDMhqGaFxTxVPac="; - includes = [ "rts/rts.cabal" ]; - }) - ] + ++ + lib.optionals + ( + version == "9.12.3" + # TODO(@sternenseemann): 9.14.2 will likely also have this patch + || (lib.versionAtLeast version "9.14" && lib.versionOlder version "9.15.20260127") + ) + [ + (fetchpatch { + name = "ghc-9.12.3-ghcjs-install-rts-types.h.patch"; + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/5b1be555be4f0989d78c274991c5046d7ac6d25e.patch"; + hash = "sha256-pv4NDyQ6FlZgmTYZ4Ghis4qggt7nCDMhqGaFxTxVPac="; + includes = [ "rts/rts.cabal" ]; + }) + ] ++ (import ./common-llvm-patches.nix { inherit lib version fetchpatch; }); diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 949915974dd0..5c5c7fff8c94 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -191,6 +191,14 @@ in inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; inherit buildTargetLlvmPackages llvmPackages; }; + ghc9124 = callPackage ../development/compilers/ghc/9.12.4.nix { + bootPkgs = + # No suitable bindist packaged yet + bb.packages.ghc9103; + inherit (buildPackages.python3Packages) sphinx; + inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; + inherit buildTargetLlvmPackages llvmPackages; + }; ghc9141 = callPackage ../development/compilers/ghc/9.14.1.nix { bootPkgs = # No suitable bindist packaged yet @@ -295,6 +303,11 @@ in ghc = bh.compiler.ghc9123; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.12.x.nix { }; }; + ghc9124 = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc9124; + ghc = bh.compiler.ghc9124; + compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.12.x.nix { }; + }; ghc9141 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc9141; ghc = bh.compiler.ghc9141;