summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/9.4.3.nix
diff options
context:
space:
mode:
authorSamir Talwar <samir@functional.computer>2023-08-07 13:32:23 +0200
committersternenseemann <sternenseemann@systemli.org>2023-08-07 13:53:26 +0200
commitf6f780f129f50df536fb301b9dac554f9744ab4b (patch)
treeb81fa37313d55890816b15a8247199f87397da93 /pkgs/development/compilers/ghc/9.4.3.nix
parent557117947db4de93124b00984f2c73e75bafde18 (diff)
downloadnixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.tar
nixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.tar.gz
nixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.tar.bz2
nixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.tar.lz
nixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.tar.xz
nixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.tar.zst
nixpkgs-f6f780f129f50df536fb301b9dac554f9744ab4b.zip
haskell.compiler.ghc94*: apply Cabal cycle patch on aarch64-darwin
This was already applied to GHC 9.2.x, but was not copied to GHC 9.4.x.
I have had issues with this locally.

The same patch works for both Cabal 3.6 and 3.8, so we can just reuse it.
Diffstat (limited to 'pkgs/development/compilers/ghc/9.4.3.nix')
-rw-r--r--pkgs/development/compilers/ghc/9.4.3.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/9.4.3.nix b/pkgs/development/compilers/ghc/9.4.3.nix
index 127f14fe484..c1fd0796967 100644
--- a/pkgs/development/compilers/ghc/9.4.3.nix
+++ b/pkgs/development/compilers/ghc/9.4.3.nix
@@ -196,6 +196,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 .";