haskell.compiler.{ghc962,ghcHEAD}: no rendered src on aarch64-linux
This saves just enough space on aarch64-linux so that the hadrian built GHCs are under the 3GB Hydra output limit: | compiler | before | after | Δ | |----------|------------|------------|------------| | ghc962 | 3241234736 | 2810740560 | -430494176 | | ghcHEAD | 3341288328 | 2902760872 | -438527456 | The total output size can be calculated using (don't forget to use aarch64-linux): ``` nix-build -A <compiler> | xargs nix path-info -s | awk '{ s += $2 }; END { print s }' ```
This commit is contained in:
parent
3ba086a64b
commit
1eddb04ac9
@ -154,6 +154,8 @@
|
||||
ghcSrc = ghcSrc;
|
||||
ghcVersion = version;
|
||||
userSettings = hadrianUserSettings;
|
||||
# Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
|
||||
enableHyperlinkedSource = !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
|
||||
}
|
||||
|
||||
, # Whether to build sphinx documentation.
|
||||
|
@ -4,6 +4,10 @@
|
||||
, extra, filepath, lib, mtl, parsec, shake, text, transformers
|
||||
, unordered-containers, cryptohash-sha256, base16-bytestring
|
||||
, userSettings ? null
|
||||
# Whether to pass --hyperlinked-source to haddock or not. 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
|
||||
, enableHyperlinkedSource ? true
|
||||
, writeText
|
||||
}:
|
||||
|
||||
@ -18,6 +22,9 @@ mkDerivation {
|
||||
postUnpack = ''
|
||||
sourceRoot="$sourceRoot/hadrian"
|
||||
'';
|
||||
patches = lib.optionals (!enableHyperlinkedSource) [
|
||||
./disable-hyperlinked-source.patch
|
||||
];
|
||||
# Overwrite UserSettings.hs with a provided custom one
|
||||
postPatch = lib.optionalString (userSettings != null) ''
|
||||
install -m644 "${writeText "UserSettings.hs" userSettings}" src/UserSettings.hs
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff --git a/hadrian/src/Settings/Builders/Haddock.hs b/hadrian/src/Settings/Builders/Haddock.hs
|
||||
index 902b2f85e2..429a441c3b 100644
|
||||
--- a/src/Settings/Builders/Haddock.hs
|
||||
+++ b/src/Settings/Builders/Haddock.hs
|
||||
@@ -57,7 +57,6 @@ haddockBuilderArgs = mconcat
|
||||
, arg $ "--odir=" ++ takeDirectory output
|
||||
, arg $ "--dump-interface=" ++ output
|
||||
, arg "--html"
|
||||
- , arg "--hyperlinked-source"
|
||||
, arg "--hoogle"
|
||||
, arg "--quickjump"
|
||||
, arg $ "--title=" ++ pkgName pkg ++ "-" ++ version
|
Loading…
Reference in New Issue
Block a user