Skip to content

Commit

Permalink
haskell.packages.{ghc96,ghc98}: disable haddock for cross
Browse files Browse the repository at this point in the history
In this situation, haddock would not be built by hadrian, as there is no
stage0:exe:haddock target by default. (We should eventually try adding
one.) If haddock is enabled and the build->host haddock missing, Cabal
tries using the build->build haddock which may fail to load the
documentation from the interface files produced by the build->host
GHC (e.g. due to a mismatch between dynamic and static linking).

Resolves NixOS#275304.
  • Loading branch information
sternenseemann committed Dec 20, 2023
1 parent 8b4558e commit c01b464
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/development/compilers/ghc/common-hadrian.nix
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ stdenv.mkDerivation ({

# Expose hadrian used for bootstrapping, for debugging purposes
inherit hadrian;

# TODO(@sternenseemann): there's no stage0:exe:haddock target by default,
# so haddock isn't available for GHC cross-compilers. Can we fix that?
hasHaddock = stdenv.hostPlatform == stdenv.targetPlatform;
};

meta = {
Expand Down
10 changes: 10 additions & 0 deletions pkgs/top-level/release-haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,15 @@ let
xhtml # isn't bundled for cross
;
};

haskell.packages.native-bignum.ghc981 = {
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc981)
hello
random
QuickCheck
terminfo # isn't bundled for cross
;
};
};

pkgsCross.ghcjs =
Expand Down Expand Up @@ -673,6 +682,7 @@ let
constituents = accumulateDerivations [
jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
jobs.pkgsStatic.haskellPackages
jobs.pkgsStatic.haskell.packages.native-bignum.ghc981
];
};
}
Expand Down

0 comments on commit c01b464

Please sign in to comment.