about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
index 40b57223fa1d..a8f05d6f15c1 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
@@ -57,7 +57,7 @@
 
 , # Whether to disable the large address space allocator
   # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
-  disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
+  disableLargeAddressSpace ? stdenv.targetPlatform.isiOS
 }:
 
 assert !enableIntegerSimple -> gmp != null;
@@ -212,6 +212,15 @@ stdenv.mkDerivation (rec {
       url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch";
       sha256 = "0r4zjj0bv1x1m2dgxp3adsf2xkr94fjnyj1igsivd9ilbs5ja0b5";
     })
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.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-paths.patch
   ];
 
   postPatch = "patchShebangs .";