2010-07-08 12:43:06 +01:00
|
|
|
{stdenv, fetchurl, ghc, perl, gmp, ncurses}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "6.12.3";
|
2011-08-08 20:47:31 +01:00
|
|
|
|
2010-07-08 12:43:06 +01:00
|
|
|
name = "ghc-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://darcs.haskell.org/download/dist/${version}/${name}-src.tar.bz2";
|
|
|
|
sha256 = "0s2y1sv2nq1cgliv735q2w3gg4ykv1c0g1adbv8wgwhia10vxgbc";
|
|
|
|
};
|
|
|
|
|
2015-01-14 21:16:44 +00:00
|
|
|
buildInputs = [ghc perl gmp ncurses];
|
2010-07-08 12:43:06 +01:00
|
|
|
|
|
|
|
buildMK = ''
|
2015-10-15 16:43:23 +01:00
|
|
|
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"
|
2015-10-05 19:32:54 +01:00
|
|
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
2016-02-01 17:16:50 +00:00
|
|
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
2010-07-08 12:43:06 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
echo "${buildMK}" > mk/build.mk
|
|
|
|
'';
|
|
|
|
|
2015-03-14 12:32:03 +00:00
|
|
|
configureFlags = [
|
2014-12-17 18:11:30 +00:00
|
|
|
"--with-gcc=${stdenv.cc}/bin/gcc"
|
2010-07-08 12:43:06 +01:00
|
|
|
];
|
|
|
|
|
2014-05-30 22:10:19 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
|
|
|
|
|
2010-07-08 12:43:06 +01:00
|
|
|
# required, because otherwise all symbols from HSffi.o are stripped, and
|
|
|
|
# that in turn causes GHCi to abort
|
|
|
|
stripDebugFlags=["-S" "--keep-file-symbols"];
|
|
|
|
|
|
|
|
meta = {
|
2011-08-08 20:47:21 +01:00
|
|
|
homepage = "http://haskell.org/ghc";
|
2010-07-08 12:43:06 +01:00
|
|
|
description = "The Glasgow Haskell Compiler";
|
2016-05-16 21:30:20 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
2015-03-25 14:45:20 +00:00
|
|
|
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported.
|
|
|
|
inherit (ghc.meta) license;
|
2016-03-30 09:57:22 +01:00
|
|
|
broken = true; # broken by gcc 5.x: http://hydra.nixos.org/build/33627548
|
2010-07-08 12:43:06 +01:00
|
|
|
};
|
|
|
|
}
|