From 52c8d7c4ab0b2b2c97faa848b98dfc0ae9b69d7b Mon Sep 17 00:00:00 2001 From: Joel Taylor Date: Wed, 11 Feb 2015 14:30:37 -0800 Subject: [PATCH] Build GHC HEAD from git checkout --- pkgs/development/compilers/ghc/head.nix | 20 ++++++++++++++------ pkgs/top-level/haskell-ng.nix | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index cd1c89886291..9d7cd4482d2f 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses }: +{ stdenv, fetchgit, ghc, perl, gmp, ncurses, autoconf, automake, happy, alex }: let @@ -15,13 +15,21 @@ in stdenv.mkDerivation rec { version = "7.11.20150118"; name = "ghc-${version}"; + rev = "6ff3db92140e3ac8cbda50d1a4aab976350ac8c4"; - src = fetchurl { - url = "http://deb.haskell.org/dailies/2015-01-18/ghc_${version}.orig.tar.bz2"; - sha256 = "1zy960q2faq03camq2n4834bd748vkc15h83bapswc68dqncqj20"; + src = fetchgit { + url = "git://git.haskell.org/ghc.git"; + inherit rev; + sha256 = "1a1r3nw7x5rd8563770zcg1phm55vi3sxs2zwr91ik026n8jjba6"; }; - buildInputs = [ ghc perl ]; + postUnpack = '' + pushd ghc-${builtins.substring 0 7 rev} + ./boot + popd + ''; + + buildInputs = [ ghc perl autoconf automake happy alex ]; preConfigure = '' echo >mk/build.mk "${buildMK}" @@ -39,7 +47,7 @@ stdenv.mkDerivation rec { # required, because otherwise all symbols from HSffi.o are stripped, and # that in turn causes GHCi to abort - stripDebugFlags = [ "-S" "--keep-file-symbols" ]; + stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols"; meta = { homepage = "http://haskell.org/ghc"; diff --git a/pkgs/top-level/haskell-ng.nix b/pkgs/top-level/haskell-ng.nix index 220fca90a53f..cdf96879d6ac 100644 --- a/pkgs/top-level/haskell-ng.nix +++ b/pkgs/top-level/haskell-ng.nix @@ -18,7 +18,7 @@ rec { ghc763 = callPackage ../development/compilers/ghc/7.6.3.nix { ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; ghc784 = callPackage ../development/compilers/ghc/7.8.4.nix { ghc = compiler.ghc742Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; ghc7101 = callPackage ../development/compilers/ghc/7.10.1.nix { ghc = compiler.ghc784; gmp = pkgs.gmp.override { withStatic = true; }; }; - ghcHEAD = callPackage ../development/compilers/ghc/head.nix { ghc = compiler.ghc784; gmp = pkgs.gmp.override { withStatic = true; }; }; + ghcHEAD = callPackage ../development/compilers/ghc/head.nix { inherit (packages.ghc784) ghc happy alex; gmp = pkgs.gmp.override { withStatic = true; }; }; ghc = compiler.ghc784; };