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 | |
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')
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2.nix | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.1.nix | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 30 | ||||
-rw-r--r-- | pkgs/top-level/haskell-packages.nix | 59 |
4 files changed, 31 insertions, 118 deletions
diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 934e05465c7b..10c0b46f8ff0 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -1,6 +1,5 @@ { stdenv, targetPackages , buildPlatform, hostPlatform, targetPlatform -, selfPkgs, cross ? null # build-tools , bootPkgs, alex, happy, hscolour, llvm_39 @@ -29,7 +28,7 @@ let BuildFlavour = perf-cross ''; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { version = "8.2.2"; name = "${targetPrefix}ghc-${version}"; @@ -89,11 +88,6 @@ stdenv.mkDerivation (rec { passthru = { inherit bootPkgs targetPrefix; - } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) { - crossCompiler = selfPkgs.ghc.override { - cross = targetPlatform; - bootPkgs = selfPkgs; - }; }; meta = { @@ -103,24 +97,4 @@ stdenv.mkDerivation (rec { inherit (ghc.meta) license platforms; }; -} // stdenv.lib.optionalAttrs (cross != null) { - configureFlags = [ - "CC=${stdenv.cc}/bin/${cross.config}-cc" - "LD=${stdenv.cc.bintools}/bin/${cross.config}-ld" - "AR=${stdenv.cc.bintools}/bin/${cross.config}-ar" - "NM=${stdenv.cc.bintools}/bin/${cross.config}-nm" - "RANLIB=${stdenv.cc.bintools}/bin/${cross.config}-ranlib" - "--target=${cross.config}" - "--enable-bootstrap-with-devel-snapshot" - ] ++ - # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ - stdenv.lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; - - configurePlatforms = []; - - passthru = { - inherit bootPkgs cross; - cc = "${stdenv.cc}/bin/${cross.config}-cc"; - ld = "${stdenv.cc}/bin/${cross.config}-ld"; - }; -}) +} diff --git a/pkgs/development/compilers/ghc/8.4.1.nix b/pkgs/development/compilers/ghc/8.4.1.nix index dd0be26da7c7..498bba896ae4 100644 --- a/pkgs/development/compilers/ghc/8.4.1.nix +++ b/pkgs/development/compilers/ghc/8.4.1.nix @@ -1,6 +1,5 @@ { stdenv, targetPackages , buildPlatform, hostPlatform, targetPlatform -, selfPkgs, cross ? null # build-tools , bootPkgs, alex, happy @@ -33,7 +32,7 @@ let BuildFlavour = perf-cross ''; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { inherit version rev; name = "${targetPrefix}ghc-${version}"; @@ -95,11 +94,6 @@ stdenv.mkDerivation (rec { passthru = { inherit bootPkgs targetPrefix; - } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) { - crossCompiler = selfPkgs.ghc.override { - cross = targetPlatform; - bootPkgs = selfPkgs; - }; }; meta = { @@ -109,24 +103,4 @@ stdenv.mkDerivation (rec { inherit (ghc.meta) license platforms; }; -} // stdenv.lib.optionalAttrs (cross != null) { - configureFlags = [ - "CC=${stdenv.cc}/bin/${cross.config}-cc" - "LD=${stdenv.cc.bintools}/bin/${cross.config}-ld" - "AR=${stdenv.cc.bintools}/bin/${cross.config}-ar" - "NM=${stdenv.cc.bintools}/bin/${cross.config}-nm" - "RANLIB=${stdenv.cc.bintools}/bin/${cross.config}-ranlib" - "--target=${cross.config}" - "--enable-bootstrap-with-devel-snapshot" - ] ++ - # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ - stdenv.lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; - - configurePlatforms = []; - - passthru = { - inherit bootPkgs cross; - cc = "${stdenv.cc}/bin/${cross.config}-cc"; - ld = "${stdenv.cc}/bin/${cross.config}-ld"; - }; -}) +} diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 6fb199b1a579..753c6bb56721 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,6 +1,5 @@ { stdenv, targetPackages , buildPlatform, hostPlatform, targetPlatform -, selfPkgs, cross ? null # build-tools , bootPkgs, alex, happy @@ -33,7 +32,7 @@ let BuildFlavour = perf-cross ''; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { inherit version rev; name = "${targetPrefix}ghc-${version}"; @@ -95,11 +94,6 @@ stdenv.mkDerivation (rec { passthru = { inherit bootPkgs targetPrefix; - } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) { - crossCompiler = selfPkgs.ghc.override { - cross = targetPlatform; - bootPkgs = selfPkgs; - }; }; meta = { @@ -109,24 +103,4 @@ stdenv.mkDerivation (rec { inherit (ghc.meta) license platforms; }; -} // stdenv.lib.optionalAttrs (cross != null) { - configureFlags = [ - "CC=${stdenv.cc}/bin/${cross.config}-cc" - "LD=${stdenv.cc.bintools}/bin/${cross.config}-ld" - "AR=${stdenv.cc.bintools}/bin/${cross.config}-ar" - "NM=${stdenv.cc.bintools}/bin/${cross.config}-nm" - "RANLIB=${stdenv.cc.bintools}/bin/${cross.config}-ranlib" - "--target=${cross.config}" - "--enable-bootstrap-with-devel-snapshot" - ] ++ - # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ - stdenv.lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; - - configurePlatforms = []; - - passthru = { - inherit bootPkgs cross; - cc = "${stdenv.cc}/bin/${cross.config}-cc"; - ld = "${stdenv.cc}/bin/${cross.config}-ld"; - }; -}) +} 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; + }; }); }; |