mirror of
https://github.com/NixOS/nixpkgs
synced 2024-10-19 03:47:13 -04:00
d182df5526
rebuild all of GHC every time the setup hook changes. Thus its better to factor it out. (After all, the setup hook doesn't have to be provided by the GHC package proper; it can also be provided by some helper package.) svn path=/nixpkgs/trunk/; revision=15094
38 lines
1,011 B
Nix
38 lines
1,011 B
Nix
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
|
|
|
|
stdenv.mkDerivation (rec {
|
|
version = "6.8.2";
|
|
name = "ghc-${version}";
|
|
homepage = "http://www.haskell.org/ghc";
|
|
|
|
src = map fetchurl [
|
|
{ url = "${homepage}/dist/${version}/${name}-src.tar.bz2";
|
|
sha256 = "2d10f973c35e8d7d9f62b53e26fef90177a9a15105cda4b917340ba7696a22d9";
|
|
}
|
|
{ url = "${homepage}/dist/${version}/${name}-src-extralibs.tar.bz2";
|
|
md5 = "d199c50814188fb77355d41058b8613c";
|
|
}
|
|
];
|
|
|
|
buildInputs = [ghc readline perl m4 gmp];
|
|
|
|
meta = {
|
|
description = "The Glasgow Haskell Compiler";
|
|
};
|
|
|
|
configureFlags=[
|
|
"--with-gmp-libraries=${gmp}/lib"
|
|
"--with-gmp-includes=${gmp}/include"
|
|
"--with-readline-libraries=${readline}/lib"
|
|
"--with-gcc=${gcc}/bin/gcc"
|
|
];
|
|
|
|
preConfigure = "
|
|
# still requires a hack for ncurses
|
|
sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in
|
|
";
|
|
|
|
inherit (stdenv) gcc;
|
|
inherit readline gmp ncurses;
|
|
})
|