2007-11-17 16:30:00 +01:00
|
|
|
args: with args;
|
2007-10-19 15:24:29 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2007-11-17 16:30:00 +01:00
|
|
|
name = "ghc-6.8.1";
|
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";
|
2007-11-17 16:30:00 +01:00
|
|
|
sha256 = "16gr19bwyjv0fmjdrsj79vqpaxxg5hasni94nwv9d6c85n5myivz";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
|
|
|
{ url = "${homepage}/dist/stable/dist/${name}-src-extralibs.tar.bz2";
|
2007-11-17 16:30:00 +01:00
|
|
|
sha256 = "1h3nc6x4g838mdcirymadmv3fsmp1wh062syb3a8aqv6f468akvm";
|
2007-10-19 15:24:29 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2007-11-17 16:30:00 +01:00
|
|
|
buildInputs = [ghc readline perl m4 pkgconfig gtk];
|
|
|
|
patchPhase = "
|
|
|
|
sed -e s@/bin/cat@\$(type -p cat)@ -i configure
|
|
|
|
";
|
2007-10-19 15:24:29 +02:00
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
meta = {
|
2007-11-17 16:30:00 +01:00
|
|
|
description = "The Glasgow Haskell Compiler v6.8.1";
|
2007-10-19 15:24:29 +02: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-11-17 16:30:00 +01:00
|
|
|
#configureFlags="--with-gmp-libraries=${gmp}/lib --with-readline-libraries=${readline}/lib";
|
2007-10-19 15:24:29 +02:00
|
|
|
|
|
|
|
# the presence of this file makes Cabal cry for happy while generating makefiles ...
|
|
|
|
preConfigure = "
|
|
|
|
echo 'GhcThreaded=NO' > mk/build.mk
|
|
|
|
rm libraries/haskell-src/Language/Haskell/Parser.ly
|
|
|
|
";
|
|
|
|
|
2007-11-17 16:30:00 +01:00
|
|
|
dontStrip = 1;
|
2007-10-19 15:24:29 +02:00
|
|
|
})
|