Skip to content

Commit

Permalink
ghc: Default integer-simple usage based one whether GNU MP is available
Browse files Browse the repository at this point in the history
The user's choice is still always respected
  • Loading branch information
Ericson2314 committed Jun 11, 2018
1 parent d1a2853 commit 812decd
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 16 deletions.
4 changes: 1 addition & 3 deletions pkgs/development/compilers/ghc/7.10.3.nix
Expand Up @@ -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
Expand All @@ -30,8 +30,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:

assert !enableIntegerSimple -> gmp != null;

let
inherit (bootPkgs) ghc;

Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/ghc/8.0.2.nix
Expand Up @@ -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
Expand All @@ -29,8 +29,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:

assert !enableIntegerSimple -> gmp != null;

let
inherit (bootPkgs) ghc;

Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/ghc/8.2.2.nix
Expand Up @@ -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
Expand All @@ -34,8 +34,6 @@
deterministicProfiling ? false
}:

assert !enableIntegerSimple -> gmp != null;

let
inherit (bootPkgs) ghc;

Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/ghc/8.4.2.nix
Expand Up @@ -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
Expand All @@ -32,8 +32,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:

assert !enableIntegerSimple -> gmp != null;

let
inherit (bootPkgs) ghc;

Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/ghc/head.nix
Expand Up @@ -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
Expand All @@ -33,8 +33,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:

assert !enableIntegerSimple -> gmp != null;

let
inherit (bootPkgs) ghc;

Expand Down
1 change: 1 addition & 0 deletions pkgs/development/libraries/gmp/6.x.nix
Expand Up @@ -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 ];
};
Expand Down
1 change: 0 additions & 1 deletion pkgs/top-level/haskell-packages.nix
Expand Up @@ -8,7 +8,6 @@ let
integerSimpleExcludes = [
"ghc7103Binary"
"ghc821Binary"
"ghcCross"
"ghcjs"
"ghcjs710"
"ghcjs80"
Expand Down

1 comment on commit 812decd

@matthewbauer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to do this with 8.4.3.nix as well.

Please sign in to comment.