From 981dbc35d14676e804462136a7698c6fcfe694fc Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Sat, 28 Mar 2015 23:45:28 -0400 Subject: [PATCH] ghc-7.10.1: cherry-pick Cabal bugfix for GHCJS --- pkgs/development/compilers/ghc/7.10.1.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/7.10.1.nix b/pkgs/development/compilers/ghc/7.10.1.nix index 629ac69d36f..5bec1fa3f55 100644 --- a/pkgs/development/compilers/ghc/7.10.1.nix +++ b/pkgs/development/compilers/ghc/7.10.1.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv }: let @@ -13,6 +13,13 @@ let ''} ''; + # We patch Cabal for GHCJS. See: https://github.com/haskell/cabal/issues/2454 + # This should be removed when GHC includes Cabal > 1.22.2.0 + cabalPatch = fetchpatch { + url = https://github.com/haskell/cabal/commit/f11b7c858bb25be78b81413c69648c87c446859e.patch; + sha256 = "1z56yyc7lgc78g847qf19f5n1yk054pzlnc2i178dpsj0mgjppyb"; + }; + in stdenv.mkDerivation rec { @@ -28,9 +35,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # We patch Cabal for GHCJS. See: https://github.com/haskell/cabal/issues/2454 + postPatch = '' + pushd libraries/Cabal + patch -p1 < ${cabalPatch} + popd + ''; + preConfigure = '' - sed -i 's/HcPkg.useSingleFileDb = .*/HcPkg.useSingleFileDb = False/' libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs echo >mk/build.mk "${buildMK}" sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''