diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/7.8.4.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/7.8.4.nix | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/compilers/ghc/7.8.4.nix b/pkgs/development/compilers/ghc/7.8.4.nix index f41a1cf7d98d..057b9f70fc78 100644 --- a/pkgs/development/compilers/ghc/7.8.4.nix +++ b/pkgs/development/compilers/ghc/7.8.4.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, ghc, perl, ncurses, libiconv + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp +}: stdenv.mkDerivation (rec { version = "7.8.4"; @@ -11,13 +16,12 @@ stdenv.mkDerivation (rec { patches = [ ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; enableParallelBuilding = true; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" DYNAMIC_BY_DEFAULT = NO @@ -25,7 +29,12 @@ stdenv.mkDerivation (rec { libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" ''} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); preConfigure = '' echo "${buildMK}" > mk/build.mk |