2008-07-22 15:02:11 +02:00
|
|
|
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses, haddock}:
|
2008-06-04 11:42:25 +02:00
|
|
|
|
2009-04-17 00:00:41 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2009-04-18 18:21:59 +02:00
|
|
|
version = "6.8.3";
|
|
|
|
name = "ghc-${version}";
|
2008-06-04 11:42:25 +02:00
|
|
|
homepage = "http://www.haskell.org/ghc";
|
|
|
|
|
|
|
|
src = map fetchurl [
|
2009-04-18 18:21:59 +02:00
|
|
|
{ url = "${homepage}/dist/${version}/${name}-src.tar.bz2";
|
2008-07-21 16:43:33 +02:00
|
|
|
sha256 = "1fc1ff82a555532f1c9d2dc628fd9de5e6ebab2ce6ee9490a34174ceb6f76e6b";
|
2008-06-04 11:42:25 +02:00
|
|
|
}
|
2009-04-18 18:21:59 +02:00
|
|
|
{ url = "${homepage}/dist/${version}/${name}-src-extralibs.tar.bz2";
|
2008-07-21 16:43:33 +02:00
|
|
|
sha256 = "ee2f5ba6a46157fc53eae515cb6fa1ed3c5023e7eac15981d92af0af00ee2ba2";
|
2008-06-04 11:42:25 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2008-07-22 15:02:11 +02:00
|
|
|
buildInputs = [ghc readline perl m4 gmp haddock];
|
2008-06-04 11:42:25 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Glasgow Haskell Compiler";
|
2013-03-23 13:05:43 +01:00
|
|
|
inherit (ghc.meta) license platforms;
|
2008-06-04 11:42:25 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags=[
|
|
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
|
|
"--with-gmp-includes=${gmp}/include"
|
|
|
|
"--with-readline-libraries=${readline}/lib"
|
2009-04-16 21:25:22 +02:00
|
|
|
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
2008-06-04 11:42:25 +02:00
|
|
|
];
|
|
|
|
|
2008-07-22 15:02:11 +02:00
|
|
|
preConfigure = ''
|
2008-06-04 11:42:25 +02:00
|
|
|
# still requires a hack for ncurses
|
2008-07-22 15:02:11 +02:00
|
|
|
sed -i "s|^\(ld-options.*$\)|\1 -L${ncurses}/lib|" libraries/readline/readline.buildinfo.in
|
|
|
|
# build haddock docs
|
|
|
|
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
|
|
|
'';
|
2009-04-17 00:00:41 +02:00
|
|
|
}
|