2007-10-19 15:24:29 +02:00
|
|
|
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2008-07-21 16:43:33 +02:00
|
|
|
name = "ghc-6.9.20080615";
|
2007-10-19 15:24:29 +02:00
|
|
|
homepage = "http://www.haskell.org/ghc";
|
|
|
|
|
|
|
|
src = map fetchurl [
|
2008-07-21 16:43:33 +02:00
|
|
|
{ url = "${homepage}/dist/current/dist/${name}-src.tar.bz2";
|
|
|
|
sha256 = "705a43506a4e4c2449c26eb5179c810dbeab7eda519c222670e67313eae167c1";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
2008-07-21 16:43:33 +02:00
|
|
|
{ url = "${homepage}/dist/current/dist/${name}-src-extralibs.tar.bz2";
|
|
|
|
sha256 = "39c573e57346069d80adff61cea239d382f66c43201948e4cee4305bb58eca88";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2007-12-14 22:30:03 +01:00
|
|
|
buildInputs = [ghc readline perl m4 gmp];
|
2007-10-19 15:24:29 +02:00
|
|
|
|
2008-06-04 11:40:17 +02: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 15:24:29 +02:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
meta = {
|
2007-12-13 23:49:32 +01:00
|
|
|
description = "The Glasgow Haskell Compiler";
|
2007-10-19 15:24:29 +02:00
|
|
|
};
|
|
|
|
|
2008-01-08 09:45:39 +01:00
|
|
|
configureFlags=[
|
|
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
|
|
"--with-gmp-includes=${gmp}/include"
|
2008-06-04 11:40:17 +02:00
|
|
|
"--with-readline-libraries=${readline}/lib"
|
2008-01-08 09:45:39 +01:00
|
|
|
"--with-gcc=${gcc}/bin/gcc"
|
|
|
|
];
|
2007-10-19 15:24:29 +02:00
|
|
|
|
2008-07-21 16:43:33 +02:00
|
|
|
# preConfigure = "
|
|
|
|
# # still requires a hack for ncurses
|
|
|
|
# sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in
|
|
|
|
# ";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# should not be present in a clean distribution
|
|
|
|
rm utils/pwd/pwd
|
|
|
|
'';
|
2007-10-19 15:24:29 +02:00
|
|
|
|
2008-01-08 09:45:39 +01:00
|
|
|
inherit (stdenv) gcc;
|
2007-10-19 15:24:29 +02:00
|
|
|
inherit readline gmp ncurses;
|
|
|
|
})
|