2015-01-19 12:12:28 +01:00
|
|
|
{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
|
2010-09-28 15:48:22 +02:00
|
|
|
|
2015-01-16 19:31:34 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
buildMK = ''
|
|
|
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
|
|
|
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
|
|
|
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
|
|
|
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
|
|
|
|
DYNAMIC_BY_DEFAULT = NO
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2010-09-28 15:48:22 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-01-19 12:12:28 +01:00
|
|
|
version = "7.11.20150118";
|
2010-09-28 15:48:22 +02:00
|
|
|
name = "ghc-${version}";
|
2011-08-08 21:47:31 +02:00
|
|
|
|
2010-09-28 15:48:22 +02:00
|
|
|
src = fetchurl {
|
2015-02-03 16:59:39 +01:00
|
|
|
url = "http://deb.haskell.org/dailies/2015-01-18/ghc_${version}.orig.tar.bz2";
|
2015-01-19 12:12:28 +01:00
|
|
|
sha256 = "1zy960q2faq03camq2n4834bd748vkc15h83bapswc68dqncqj20";
|
2010-09-28 15:48:22 +02:00
|
|
|
};
|
|
|
|
|
2015-01-16 19:31:34 +01:00
|
|
|
buildInputs = [ ghc perl ];
|
2010-09-28 15:48:22 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
2015-01-16 19:31:34 +01:00
|
|
|
echo >mk/build.mk "${buildMK}"
|
2011-12-16 19:11:23 +01:00
|
|
|
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
2014-03-22 10:44:35 +01:00
|
|
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
2013-10-26 18:33:09 +02:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
|
2010-09-28 15:48:22 +02:00
|
|
|
'';
|
|
|
|
|
2014-12-18 17:31:37 +01:00
|
|
|
configureFlags = [
|
2014-12-17 19:11:30 +01:00
|
|
|
"--with-gcc=${stdenv.cc}/bin/cc"
|
2014-12-18 17:31:37 +01:00
|
|
|
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2010-09-28 15:48:22 +02:00
|
|
|
|
|
|
|
# required, because otherwise all symbols from HSffi.o are stripped, and
|
|
|
|
# that in turn causes GHCi to abort
|
2013-08-11 22:08:26 +02:00
|
|
|
stripDebugFlags = [ "-S" "--keep-file-symbols" ];
|
2010-09-28 15:48:22 +02:00
|
|
|
|
|
|
|
meta = {
|
2011-12-16 19:11:23 +01:00
|
|
|
homepage = "http://haskell.org/ghc";
|
2010-09-28 15:48:22 +02:00
|
|
|
description = "The Glasgow Haskell Compiler";
|
2014-12-18 17:31:37 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
|
2013-03-23 13:05:43 +01:00
|
|
|
inherit (ghc.meta) license platforms;
|
2010-09-28 15:48:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|