From 980d1086ccd9c7c30c5c199503c5fa6d8505a131 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 15 Feb 2024 16:05:55 +0100 Subject: [PATCH] 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. --- pkgs/top-level/haskell-packages.nix | 35 ++++++++++++----------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 8446103bca15..45e4b5dbb443 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