diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/8.2.2.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 0e87ea68649ed..6eeff74160b4a 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -22,6 +22,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.2.2"; @@ -35,15 +41,12 @@ stdenv.mkDerivation (rec { postPatch = "patchShebangs ."; 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 - '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) '' - sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk ''; buildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ] ++ stdenv.lib.optionals (targetPlatform.isArm || targetPlatform.isAarch64) [ llvm_39 ]; |