about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/common-make-native-bignum.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/ghc/common-make-native-bignum.nix')
-rw-r--r--pkgs/development/compilers/ghc/common-make-native-bignum.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/development/compilers/ghc/common-make-native-bignum.nix b/pkgs/development/compilers/ghc/common-make-native-bignum.nix
index a26336ac6fe8..7593a175c77c 100644
--- a/pkgs/development/compilers/ghc/common-make-native-bignum.nix
+++ b/pkgs/development/compilers/ghc/common-make-native-bignum.nix
@@ -35,7 +35,9 @@
 , # If enabled, use -fPIC when compiling static libs.
   enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
 
-, enableProfiledLibs ? true
+  # Exceeds Hydra output limit (at the time of writing ~3GB) when cross compiled to riscv64.
+  # A riscv64 cross-compiler fits into the limit comfortably.
+, enableProfiledLibs ? !stdenv.hostPlatform.isRiscV64
 
 , # Whether to build dynamic libs for the standard library (on the target
   # platform). Static libs are always built.
@@ -363,13 +365,13 @@ stdenv.mkDerivation (rec {
   ''
   + lib.optionalString (lib.versionOlder version "9.2" || lib.versionAtLeast version "9.4") ''
     sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
-  '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
+  '' + lib.optionalString (stdenv.hostPlatform.isLinux && hostPlatform.libc == "glibc") ''
     export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
-  '' + lib.optionalString (!stdenv.isDarwin) ''
+  '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
     export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
-  '' + lib.optionalString stdenv.isDarwin ''
+  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
     export NIX_LDFLAGS+=" -no_dtrace_dof"
-  '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast version "9.2") ''
+  '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "9.2") ''
 
     # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7
     export XATTR=${lib.getBin xattr}/bin/xattr
@@ -445,11 +447,11 @@ stdenv.mkDerivation (rec {
     perl autoconf automake m4 python3
     bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
     bootPkgs.ghc-settings-edit
-  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
     autoSignDarwinBinariesHook
   ] ++ lib.optionals enableDocs [
     sphinx
-  ] ++ lib.optionals (stdenv.isDarwin && lib.versions.majorMinor version == "9.0") [
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versions.majorMinor version == "9.0") [
     # TODO(@sternenseemann): backport addition of XATTR env var like
     # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447
     xattr