diff options
Diffstat (limited to 'nixpkgs/pkgs/top-level/haskell-packages.nix')
-rw-r--r-- | nixpkgs/pkgs/top-level/haskell-packages.nix | 61 |
1 files changed, 49 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/top-level/haskell-packages.nix b/nixpkgs/pkgs/top-level/haskell-packages.nix index 13c5b721301..3e85109527e 100644 --- a/nixpkgs/pkgs/top-level/haskell-packages.nix +++ b/nixpkgs/pkgs/top-level/haskell-packages.nix @@ -5,10 +5,15 @@ let integerSimpleExcludes = [ "ghc822Binary" "ghc865Binary" - "ghc844" "ghcjs" "ghcjs86" "integer-simple" + "native-bignum" + "ghcHEAD" + ]; + + nativeBignumIncludes = [ + "ghcHEAD" ]; haskellLib = import ../development/haskell-modules/lib.nix { @@ -44,12 +49,6 @@ in { ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix { }; - ghc844 = callPackage ../development/compilers/ghc/8.4.4.nix { - bootPkgs = packages.ghc822Binary; - sphinx = buildPackages.python3Packages.sphinx_1_7_9; - buildLlvmPackages = buildPackages.llvmPackages_5; - llvmPackages = pkgs.llvmPackages_5; - }; ghc865 = callPackage ../development/compilers/ghc/8.6.5.nix { bootPkgs = packages.ghc822Binary; inherit (buildPackages.python3Packages) sphinx; @@ -68,12 +67,24 @@ in { buildLlvmPackages = buildPackages.llvmPackages_7; llvmPackages = pkgs.llvmPackages_7; }; + ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix { + bootPkgs = packages.ghc865Binary; + inherit (buildPackages.python3Packages) sphinx; + buildLlvmPackages = buildPackages.llvmPackages_7; + llvmPackages = pkgs.llvmPackages_7; + }; ghc8101 = callPackage ../development/compilers/ghc/8.10.1.nix { bootPkgs = packages.ghc865Binary; inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_9; llvmPackages = pkgs.llvmPackages_9; }; + ghc8102 = callPackage ../development/compilers/ghc/8.10.2.nix { + bootPkgs = packages.ghc865Binary; + inherit (buildPackages.python3Packages) sphinx; + buildLlvmPackages = buildPackages.llvmPackages_9; + llvmPackages = pkgs.llvmPackages_9; + }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = packages.ghc883; # no binary yet inherit (buildPackages.python3Packages) sphinx; @@ -98,6 +109,16 @@ in { in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs integerSimpleGhcNames (name: compiler.${name}.override { enableIntegerSimple = true; })); + + # Starting from GHC 9, integer-{simple,gmp} is replaced by ghc-bignum + # with "native" and "gmp" backends. + native-bignum = let + nativeBignumGhcNames = pkgs.lib.filter + (name: builtins.elem name nativeBignumIncludes) + (pkgs.lib.attrNames compiler); + in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs + nativeBignumGhcNames + (name: compiler.${name}.override { enableNativeBignum = true; })); }; # Default overrides that are applied to all package sets. @@ -118,11 +139,6 @@ in { compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.6.x.nix { }; packageSetConfig = bootstrapPackageSet; }; - ghc844 = callPackage ../development/haskell-modules { - buildHaskellPackages = bh.packages.ghc844; - ghc = bh.compiler.ghc844; - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.4.x.nix { }; - }; ghc865 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc865; ghc = bh.compiler.ghc865; @@ -138,11 +154,21 @@ in { ghc = bh.compiler.ghc883; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.8.x.nix { }; }; + ghc884 = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc884; + ghc = bh.compiler.ghc884; + compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.8.x.nix { }; + }; ghc8101 = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghc8101; ghc = bh.compiler.ghc8101; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { }; }; + ghc8102 = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc8102; + ghc = bh.compiler.ghc8102; + compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { }; + }; ghcHEAD = callPackage ../development/haskell-modules { buildHaskellPackages = bh.packages.ghcHEAD; ghc = bh.compiler.ghcHEAD; @@ -171,5 +197,16 @@ in { }; }); + native-bignum = let + nativeBignumGhcNames = pkgs.lib.filter + (name: builtins.elem name nativeBignumIncludes) + (pkgs.lib.attrNames compiler); + in pkgs.lib.genAttrs nativeBignumGhcNames (name: packages.${name}.override { + ghc = bh.compiler.native-bignum.${name}; + buildHaskellPackages = bh.packages.native-bignum.${name}; + overrides = _self : _super : { + integer-gmp = null; + }; + }); }; } |