2008-07-22 14:02:11 +01:00
|
|
|
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses, haddock}:
|
2008-06-04 10:42:25 +01:00
|
|
|
|
2009-04-16 23:00:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2009-04-18 17:21:59 +01:00
|
|
|
version = "6.8.3";
|
|
|
|
name = "ghc-${version}";
|
2008-06-04 10:42:25 +01:00
|
|
|
homepage = "http://www.haskell.org/ghc";
|
|
|
|
|
|
|
|
src = map fetchurl [
|
2009-04-18 17:21:59 +01:00
|
|
|
{ url = "${homepage}/dist/${version}/${name}-src.tar.bz2";
|
2008-07-21 15:43:33 +01:00
|
|
|
sha256 = "1fc1ff82a555532f1c9d2dc628fd9de5e6ebab2ce6ee9490a34174ceb6f76e6b";
|
2008-06-04 10:42:25 +01:00
|
|
|
}
|
2009-04-18 17:21:59 +01:00
|
|
|
{ url = "${homepage}/dist/${version}/${name}-src-extralibs.tar.bz2";
|
2008-07-21 15:43:33 +01:00
|
|
|
sha256 = "ee2f5ba6a46157fc53eae515cb6fa1ed3c5023e7eac15981d92af0af00ee2ba2";
|
2008-06-04 10:42:25 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2008-07-22 14:02:11 +01:00
|
|
|
buildInputs = [ghc readline perl m4 gmp haddock];
|
2008-06-04 10:42:25 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Glasgow Haskell Compiler";
|
2013-03-23 12:05:43 +00:00
|
|
|
inherit (ghc.meta) license platforms;
|
2008-06-04 10:42:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags=[
|
|
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
|
|
"--with-gmp-includes=${gmp}/include"
|
|
|
|
"--with-readline-libraries=${readline}/lib"
|
2009-04-16 20:25:22 +01:00
|
|
|
"--with-gcc=${stdenv.gcc}/bin/gcc"
|
2008-06-04 10:42:25 +01:00
|
|
|
];
|
|
|
|
|
2008-07-22 14:02:11 +01:00
|
|
|
preConfigure = ''
|
2008-06-04 10:42:25 +01:00
|
|
|
# still requires a hack for ncurses
|
2008-07-22 14:02:11 +01: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-16 23:00:41 +01:00
|
|
|
}
|