From 2f7500238f6e2eafa64fb121b3893c3d6597b3fd Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 3 May 2025 22:25:11 +0200 Subject: [PATCH] haskell.compiler.ghc9102: init at 9.10.2 https://www.haskell.org/ghc/blog/20250503-ghc-9.10.2-released.html --- pkgs/development/compilers/ghc/9.10.2.nix | 4 +++ .../compilers/ghc/common-hadrian.nix | 1 + pkgs/top-level/haskell-packages.nix | 34 +++++++++++++++++-- pkgs/top-level/release-haskell.nix | 3 ++ 4 files changed, 40 insertions(+), 2 deletions(-) create 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 new file mode 100644 index 000000000000..96e251654429 --- /dev/null +++ b/pkgs/development/compilers/ghc/9.10.2.nix @@ -0,0 +1,4 @@ +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 2ab984fa6e2e..69615a939445 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -201,6 +201,7 @@ lib.versionOlder version "9.11" && !(lib.versionAtLeast version "9.6.7" && lib.versionOlder version "9.8") && !(lib.versionAtLeast version "9.8.4" && lib.versionOlder version "9.9") + && !(lib.versionAtLeast version "9.10.2" && lib.versionOlder version "9.11") ) [ # Determine size of time related types using hsc2hs instead of assuming CLong. diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index f1a73afa4beb..056bff525209 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -391,11 +391,36 @@ in buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; llvmPackages = pkgs.llvmPackages_15; }; + ghc9102 = callPackage ../development/compilers/ghc/9.10.2.nix { + bootPkgs = + # For GHC 9.6 no armv7l bindists are available. + if stdenv.buildPlatform.isAarch32 then + bb.packages.ghc963 + else if stdenv.buildPlatform.isPower64 && stdenv.buildPlatform.isLittleEndian then + bb.packages.ghc963 + else if stdenv.buildPlatform.isDarwin then + # it seems like the GHC 9.6.* bindists are built with a different + # toolchain than we are using (which I'm guessing from the fact + # that 9.6.4 bindists pass linker flags our ld doesn't support). + # With both 9.6.3 and 9.6.4 binary it is impossible to link against + # the clock package (probably a hsc2hs problem). + bb.packages.ghc963 + else + bb.packages.ghc963Binary; + inherit (buildPackages.python3Packages) sphinx; + # Need to use apple's patched xattr until + # https://github.com/xattr/xattr/issues/44 and + # https://github.com/xattr/xattr/issues/55 are solved. + inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; + # 2023-01-15: Support range >= 11 && < 16 + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; + llvmPackages = pkgs.llvmPackages_15; + }; ghc910 = compiler.ghc9101; ghc9121 = callPackage ../development/compilers/ghc/9.12.1.nix { bootPkgs = # No suitable bindist packaged yet - bb.packages.ghc9101; + bb.packages.ghc9102; inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and @@ -408,7 +433,7 @@ in ghc9122 = callPackage ../development/compilers/ghc/9.12.2.nix { bootPkgs = # No suitable bindist packaged yet - bb.packages.ghc9101; + bb.packages.ghc9102; inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and @@ -595,6 +620,11 @@ in ghc = bh.compiler.ghc9101; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.10.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 { }; + }; ghc910 = packages.ghc9101; ghc9121 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc9121; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 9b2ba4701000..deb2290fb521 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -78,6 +78,7 @@ let ghc983 ghc984 ghc9101 + ghc9102 # exclude ghc9121 due to severe miscompilation bug ghc9122 ]; @@ -590,6 +591,7 @@ let hlint = lib.subtractLists [ compilerNames.ghc902 compilerNames.ghc9101 + compilerNames.ghc9102 compilerNames.ghc9122 ] released; hpack = released; @@ -623,6 +625,7 @@ let ]; weeder = lib.subtractLists [ compilerNames.ghc9101 + compilerNames.ghc9102 compilerNames.ghc9122 ] released; })