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