about summary refs log tree commit diff
path: root/pkgs/top-level/haskell-packages.nix
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2024-02-15 16:05:55 +0100
committersternenseemann <sternenseemann@systemli.org>2024-02-15 16:05:55 +0100
commit980d1086ccd9c7c30c5c199503c5fa6d8505a131 (patch)
treef41a4bd4ee13cbbde0c2fe132fbde8ad93dc1384 /pkgs/top-level/haskell-packages.nix
parentf4bce3c8177a0b545944cc0b41115ebc997465fc (diff)
haskell.compiler: determine native-bignum GHCs via excludes
native-bignum has become the norm, so let's convert it to an exclude
rather than an include list. This way it's no longer possible to forget
to add a newly packaged GHC to the include list.
Diffstat (limited to 'pkgs/top-level/haskell-packages.nix')
-rw-r--r--pkgs/top-level/haskell-packages.nix35
1 files changed, 14 insertions, 21 deletions
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 8446103bca15c..45e4b5dbb443a 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/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 {
@@ -357,7 +350,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
@@ -502,7 +495,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