mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
haskell.compiler.ghcHEAD: disable --hyperlinked-source on aarch64
Disable enableHyperlinkedSource for GHC >= 9.11 to keep GHC under the 3GB Hydra output limit. Note that we use a patch as opposed to the new extraArgs interfaces for the reasons given in the comments added in this commit.
This commit is contained in:
parent
bba794ffb7
commit
ec3ec6038a
3 changed files with 26 additions and 8 deletions
|
@ -169,10 +169,11 @@
|
|||
|
||||
patches =
|
||||
let
|
||||
# Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
|
||||
enableHyperlinkedSource =
|
||||
lib.versionAtLeast version "9.8" ||
|
||||
!(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
|
||||
# Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
|
||||
!(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux)
|
||||
# 9.8 and 9.10 don't run into this problem for some reason
|
||||
|| (lib.versionAtLeast version "9.8" && lib.versionOlder version "9.11");
|
||||
in
|
||||
[
|
||||
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
|
||||
|
@ -207,12 +208,16 @@
|
|||
then ./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
|
||||
else ./Cabal-3.12-paths-fix-cycle-aarch64-darwin.patch)
|
||||
]
|
||||
# Prevents passing --hyperlinked-source to haddock. This is a custom
|
||||
# workaround as we wait for this to be configurable via userSettings or
|
||||
# similar. https://gitlab.haskell.org/ghc/ghc/-/issues/23625
|
||||
# Prevents passing --hyperlinked-source to haddock. Note that this can
|
||||
# be configured via a user defined flavour now. Unfortunately, it is
|
||||
# impossible to import an existing flavour in UserSettings, so patching
|
||||
# the defaults is actually simpler and less maintenance intensive
|
||||
# compared to keeping an entire flavour definition in sync with upstream
|
||||
# manually. See also https://gitlab.haskell.org/ghc/ghc/-/issues/23625
|
||||
++ lib.optionals (!enableHyperlinkedSource) [
|
||||
# TODO(@sternenseemann): Doesn't apply for GHC >= 9.8
|
||||
../../tools/haskell/hadrian/disable-hyperlinked-source.patch
|
||||
(if lib.versionOlder version "9.8"
|
||||
then ../../tools/haskell/hadrian/disable-hyperlinked-source-pre-9.8.patch
|
||||
else ../../tools/haskell/hadrian/disable-hyperlinked-source-extra-args.patch)
|
||||
]
|
||||
# Incorrect bounds on Cabal in hadrian
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/24100
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs
|
||||
index 0b743788ec..a7ff841609 100644
|
||||
--- a/hadrian/src/Settings/Default.hs
|
||||
+++ b/hadrian/src/Settings/Default.hs
|
||||
@@ -249,7 +249,7 @@ defaultExtraArgs =
|
||||
|
||||
defaultHaddockExtraArgs :: Args
|
||||
defaultHaddockExtraArgs = builder (Haddock BuildPackage) ?
|
||||
- mconcat [ arg "--hyperlinked-source", arg "--hoogle", arg "--quickjump" ]
|
||||
+ mconcat [ arg "--hoogle", arg "--quickjump" ]
|
||||
|
||||
|
||||
-- | Default source arguments, e.g. optimisation settings.
|
Loading…
Add table
Add a link
Reference in a new issue