2008-07-31 14:36:47 +02:00
|
|
|
{stdenv, fetchurl, readline, ghc, happy, alex, perl, m4, gmp, ncurses, haskellEditline}:
|
2007-10-19 15:24:29 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2008-07-31 14:36:47 +02:00
|
|
|
name = "ghc-6.9.20080719";
|
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";
|
2008-07-31 14:36:47 +02:00
|
|
|
sha256 = "ed2371c3632962fccab6ec60c04e9fc6a38f3ade3a30a464cea5d53784bc3a34";
|
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";
|
2008-07-31 14:36:47 +02:00
|
|
|
sha256 = "d3c7aa7d53befe268f92148cc8f3b0861dfdc84e9b21b039af0f5b230bfbf72b";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2008-07-31 14:36:47 +02:00
|
|
|
buildInputs = [ghc readline perl m4 gmp happy alex haskellEditline];
|
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 = ''
|
|
|
|
# should not be present in a clean distribution
|
|
|
|
rm utils/pwd/pwd
|
2008-07-31 14:36:47 +02:00
|
|
|
# fix bug in makefile
|
|
|
|
sed -i -e 's/:\\"//' -e 's/\\"//' mk/config.mk.in
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/lib/${name}/ghc $out/lib/${name}/${name}
|
2008-07-21 16:43:33 +02:00
|
|
|
'';
|
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;
|
|
|
|
})
|