2007-11-17 16:30:00 +01:00
|
|
|
args: with args;
|
2007-10-19 15:24:29 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2008-01-15 01:55:21 +01:00
|
|
|
name = "ghc-6.8.2";
|
2007-10-19 15:24:29 +02:00
|
|
|
homepage = "http://www.haskell.org/ghc";
|
|
|
|
|
|
|
|
src = map fetchurl [
|
|
|
|
{ url = "${homepage}/dist/stable/dist/${name}-src.tar.bz2";
|
2008-01-15 01:55:21 +01:00
|
|
|
md5 = "745c6b7d4370610244419cbfec4b2f84";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
|
|
|
{ url = "${homepage}/dist/stable/dist/${name}-src-extralibs.tar.bz2";
|
2008-01-15 01:55:21 +01:00
|
|
|
md5 = "d199c50814188fb77355d41058b8613c";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2008-01-15 01:55:21 +01:00
|
|
|
buildInputs = [ghc readline perl m4 gmp];
|
2007-10-19 15:24:29 +02:00
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
meta = {
|
2008-01-15 01:55:21 +01:00
|
|
|
description = "The Glasgow Haskell Compiler";
|
2007-10-19 15:24:29 +02:00
|
|
|
};
|
|
|
|
|
2008-01-15 01:55:21 +01:00
|
|
|
postInstall = ''
|
|
|
|
ensureDir "$out/nix-support"
|
|
|
|
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
|
|
|
|
echo "ghc=$out" >> $out/nix-support/setup-hook
|
|
|
|
echo "" >> $out/nix-support/setup-hook
|
|
|
|
cat $setupHook >> $out/nix-support/setup-hook
|
|
|
|
'';
|
2007-10-19 15:24:29 +02:00
|
|
|
|
2008-01-15 15:32:10 +01:00
|
|
|
configureFlags=[
|
|
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
|
|
"--with-readline-libraries=${readline}/lib"
|
|
|
|
"--with-gmp-includes=${gmp}/include"
|
|
|
|
"--with-gcc=${gcc}/bin/gcc"
|
|
|
|
];
|
|
|
|
|
2007-10-19 15:24:29 +02:00
|
|
|
preConfigure = "
|
2008-01-15 01:55:21 +01:00
|
|
|
# still requires a hack for ncurses
|
|
|
|
sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in
|
2007-10-19 15:24:29 +02:00
|
|
|
";
|
|
|
|
|
2007-11-17 16:30:00 +01:00
|
|
|
dontStrip = 1;
|
2008-01-15 01:55:21 +01:00
|
|
|
inherit (stdenv) gcc;
|
|
|
|
inherit readline gmp ncurses;
|
2007-10-19 15:24:29 +02:00
|
|
|
})
|