2007-10-19 14:24:29 +01:00
|
|
|
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2007-12-13 22:49:32 +00:00
|
|
|
name = "ghc-6.8.2";
|
2007-10-19 14:24:29 +01:00
|
|
|
homepage = "http://www.haskell.org/ghc";
|
|
|
|
|
|
|
|
src = map fetchurl [
|
|
|
|
{ url = "${homepage}/dist/stable/dist/${name}-src.tar.bz2";
|
2007-12-13 22:49:32 +00:00
|
|
|
md5 = "745c6b7d4370610244419cbfec4b2f84";
|
2007-10-19 14:24:29 +01:00
|
|
|
}
|
|
|
|
{ url = "${homepage}/dist/stable/dist/${name}-src-extralibs.tar.bz2";
|
2007-12-13 22:49:32 +00:00
|
|
|
md5 = "d199c50814188fb77355d41058b8613c";
|
2007-10-19 14:24:29 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2007-12-14 21:30:03 +00:00
|
|
|
buildInputs = [ghc readline perl m4 gmp];
|
2007-10-19 14:24:29 +01:00
|
|
|
|
2008-06-04 10:40:17 +01:00
|
|
|
# The setup hook is executed by other packages building with ghc.
|
|
|
|
# It then looks for package configurations that are available and
|
|
|
|
# build a package database on the fly.
|
2007-10-19 14:24:29 +01:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
meta = {
|
2007-12-13 22:49:32 +00:00
|
|
|
description = "The Glasgow Haskell Compiler";
|
2007-10-19 14:24:29 +01:00
|
|
|
};
|
|
|
|
|
2008-01-08 08:45:39 +00:00
|
|
|
configureFlags=[
|
|
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
|
|
"--with-gmp-includes=${gmp}/include"
|
2008-06-04 10:40:17 +01:00
|
|
|
"--with-readline-libraries=${readline}/lib"
|
2008-01-08 08:45:39 +00:00
|
|
|
"--with-gcc=${gcc}/bin/gcc"
|
|
|
|
];
|
2007-10-19 14:24:29 +01:00
|
|
|
|
|
|
|
preConfigure = "
|
2007-12-11 19:00:56 +00:00
|
|
|
# still requires a hack for ncurses
|
|
|
|
sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in
|
2007-10-19 14:24:29 +01:00
|
|
|
";
|
|
|
|
|
2008-01-08 08:45:39 +00:00
|
|
|
inherit (stdenv) gcc;
|
2007-10-19 14:24:29 +01:00
|
|
|
inherit readline gmp ncurses;
|
|
|
|
})
|