From 812decd5c1abe497d44d7752fb295b69d6eed100 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Jun 2018 15:51:57 -0400 Subject: [PATCH] ghc: Default integer-simple usage based one whether GNU MP is available The user's choice is still always respected --- pkgs/development/compilers/ghc/7.10.3.nix | 4 +--- pkgs/development/compilers/ghc/8.0.2.nix | 4 +--- pkgs/development/compilers/ghc/8.2.2.nix | 4 +--- pkgs/development/compilers/ghc/8.4.2.nix | 4 +--- pkgs/development/compilers/ghc/head.nix | 4 +--- pkgs/development/libraries/gmp/6.x.nix | 1 + pkgs/top-level/haskell-packages.nix | 1 - 7 files changed, 6 insertions(+), 16 deletions(-) diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix index 2565afab334b..3dd320e02572 100644 --- a/pkgs/development/compilers/ghc/7.10.3.nix +++ b/pkgs/development/compilers/ghc/7.10.3.nix @@ -16,7 +16,7 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? false, gmp ? null + enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? targetPlatform != hostPlatform @@ -30,8 +30,6 @@ ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" }: -assert !enableIntegerSimple -> gmp != null; - let inherit (bootPkgs) ghc; diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index 4aa9f3fc81cb..53c5a218cb13 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -15,7 +15,7 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? false, gmp ? null + enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? targetPlatform != hostPlatform @@ -29,8 +29,6 @@ ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" }: -assert !enableIntegerSimple -> gmp != null; - let inherit (bootPkgs) ghc; diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 87de0fd53f62..4e9eff06f26e 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -16,7 +16,7 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? false, gmp ? null + enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? targetPlatform != hostPlatform @@ -34,8 +34,6 @@ deterministicProfiling ? false }: -assert !enableIntegerSimple -> gmp != null; - let inherit (bootPkgs) ghc; diff --git a/pkgs/development/compilers/ghc/8.4.2.nix b/pkgs/development/compilers/ghc/8.4.2.nix index 9a57161d3a71..d793f0b391af 100644 --- a/pkgs/development/compilers/ghc/8.4.2.nix +++ b/pkgs/development/compilers/ghc/8.4.2.nix @@ -15,7 +15,7 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? false, gmp ? null + enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? targetPlatform != hostPlatform @@ -32,8 +32,6 @@ ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" }: -assert !enableIntegerSimple -> gmp != null; - let inherit (bootPkgs) ghc; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index c9effb90ac33..c128891ec382 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -15,7 +15,7 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? false, gmp ? null + enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? targetPlatform != hostPlatform @@ -33,8 +33,6 @@ ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" }: -assert !enableIntegerSimple -> gmp != null; - let inherit (bootPkgs) ghc; diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index 551e7e5e1f6b..2635aed3eaca 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -75,6 +75,7 @@ let self = stdenv.mkDerivation rec { asymptotically faster algorithms. ''; + broken = with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt; platforms = platforms.all; maintainers = [ maintainers.peti maintainers.vrthra ]; }; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 7ec9da39a9c5..c5f0378049e1 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -8,7 +8,6 @@ let integerSimpleExcludes = [ "ghc7103Binary" "ghc821Binary" - "ghcCross" "ghcjs" "ghcjs710" "ghcjs80"