about summary refs log tree commit diff
path: root/nixpkgs/pkgs/top-level/haskell-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/top-level/haskell-packages.nix')
-rw-r--r--nixpkgs/pkgs/top-level/haskell-packages.nix112
1 files changed, 86 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/top-level/haskell-packages.nix b/nixpkgs/pkgs/top-level/haskell-packages.nix
index 7141f1d35fe0..b0c098ddcaa8 100644
--- a/nixpkgs/pkgs/top-level/haskell-packages.nix
+++ b/nixpkgs/pkgs/top-level/haskell-packages.nix
@@ -9,25 +9,18 @@ let
     "ghc8107"
   ];
 
-  nativeBignumIncludes = [
-    "ghc90"
-    "ghc902"
-    "ghc92"
-    "ghc925"
-    "ghc926"
-    "ghc927"
-    "ghc928"
-    "ghc94"
-    "ghc945"
-    "ghc946"
-    "ghc947"
-    "ghc948"
-    "ghc96"
-    "ghc963"
-    "ghc964"
-    "ghc98"
-    "ghc981"
-    "ghcHEAD"
+  nativeBignumExcludes = integerSimpleIncludes ++ [
+    # haskell.compiler sub groups
+    "integer-simple"
+    "native-bignum"
+    # Binary GHCs
+    "ghc865Binary"
+    "ghc8107Binary"
+    "ghc924Binary"
+    "ghc963Binary"
+    # ghcjs
+    "ghcjs"
+    "ghcjs810"
   ];
 
   haskellLibUncomposable = import ../development/haskell-modules/lib {
@@ -73,6 +66,10 @@ in {
       llvmPackages = pkgs.llvmPackages_12;
     };
 
+    ghc963Binary = callPackage ../development/compilers/ghc/9.6.3-binary.nix {
+      llvmPackages = pkgs.llvmPackages_15;
+    };
+
     ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix {
       bootPkgs =
         # the oldest ghc with aarch64-darwin support is 8.10.5
@@ -295,8 +292,21 @@ in {
     };
     ghc96 = compiler.ghc964;
     ghc981 = callPackage ../development/compilers/ghc/9.8.1.nix {
-      # No bindist packaged for 9.4.* yet
-      bootPkgs = packages.ghc947;
+      bootPkgs =
+        # For GHC 9.6 no armv7l bindists are available.
+        if stdenv.hostPlatform.isAarch32 then
+          packages.ghc963
+        else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
+          packages.ghc963
+        else if stdenv.hostPlatform.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).
+          packages.ghc963
+        else
+          packages.ghc963Binary;
       inherit (buildPackages.python3Packages) sphinx;
       # Need to use apple's patched xattr until
       # https://github.com/xattr/xattr/issues/44 and
@@ -306,9 +316,48 @@ in {
       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
       llvmPackages = pkgs.llvmPackages_15;
     };
-    ghc98 = compiler.ghc981;
+    ghc982 = callPackage ../development/compilers/ghc/9.8.2.nix {
+      bootPkgs =
+        # For GHC 9.6 no armv7l bindists are available.
+        if stdenv.hostPlatform.isAarch32 then
+          packages.ghc963
+        else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
+          packages.ghc963
+        else if stdenv.hostPlatform.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).
+          packages.ghc963
+        else
+          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;
+      # Support range >= 11 && < 16
+      buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
+      llvmPackages = pkgs.llvmPackages_15;
+    };
+    ghc98 = compiler.ghc982;
     ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
-      bootPkgs = packages.ghc963;
+      bootPkgs =
+        # For GHC 9.6 no armv7l bindists are available.
+        if stdenv.hostPlatform.isAarch32 then
+          packages.ghc963
+        else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
+          packages.ghc963
+        else if stdenv.hostPlatform.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).
+          packages.ghc963
+        else
+          packages.ghc963Binary;
       inherit (buildPackages.python3Packages) sphinx;
       # Need to use apple's patched xattr until
       # https://github.com/xattr/xattr/issues/44 and
@@ -340,7 +389,7 @@ in {
     # with "native" and "gmp" backends.
     native-bignum = let
       nativeBignumGhcNames = pkgs.lib.filter
-        (name: builtins.elem name nativeBignumIncludes)
+        (name: !(builtins.elem name nativeBignumExcludes))
         (pkgs.lib.attrNames compiler);
     in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
       nativeBignumGhcNames
@@ -371,6 +420,12 @@ in {
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
       packageSetConfig = bootstrapPackageSet;
     };
+    ghc963Binary = callPackage ../development/haskell-modules {
+      buildHaskellPackages = bh.packages.ghc963Binary;
+      ghc = bh.compiler.ghc963Binary;
+      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
+      packageSetConfig = bootstrapPackageSet;
+    };
     ghc8107 = callPackage ../development/haskell-modules {
       buildHaskellPackages = bh.packages.ghc8107;
       ghc = bh.compiler.ghc8107;
@@ -441,7 +496,12 @@ in {
       ghc = bh.compiler.ghc981;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
     };
-    ghc98 = packages.ghc981;
+    ghc982 = callPackage ../development/haskell-modules {
+      buildHaskellPackages = bh.packages.ghc982;
+      ghc = bh.compiler.ghc982;
+      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
+    };
+    ghc98 = packages.ghc982;
     ghcHEAD = callPackage ../development/haskell-modules {
       buildHaskellPackages = bh.packages.ghcHEAD;
       ghc = bh.compiler.ghcHEAD;
@@ -479,7 +539,7 @@ in {
     native-bignum =
       let
         nativeBignumGhcNames = pkgs.lib.filter
-          (name: builtins.elem name nativeBignumIncludes)
+          (name: !(builtins.elem name nativeBignumExcludes))
           (pkgs.lib.attrNames compiler);
       in
       pkgs.lib.genAttrs nativeBignumGhcNames