about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-04-09 00:23:59 +0200
committerGitHub <noreply@github.com>2022-04-09 00:23:59 +0200
commitc48167590e3258daac6ab12a41bc2b7341e9b2ec (patch)
tree0f1a723986f7cb230582263d0ed11d46e8c0fe5c
parentc52f8f2f5dd3f8641828edaefaab89a140e076d1 (diff)
parent8cb7f599f9e488f7e0ed320ab8d437b488ba079a (diff)
Merge pull request #167895 from hexagonal-sun/ghc902-fix-paths-on-aarch64-darwin
haskell.compiler.ghc902: fix seperate bin outputs on aarch64-darwin
-rw-r--r--pkgs/development/compilers/ghc/9.0.2.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix
index 0968b85399224..1f94dd3bbde29 100644
--- a/pkgs/development/compilers/ghc/9.0.2.nix
+++ b/pkgs/development/compilers/ghc/9.0.2.nix
@@ -192,6 +192,15 @@ stdenv.mkDerivation (rec {
       url = "https://gitlab.haskell.org/ghc/ghc/-/commit/c6132c782d974a7701e7f6447bdcd2bf6db4299a.patch?merge_request_iid=7423";
       sha256 = "sha256-b4feGZIaKDj/UKjWTNY6/jH4s2iate0wAgMxG3rAbZI=";
     })
+  ] ++ 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 .";