diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/7.2.2.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/7.2.2.nix | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/compilers/ghc/7.2.2.nix b/pkgs/development/compilers/ghc/7.2.2.nix index 31cac49135fc..b3f672a8ef56 100644 --- a/pkgs/development/compilers/ghc/7.2.2.nix +++ b/pkgs/development/compilers/ghc/7.2.2.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.2.2"; @@ -11,18 +16,22 @@ stdenv.mkDerivation rec { patches = [ ./fix-7.2.2-clang.patch ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; 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" ${stdenv.lib.optionalString stdenv.isDarwin '' 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 |