2008-03-02 09:22:26 +01:00
|
|
|
{stdenv, fetchurl, readline, ghc, perl58, m4, gmp, ncurses}:
|
2007-05-06 17:39:39 +02:00
|
|
|
|
2008-01-09 14:08:36 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2007-05-06 17:39:39 +02:00
|
|
|
name = "ghc-6.6.1";
|
|
|
|
|
|
|
|
src = map fetchurl [
|
|
|
|
{ url = http://www.haskell.org/ghc/dist/6.6.1/ghc-6.6.1-src.tar.bz2;
|
2007-06-02 19:15:19 +02:00
|
|
|
md5 = "ba9f4aec2fde5ff1e1548ae69b78aeb0";
|
2007-05-06 17:39:39 +02:00
|
|
|
}
|
|
|
|
{ url = http://www.haskell.org/ghc/dist/6.6.1/ghc-6.6.1-src-extralibs.tar.bz2;
|
|
|
|
md5 = "43a26b81608b206c056adc3032f7da2a";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2008-03-02 09:22:26 +01:00
|
|
|
buildInputs = [ghc readline perl58 m4 gmp];
|
2007-05-06 17:39:39 +02:00
|
|
|
|
|
|
|
meta = {
|
2008-01-09 14:08:36 +01:00
|
|
|
description = "The Glasgow Haskell Compiler";
|
2013-03-23 13:05:43 +01:00
|
|
|
inherit (ghc.meta) license platforms;
|
2007-05-06 17:39:39 +02:00
|
|
|
};
|
2007-08-15 13:25:20 +02:00
|
|
|
|
2008-01-09 14:08:36 +01:00
|
|
|
postInstall = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/nix-support"
|
2008-01-09 14:08:36 +01:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags=[
|
|
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
|
|
"--with-readline-libraries=${readline}/lib"
|
|
|
|
"--with-gmp-includes=${gmp}/include"
|
|
|
|
"--with-gcc=${gcc}/bin/gcc"
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# still requires a hack for ncurses
|
|
|
|
sed -i "s|^\(library-dirs.*$\)|\1 \"${ncurses}/lib\"|" libraries/readline/package.conf.in
|
2008-03-02 09:22:26 +01:00
|
|
|
# fix for gcc 4.2
|
|
|
|
echo "SplitObjs=NO" >> mk/build.mk
|
2008-01-09 14:08:36 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
inherit (stdenv) gcc;
|
2007-08-15 13:25:20 +02:00
|
|
|
inherit readline gmp ncurses;
|
2008-01-09 14:08:36 +01:00
|
|
|
})
|