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.

authored by Samir Talwar and committed by sternenseemann f6f780f1 55711794

+37 -5
+1 -1
pkgs/development/compilers/ghc/9.2.4.nix
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 - ./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
+1 -1
pkgs/development/compilers/ghc/9.2.5.nix
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 - ./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
+1 -1
pkgs/development/compilers/ghc/9.2.6.nix
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 - ./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
+1 -1
pkgs/development/compilers/ghc/9.2.7.nix
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 - ./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
+1 -1
pkgs/development/compilers/ghc/9.2.8.nix
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 - ./Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
··· 216 # These cause problems as they're not eliminated by GHC's dead code 217 # elimination on aarch64-darwin. (see 218 # https://github.com/NixOS/nixpkgs/issues/140774 for details). 219 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 220 ]; 221 222 postPatch = "patchShebangs .";
+8
pkgs/development/compilers/ghc/9.4.2.nix
··· 196 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 197 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 198 }) 199 ]; 200 201 postPatch = "patchShebangs .";
··· 196 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 197 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 198 }) 199 + ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ 200 + # Prevent the paths module from emitting symbols that we don't use 201 + # when building with separate outputs. 202 + # 203 + # These cause problems as they're not eliminated by GHC's dead code 204 + # elimination on aarch64-darwin. (see 205 + # https://github.com/NixOS/nixpkgs/issues/140774 for details). 206 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 207 ]; 208 209 postPatch = "patchShebangs .";
+8
pkgs/development/compilers/ghc/9.4.3.nix
··· 196 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 197 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 198 }) 199 ]; 200 201 postPatch = "patchShebangs .";
··· 196 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 197 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 198 }) 199 + ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ 200 + # Prevent the paths module from emitting symbols that we don't use 201 + # when building with separate outputs. 202 + # 203 + # These cause problems as they're not eliminated by GHC's dead code 204 + # elimination on aarch64-darwin. (see 205 + # https://github.com/NixOS/nixpkgs/issues/140774 for details). 206 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 207 ]; 208 209 postPatch = "patchShebangs .";
+8
pkgs/development/compilers/ghc/9.4.4.nix
··· 205 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 206 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 207 }) 208 ]; 209 210 postPatch = "patchShebangs .";
··· 205 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 206 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 207 }) 208 + ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ 209 + # Prevent the paths module from emitting symbols that we don't use 210 + # when building with separate outputs. 211 + # 212 + # These cause problems as they're not eliminated by GHC's dead code 213 + # elimination on aarch64-darwin. (see 214 + # https://github.com/NixOS/nixpkgs/issues/140774 for details). 215 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 216 ]; 217 218 postPatch = "patchShebangs .";
+8
pkgs/development/compilers/ghc/9.4.5.nix
··· 205 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 206 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 207 }) 208 ]; 209 210 postPatch = "patchShebangs .";
··· 205 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 206 sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 207 }) 208 + ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ 209 + # Prevent the paths module from emitting symbols that we don't use 210 + # when building with separate outputs. 211 + # 212 + # These cause problems as they're not eliminated by GHC's dead code 213 + # elimination on aarch64-darwin. (see 214 + # https://github.com/NixOS/nixpkgs/issues/140774 for details). 215 + ./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch 216 ]; 217 218 postPatch = "patchShebangs .";
pkgs/development/compilers/ghc/Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch pkgs/development/compilers/ghc/Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch