diff options
-rw-r--r-- | pkgs/development/compilers/ghc/9.6.1.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/common-hadrian.nix | 4 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix | 50 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/haskell-packages.nix | 33 | ||||
-rw-r--r-- | pkgs/top-level/release-haskell.nix | 21 |
6 files changed, 104 insertions, 10 deletions
diff --git a/pkgs/development/compilers/ghc/9.6.1.nix b/pkgs/development/compilers/ghc/9.6.1.nix new file mode 100644 index 0000000000000..7e8622f218cb5 --- /dev/null +++ b/pkgs/development/compilers/ghc/9.6.1.nix @@ -0,0 +1,4 @@ +import ./common-hadrian.nix rec { + version = "9.6.1"; + sha256 = "fe5ac909cb8bb087e235de97fa63aff47a8ae650efaa37a2140f4780e21f34cb"; +} diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index a85ad54591e64..d359f3fd521d2 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -395,9 +395,11 @@ stdenv.mkDerivation ({ nativeBuildInputs = [ perl ghc hadrian bootPkgs.alex bootPkgs.happy bootPkgs.hscolour + # autoconf and friends are necessary for hadrian to create the bindist + autoconf automake m4 ] ++ lib.optionals (rev != null) [ # We need to execute the boot script - autoconf automake m4 python3 + python3 ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] ++ lib.optionals enableDocs [ diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix new file mode 100644 index 0000000000000..7ac21dd5f3f1d --- /dev/null +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -0,0 +1,50 @@ +{ pkgs, haskellLib }: + +let + inherit (pkgs) lib; +in + +with haskellLib; + +self: super: { + llvmPackages = lib.dontRecurseIntoAttrs self.ghc.llvmPackages; + + # Disable GHC core libraries + array = null; + base = null; + binary = null; + bytestring = null; + Cabal = null; + Cabal-syntax = null; + containers = null; + deepseq = null; + directory = null; + exceptions = null; + filepath = null; + ghc-bignum = null; + ghc-boot = null; + ghc-boot-th = null; + ghc-compact = null; + ghc-heap = null; + ghc-prim = null; + ghci = null; + haskeline = null; + hpc = null; + integer-gmp = null; + libiserv = null; + mtl = null; + parsec = null; + pretty = null; + process = null; + rts = null; + stm = null; + system-cxx-std-lib = null; + template-haskell = null; + # terminfo is not built if GHC is a cross compiler + terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5; + text = null; + time = null; + transformers = null; + unix = null; + xhtml = null; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9103cf91a26b..0813e570f4c1e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15002,7 +15002,7 @@ with pkgs; haskellPackages = dontRecurseIntoAttrs # JS backend is only available for GHC >= 9.6 (if stdenv.hostPlatform.isGhcjs - then haskell.packages.native-bignum.ghcHEAD + then haskell.packages.native-bignum.ghc96 # Prefer native-bignum to avoid linking issues with gmp else if stdenv.hostPlatform.isStatic then haskell.packages.native-bignum.ghc92 diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 8c51eb406e6b0..7eda3c5ddca21 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -25,6 +25,8 @@ let "ghc943" "ghc944" "ghc94" + "ghc96" + "ghc961" "ghcHEAD" ]; @@ -40,6 +42,8 @@ let "ghc942" "ghc943" "ghc944" + "ghc96" + "ghc961" "ghcHEAD" ]; @@ -299,6 +303,27 @@ in { llvmPackages = pkgs.llvmPackages_12; }; ghc94 = ghc944; + ghc961 = callPackage ../development/compilers/ghc/9.6.1.nix { + bootPkgs = + # For GHC 9.2 no armv7l bindists are available. + if stdenv.hostPlatform.isAarch32 then + packages.ghc924 + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then + packages.ghc924 + else if stdenv.isAarch64 then + packages.ghc924BinaryMinimal + else + packages.ghc924Binary; + 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; + # Support range >= 10 && < 15 + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_14; + llvmPackages = pkgs.llvmPackages_14; + }; + ghc96 = ghc961; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = # For GHC 9.2 no armv7l bindists are available. @@ -315,7 +340,7 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - # 2022-08-04: Support range >= 10 && < 15 + # 2023-01-15: Support range >= 10 && < 15 buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_14; llvmPackages = pkgs.llvmPackages_14; }; @@ -451,6 +476,12 @@ in { compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { }; }; ghc94 = ghc942; + ghc961 = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc961; + ghc = bh.compiler.ghc961; + compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { }; + }; + ghc96 = ghc961; ghcHEAD = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghcHEAD; ghc = bh.compiler.ghcHEAD; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index c9be9cc460067..ef4b2ef71bc3e 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -346,19 +346,26 @@ let }; }; - # TODO(@sternenseemann): when GHC 9.6 comes out we need separate jobs for - # default GHC and ghcHEAD. - pkgsCross.ghcjs.haskellPackages = + pkgsCross.ghcjs = removePlatforms [ # Hydra output size of 3GB is exceeded "aarch64-linux" ] { - inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskellPackages) - ghc - hello - ; + haskellPackages = { + inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskellPackages) + ghc + hello + ; + }; + + haskell.packages.ghcHEAD = { + inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghcHEAD) + ghc + hello + ; + }; }; }) (versionedCompilerJobs { |