diff --git a/pkgs/development/compilers/ghc/7.10.1.nix b/pkgs/development/compilers/ghc/7.10.1.nix new file mode 100644 index 000000000000..f09de480c5d3 --- /dev/null +++ b/pkgs/development/compilers/ghc/7.10.1.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, ghc, perl, gmp, ncurses }: + +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 + +stdenv.mkDerivation rec { + version = "7.10.0.20141222"; + name = "ghc-${version}"; + + src = fetchurl { + url = "https://downloads.haskell.org/~ghc/7.10.1-rc1/ghc-7.10.0.20141222-src.tar.xz"; + sha256 = "0nncvvwksqqz1d991jbag3b4174i275nn0psadriq5hi3px11dkl"; + }; + + buildInputs = [ ghc perl ]; + + preConfigure = '' + echo >mk/build.mk "${buildMK}" + sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure + '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" + ''; + + configureFlags = [ + "--with-gcc=${stdenv.cc}/bin/cc" + "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib" + ]; + + enableParallelBuilding = true; + + # required, because otherwise all symbols from HSffi.o are stripped, and + # that in turn causes GHCi to abort + stripDebugFlags = [ "-S" "--keep-file-symbols" ]; + + meta = { + homepage = "http://haskell.org/ghc"; + description = "The Glasgow Haskell Compiler"; + maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ]; + inherit (ghc.meta) license platforms; + }; + +} diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 0f91e8591d1d..71b51cf64ff2 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, happy, alex }: +{ stdenv, fetchurl, ghc, perl, gmp, ncurses }: let @@ -13,12 +13,12 @@ let in stdenv.mkDerivation rec { - version = "7.10.0.20141222"; + version = "7.11.20150118"; name = "ghc-${version}"; src = fetchurl { - url = "https://downloads.haskell.org/~ghc/7.10.1-rc1/ghc-7.10.0.20141222-src.tar.xz"; - sha256 = "0nncvvwksqqz1d991jbag3b4174i275nn0psadriq5hi3px11dkl"; + url = "http://deb.haskell.org/dailies/2015-01-18/ghc_7.11.20150118.orig.tar.bz2"; + sha256 = "1zy960q2faq03camq2n4834bd748vkc15h83bapswc68dqncqj20"; }; buildInputs = [ ghc perl ]; diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.9.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix similarity index 98% rename from pkgs/development/haskell-modules/configuration-ghc-7.9.x.nix rename to pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index 37ebda6f2386..4dfb4ab96b9c 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.9.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -4,7 +4,7 @@ with import ./lib.nix { inherit pkgs; }; self: super: { - # Disable GHC 7.9.x core libraries. + # Disable GHC 7.10.x core libraries. array = null; base = null; binary = null; diff --git a/pkgs/development/haskell-modules/configuration-ghc-head.nix b/pkgs/development/haskell-modules/configuration-ghc-head.nix new file mode 100644 index 000000000000..4c4065e8889a --- /dev/null +++ b/pkgs/development/haskell-modules/configuration-ghc-head.nix @@ -0,0 +1,85 @@ +{ pkgs }: + +with import ./lib.nix { inherit pkgs; }; + +self: super: { + + # Disable GHC 7.11.x core libraries. + array = null; + base = null; + binary = null; + bin-package-db = null; + bytestring = null; + Cabal = null; + containers = null; + deepseq = null; + directory = null; + filepath = null; + ghc-prim = null; + haskeline = null; + hoopl = null; + hpc = null; + integer-gmp = null; + pretty = null; + process = null; + rts = null; + template-haskell = null; + terminfo = null; + time = null; + transformers = null; + unix = null; + xhtml = null; + + # We have Cabal 1.22.x. + jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; }; + + # GHC 7.10.x's Haddock binary cannot generate hoogle files. + # https://ghc.haskell.org/trac/ghc/ticket/9921 + mkDerivation = drv: super.mkDerivation (drv // { doHoogle = false; }); + + # haddock: No input file(s). + nats = dontHaddock super.nats; + + # These used to be core packages in GHC 7.8.x. + old-locale = self.old-locale_1_0_0_7; + old-time = self.old-time_1_1_0_3; + + # We have transformers 4.x + mtl = self.mtl_2_2_1; + transformers-compat = disableCabalFlag super.transformers-compat "three"; + + # We have time 1.5 + aeson = disableCabalFlag super.aeson "old-locale"; + + # Setup: At least the following dependencies are missing: base <4.8 + hspec-expectations = overrideCabal super.hspec-expectations (drv: { + patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal"; + }); + utf8-string = overrideCabal super.utf8-string (drv: { + patchPhase = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal"; + }); + + # bos/attoparsec#92 + attoparsec = dontCheck super.attoparsec; + + # test suite hangs silently for at least 10 minutes + split = dontCheck super.split; + + # Test suite fails with some (seemingly harmless) error. + # https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24 + syb = dontCheck super.syb; + + # Test suite has stricter version bounds + retry = dontCheck super.retry; + + # Test suite fails with time >= 1.5 + http-date = dontCheck super.http-date; + + # Version 1.19.5 fails its test suite. + happy = dontCheck super.happy; + + # Test suite hangs silently without consuming any CPU. + # https://github.com/ndmitchell/extra/issues/4 + extra = dontCheck super.extra; + +} diff --git a/pkgs/top-level/haskell-ng.nix b/pkgs/top-level/haskell-ng.nix index 19c70342c1b6..220fca90a53f 100644 --- a/pkgs/top-level/haskell-ng.nix +++ b/pkgs/top-level/haskell-ng.nix @@ -17,7 +17,8 @@ rec { ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix { ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; 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; }; }; - ghcHEAD = callPackage ../development/compilers/ghc/head.nix { inherit (packages.ghc784) ghc alex happy; }; + 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; }; }; ghc = compiler.ghc784; }; @@ -45,17 +46,18 @@ rec { ghc = compiler.ghc763; packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.6.x.nix { }; }; - ghc784 = callPackage ../development/haskell-modules { ghc = compiler.ghc784; packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.8.x.nix { }; }; - + ghc7101 = callPackage ../development/haskell-modules { + ghc = compiler.ghc7101; + packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { }; + }; ghcHEAD = callPackage ../development/haskell-modules { ghc = compiler.ghcHEAD; - packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-7.9.x.nix { }; + packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { }; }; - ghcjs = callPackage ../development/haskell-modules { packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { }; };