diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/head.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 9b4c932eb1150..18a00202dc2e1 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -26,6 +26,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 { inherit version rev; @@ -40,18 +46,15 @@ stdenv.mkDerivation (rec { postPatch = "patchShebangs ."; preConfigure = '' + echo "${buildMK}" > mk/build.mk echo ${version} >VERSION echo ${rev} >GIT_COMMIT_ID ./boot 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 - '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) '' - sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk ''; buildInputs = [ ghc perl autoconf automake happy alex python3 ]; |