Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pkgs/development/compilers/ghc/9.6.3-binary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ stdenv.mkDerivation rec {
isScript "$i" || continue
sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i"
done
'' + lib.optionalString stdenv.targetPlatform.isDarwin ''
# Work around building with binary GHC on Darwin due to GHC’s use of `ar -L` when it
# detects `llvm-ar` even though the resulting archives are not supported by ld64.
# https://gitlab.haskell.org/ghc/ghc/-/issues/23188
# https://github.com/haskell/cabal/issues/8882
sed -i -e 's/,("ar supports -L", "YES")/,("ar supports -L", "NO")/' "$out/lib/ghc-${version}/lib/settings"
'';

# Apparently necessary for the ghc Alpine (musl) bindist:
Expand Down Expand Up @@ -403,8 +409,5 @@ stdenv.mkDerivation rec {
# `pkgsMusl`.
platforms = builtins.attrNames ghcBinDists.${distSetName};
maintainers = lib.teams.haskell.members;
# packages involving hsc2hs (clock) produce libraries our
# ld can't link against
broken = stdenv.hostPlatform.isDarwin;
};
}
21 changes: 0 additions & 21 deletions pkgs/top-level/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,6 @@ in {
packages.ghc963
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc963
else if stdenv.hostPlatform.isDarwin then
# it seems like the GHC 9.6.* bindists are built with a different
# toolchain than we are using (which I'm guessing from the fact
# that 9.6.4 bindists pass linker flags our ld doesn't support).
# With both 9.6.3 and 9.6.4 binary it is impossible to link against
# the clock package (probably a hsc2hs problem).
packages.ghc963
else
packages.ghc963Binary;
inherit (buildPackages.python3Packages) sphinx;
Expand All @@ -367,13 +360,6 @@ in {
packages.ghc963
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc963
else if stdenv.hostPlatform.isDarwin then
# it seems like the GHC 9.6.* bindists are built with a different
# toolchain than we are using (which I'm guessing from the fact
# that 9.6.4 bindists pass linker flags our ld doesn't support).
# With both 9.6.3 and 9.6.4 binary it is impossible to link against
# the clock package (probably a hsc2hs problem).
packages.ghc963
else
packages.ghc963Binary;
inherit (buildPackages.python3Packages) sphinx;
Expand Down Expand Up @@ -419,13 +405,6 @@ in {
packages.ghc963
else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
packages.ghc963
else if stdenv.hostPlatform.isDarwin then
# it seems like the GHC 9.6.* bindists are built with a different
# toolchain than we are using (which I'm guessing from the fact
# that 9.6.4 bindists pass linker flags our ld doesn't support).
# With both 9.6.3 and 9.6.4 binary it is impossible to link against
# the clock package (probably a hsc2hs problem).
packages.ghc963
else
packages.ghc963Binary;
inherit (buildPackages.python3Packages) sphinx;
Expand Down