about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/8.0.2.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/ghc/8.0.2.nix')
-rw-r--r--pkgs/development/compilers/ghc/8.0.2.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix
index bb706aa6bbc39..51e604190256f 100644
--- a/pkgs/development/compilers/ghc/8.0.2.nix
+++ b/pkgs/development/compilers/ghc/8.0.2.nix
@@ -21,6 +21,12 @@ let
   targetPrefix = stdenv.lib.optionalString
     (targetPlatform != hostPlatform)
     "${targetPlatform.config}-";
+
+  buildMK = stdenv.lib.optionalString enableIntegerSimple ''
+    INTEGER_LIBRARY = integer-simple
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    BuildFlavour = perf-cross
+  '';
 in
 stdenv.mkDerivation rec {
   version = "8.0.2";
@@ -42,13 +48,12 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "man" "doc" ];
 
   preConfigure = ''
+    echo "${buildMK}" > mk/build.mk
     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}"
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
   '' + stdenv.lib.optionalString stdenv.isDarwin ''
     export NIX_LDFLAGS+=" -no_dtrace_dof"
-  '' + stdenv.lib.optionalString enableIntegerSimple ''
-    echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk
   '';
 
   configureFlags = [