Skip to content

Commit

Permalink
ghc-7.6.3 buildable on MacOSX darwin system with hard-coded platform …
Browse files Browse the repository at this point in the history
…information
  • Loading branch information
wavewave committed Jan 10, 2014
1 parent f5a7212 commit a22fa75
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/development/compilers/ghc/7.6.3.nix
Expand Up @@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
url = "http://haskell.org/ghc/dist/${version}/${name}-src.tar.bz2";
sha256 = "1669m8k9q72rpd2mzs0bh2q6lcwqiwd1ax3vrard1dgn64yq4hxx";
};

patches = [ ./fixMACOSXplatform763.patch ];
buildInputs = [ ghc perl gmp ncurses ];

enableParallelBuilding = true;
Expand All @@ -19,10 +19,14 @@ stdenv.mkDerivation rec {
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
'';

preConfigure = ''
preConfigure = if !stdenv.isDarwin then ''
echo "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
''
else ''
echo "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'';

configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
Expand Down
16 changes: 16 additions & 0 deletions pkgs/development/compilers/ghc/fixMACOSXplatform763.patch
@@ -0,0 +1,16 @@
diff -Naur a/configure b/configure
--- a/configure 2013-04-19 00:47:00.000000000 +0200
+++ b/configure 2014-01-10 11:50:13.000000000 +0100
@@ -4840,9 +4840,9 @@
fi
fi

-
-
-
+MACOSX_DEPLOYMENT_VERSION=10.9

This comment has been minimized.

Copy link
@peti

peti Jan 17, 2014

Member

How will this build affect people trying to compile GHC on a version of Darwin that's older than 10.9?

This comment has been minimized.

Copy link
@wavewave

wavewave Jan 19, 2014

Author Contributor

i am not sure yet. On my machine which is actually darwin 10.8, it was working.

+FP_MACOSX_DEPLOYMENT_TARGET=10.9
+MACOSX_DEPLOYMENT_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOSX_DEPLOYMENT_VERSION}.sdk



0 comments on commit a22fa75

Please sign in to comment.