diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-11-17 11:38:00 +0100 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-11-17 12:52:04 +0100 |
commit | 47a8cb60570393664a205ee314fd6a3095581e02 (patch) | |
tree | 0cabe5ef3fbdf602ee78607165e1e96b18f1f88a | |
parent | d48d90ed8aaa4ed16e6d0e2a27e06cd8746f359e (diff) | |
download | nixlib-47a8cb60570393664a205ee314fd6a3095581e02.tar nixlib-47a8cb60570393664a205ee314fd6a3095581e02.tar.gz nixlib-47a8cb60570393664a205ee314fd6a3095581e02.tar.bz2 nixlib-47a8cb60570393664a205ee314fd6a3095581e02.tar.lz nixlib-47a8cb60570393664a205ee314fd6a3095581e02.tar.xz nixlib-47a8cb60570393664a205ee314fd6a3095581e02.tar.zst nixlib-47a8cb60570393664a205ee314fd6a3095581e02.zip |
haskell.compiler.integer-simple: construct using include list
There won't be any new integer-simple compilers and they are already in the minority, so converting the mechanism to an include list is much better. Maybe native-bignum should now become an exclude list additionally? Verified that nix-env -qaP -A haskell.compiler output stays identical.
-rw-r--r-- | pkgs/top-level/haskell-packages.nix | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index eed0502749c9..b8f11100d39c 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1,38 +1,12 @@ { buildPackages, pkgsBuildTarget, pkgs, newScope, stdenv }: let - # These are attributes in compiler and packages that don't support integer-simple. - integerSimpleExcludes = [ - "ghc865Binary" - "ghc8102Binary" - "ghc8107Binary" - "ghc924Binary" - "ghcjs" - "ghcjs810" - "integer-simple" - "native-bignum" - "ghc902" - "ghc90" - "ghc924" - "ghc925" - "ghc926" - "ghc927" - "ghc928" - "ghc92" - "ghc942" - "ghc943" - "ghc944" - "ghc945" - "ghc946" - "ghc947" - "ghc948" - "ghc94" - "ghc96" - "ghc962" - "ghc963" - "ghc981" - "ghc98" - "ghcHEAD" + # These are attributes in compiler that support integer-simple. + integerSimpleIncludes = [ + "ghc88" + "ghc884" + "ghc810" + "ghc8107" ]; nativeBignumIncludes = [ @@ -463,7 +437,7 @@ in { # build with integer-simple instead of integer-gmp. integer-simple = let integerSimpleGhcNames = pkgs.lib.filter - (name: ! builtins.elem name integerSimpleExcludes) + (name: builtins.elem name integerSimpleIncludes) (pkgs.lib.attrNames compiler); in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs integerSimpleGhcNames @@ -626,7 +600,7 @@ in { integer-simple = let integerSimpleGhcNames = pkgs.lib.filter - (name: ! builtins.elem name integerSimpleExcludes) + (name: builtins.elem name integerSimpleIncludes) (pkgs.lib.attrNames packages); in pkgs.lib.genAttrs integerSimpleGhcNames |