Adds new package options:
* enableDocs
* enableHaddockProgram
to control whether to build Sphinx docs, and GHC haddocks and the
haddock program.
Unfortunately currently the building of the `haddock `program
and generating GHC docs are mixed into one option, see:
https://gitlab.haskell.org/ghc/ghc/-/issues/20077
Making Sphinx docs disableable, and disabling them by default
for Musl and cross builds, makes it much easier to provide these
builds without having to support Sphinx's enormous dependency
tree for those ways of building.
This addresses the fact that `ghc865Binary` segfaults on musl
(see #118731) because of the glibc+musl mix used in there.
With the previous commits, `ghc8102Binary` was changed to use
the musl-based bindist from GHC HQ instead, which works.
With this change, all nix Haskell compilers builds on musl:
NIX_PATH=nixpkgs=. nix-build --no-link --expr 'with import <nixpkgs> {}; { inherit (pkgsMusl.haskell.compiler) ghc884 ghc8104 ghc901 ghcHEAD; }'
This commit replaces the musl + glibc hackery in the GHC bindist
compiler by using the new musl based bindist that GHC HQ provides
(built on Alpine).
We could alternatively also use a nix-built musl boostrap compiler,
but it seems nicer to use the GHC HQ one for now.
This fixes the compiler built by
`pkgsMusl.haskell.compiler.ghc8102Binary` segfaulting (#118731)
since the commit
5e2311d2f - musl: 1.2.1 -> 1.2.2
concretely, musl commit
01c7920f - remove redundant pthread struct members repeated for layout purposes
which I suspect breaks some glibc/musl ABI compatibility that may have
existed accidentally until then.
The added
lib.optional stdenv.targetPlatform.isMusl "pie";
also fixes that the packaged bindist compiler cannot create a binary
in its `installCheck` phase (and overall); see detail explanation
in #129247.
With this check, we no longer don't notice when the upstream bindist
changes its dependencies (e.g. because a newer Debian version is used
that uses a new `ncurses` version).
The library override that was present in the code referred to a
name that isn't even used in current GHC bindists.
Tested with:
NIX_PATH=nixpkgs=. nix-build --no-link -A haskell.compiler.ghc8102Binary --argstr system i686-linux
smlnjBootstrap seems to exist as a workaround for a failing x86_64-darwin build
of regular smlnj. Now this is fixed, the workaround can be removed.
(aarch64-darwin is being actively worked on by the smlnj project, and currently
is supported by neither derivation.)
v0.4.0:
- Added gmp as a build dependency
- Removed bootstrap-test (test still available and more general)
- Renamed bootstrap-build to bootstrap (bootstrap previously did
bootstrap-build and bootstrap-test)
With sphinx 4, interpreting the conf.py fails due to a decode
error: https://gitlab.haskell.org/ghc/ghc/-/issues/19962
The fix is an one line change which we have to backport from GHC
master.
9.2 and 8.10.6 will have a fix for this, GHC 9.0.1 and ghcHEAD
already have and GHC 8.10.4 has been patched in nixpkgs already.
With sphinx 4, interpreting the conf.py fails due to a decode
error: https://gitlab.haskell.org/ghc/ghc/-/issues/19962
The fix is an one line change which we have to backport from GHC master.
Thus ghcHEAD is not affected by this problem.
9.2 and 8.10.6 will most likely have a fix for this.
TODO: Patch 8.8.4 and 9.0.1