diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2017-02-02 11:44:11 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-01-21 23:31:02 -0500 |
commit | bc16cfc009a32d4468151e23638f396bd5dc4c13 (patch) | |
tree | d7152077ed652d0c9a658b6cf9e70e3a3be662a2 /pkgs/top-level/haskell-packages.nix | |
parent | 54ead73271bec25986836c91b1acb0afa7cdbbab (diff) | |
download | nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.tar nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.tar.gz nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.tar.bz2 nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.tar.lz nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.tar.xz nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.tar.zst nixlib-bc16cfc009a32d4468151e23638f396bd5dc4c13.zip |
ghc: Remove old cross work
That way the next commit can apply a similar diff to each GHC.
Diffstat (limited to 'pkgs/top-level/haskell-packages.nix')
-rw-r--r-- | pkgs/top-level/haskell-packages.nix | 59 |
1 files changed, 25 insertions, 34 deletions
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 8f035cfd5756..aa0869cccc58 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1,4 +1,7 @@ -{ pkgs, lib, newScope, stdenv, buildPlatform, targetPlatform, cabal-install }: +{ buildPackages, pkgs +, newScope, stdenv +, buildPlatform, targetPlatform +}: let # These are attributes in compiler and packages that don't support integer-simple. @@ -76,27 +79,22 @@ in rec { inherit (bootPkgs) hscolour alex happy; inherit buildPlatform targetPlatform; sphinx = pkgs.python3Packages.sphinx; - selfPkgs = packages.ghc822; }; ghc841 = callPackage ../development/compilers/ghc/8.4.1.nix rec { bootPkgs = packages.ghc821Binary; inherit (bootPkgs) alex happy; - inherit buildPlatform targetPlatform; - selfPkgs = packages.ghc841; }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix rec { bootPkgs = packages.ghc821Binary; inherit (bootPkgs) alex happy; - inherit buildPlatform targetPlatform; - selfPkgs = packages.ghcHEAD; }; ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs { bootPkgs = packages.ghc7103; - inherit cabal-install; + inherit (pkgs) cabal-install; }; ghcjsHEAD = packages.ghc802.callPackage ../development/compilers/ghcjs/head.nix { bootPkgs = packages.ghc802; - inherit cabal-install; + inherit (pkgs) cabal-install; }; ghcHaLVM240 = callPackage ../development/compilers/halvm/2.4.0.nix rec { bootPkgs = packages.ghc7103Binary; @@ -110,19 +108,17 @@ in rec { # The integer-simple attribute set contains all the GHC compilers # build with integer-simple instead of integer-gmp. - integer-simple = - let integerSimpleGhcNames = - pkgs.lib.filter (name: ! builtins.elem name integerSimpleExcludes) - (pkgs.lib.attrNames compiler); - integerSimpleGhcs = pkgs.lib.genAttrs integerSimpleGhcNames - (name: compiler."${name}".override { enableIntegerSimple = true; }); - in pkgs.recurseIntoAttrs (integerSimpleGhcs // { - ghcHEAD = integerSimpleGhcs.ghcHEAD.override { selfPkgs = packages.integer-simple.ghcHEAD; }; - }); - + integer-simple = let + integerSimpleGhcNames = pkgs.lib.filter + (name: ! builtins.elem name integerSimpleExcludes) + (pkgs.lib.attrNames compiler); + in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs + integerSimpleGhcNames + (name: compiler."${name}".override { enableIntegerSimple = true; })); }; - packages = { + # Always get compilers from `buildPackages` + packages = let inherit (buildPackages.haskell) compiler; in { ghc7103 = callPackage ../development/haskell-modules { ghc = compiler.ghc7103; @@ -152,11 +148,6 @@ in rec { ghc = compiler.ghcHEAD; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { }; }; - # TODO Support for multiple variants here - ghcCross = callPackage ../development/haskell-modules { - ghc = compiler.ghcHEAD.crossCompiler; - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { }; - }; ghcjs = callPackage ../development/haskell-modules { ghc = compiler.ghcjs; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { }; @@ -174,16 +165,16 @@ in rec { # The integer-simple attribute set contains package sets for all the GHC compilers # using integer-simple instead of integer-gmp. - integer-simple = - let integerSimpleGhcNames = - pkgs.lib.filter (name: ! builtins.elem name integerSimpleExcludes) - (pkgs.lib.attrNames packages); - in pkgs.lib.genAttrs integerSimpleGhcNames (name: packages."${name}".override { - ghc = compiler.integer-simple."${name}"; - overrides = _self : _super : { - integer-simple = null; - integer-gmp = null; - }; + integer-simple = let + integerSimpleGhcNames = pkgs.lib.filter + (name: ! builtins.elem name integerSimpleExcludes) + (pkgs.lib.attrNames packages); + in pkgs.lib.genAttrs integerSimpleGhcNames (name: packages."${name}".override { + ghc = compiler.integer-simple."${name}"; + overrides = _self : _super : { + integer-simple = null; + integer-gmp = null; + }; }); }; |