about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix b/nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix
index 1c63c1c23080..13d01a342637 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix
@@ -32,8 +32,7 @@
 , # If enabled, use -fPIC when compiling static libs.
   enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
 
-  # aarch64 outputs otherwise exceed 2GB limit
-, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64
+, enableProfiledLibs ? true
 
 , # Whether to build dynamic libs for the standard library (on the target
   # platform). Static libs are always built.
@@ -206,6 +205,14 @@ stdenv.mkDerivation (rec {
       url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
       sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
     })
+  ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
+    # Prevent the paths module from emitting symbols that we don't use
+    # when building with separate outputs.
+    #
+    # These cause problems as they're not eliminated by GHC's dead code
+    # elimination on aarch64-darwin. (see
+    # https://github.com/NixOS/nixpkgs/issues/140774 for details).
+    ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
   ];
 
   postPatch = "patchShebangs .";