summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2018-10-01 20:46:37 +0000
committerJohn Ericson <Ericson2314@Yahoo.com>2018-10-01 20:50:58 +0000
commitd4b5df711a08f773755b575849b26b562045a9cb (patch)
tree2e20ac73c2ed1dde2fbfe4786d86dd63e72c205b /pkgs/development/compilers/ghc
parentd892f1aa90c3a22016d78e3bedefa773dc66879a (diff)
downloadnixlib-d4b5df711a08f773755b575849b26b562045a9cb.tar
nixlib-d4b5df711a08f773755b575849b26b562045a9cb.tar.gz
nixlib-d4b5df711a08f773755b575849b26b562045a9cb.tar.bz2
nixlib-d4b5df711a08f773755b575849b26b562045a9cb.tar.lz
nixlib-d4b5df711a08f773755b575849b26b562045a9cb.tar.xz
nixlib-d4b5df711a08f773755b575849b26b562045a9cb.tar.zst
nixlib-d4b5df711a08f773755b575849b26b562045a9cb.zip
ghcHEAD: Force INTEGER_LIBRARY like the other GHCs
We really need to abstract to avoid these copy-paste errors.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/head.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index af5efbd7df8c..dcb1aabaf09a 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -32,6 +32,8 @@
   ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
 }:
 
+assert !enableIntegerSimple -> gmp != null;
+
 let
   inherit (stdenv) buildPlatform hostPlatform targetPlatform;
 
@@ -48,8 +50,7 @@ let
     include mk/flavours/\$(BuildFlavour).mk
     endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
-  '' + stdenv.lib.optionalString enableIntegerSimple ''
-    INTEGER_LIBRARY = integer-simple
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
   '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
     Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}