Skip to content

Commit

Permalink
haskell.compiler.ghc94*: apply Cabal cycle patch on aarch64-darwin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SamirTalwar authored and sternenseemann committed Aug 7, 2023
1 parent 5571179 commit f6f780f
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/9.2.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ stdenv.mkDerivation (rec {
# 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-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];

postPatch = "patchShebangs .";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/9.2.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ stdenv.mkDerivation (rec {
# 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-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];

postPatch = "patchShebangs .";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/9.2.6.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ stdenv.mkDerivation (rec {
# 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-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];

postPatch = "patchShebangs .";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/9.2.7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ stdenv.mkDerivation (rec {
# 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-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];

postPatch = "patchShebangs .";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/9.2.8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ stdenv.mkDerivation (rec {
# 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-paths-fix-cycle-aarch64-darwin.patch
./Cabal-3.6-3.8-paths-fix-cycle-aarch64-darwin.patch
];

postPatch = "patchShebangs .";
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/compilers/ghc/9.4.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 .";
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/compilers/ghc/9.4.3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 .";
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/compilers/ghc/9.4.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,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 .";
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/compilers/ghc/9.4.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,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 .";
Expand Down

0 comments on commit f6f780f

Please sign in to comment.