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
useLdGold previously just checked for useLLVM which (currently) implies
`linker == "lld"`. However more accurate is to check the `linker` of the
`targetPlatform` as it actually tells us which bintools package we can
expect.
`linker == "bfd"` implies that we are using the `binutils` package, so
gold is available, so we can use it unless musl is the libc. `linker ==
"gold"` implies that gold is the default linker already and we should
absolutely use it.
GHC calls otool on darwin which is contained in the
stdenv.cc.bintools.bintools derivation and thus needs adding to the
runtime PATH of GHC. Since this is toolchain specific technically, we
check for cctools instead of darwin (although I don't know if GHC
or nixpkgs work on macOS without cctools).
This fixes usage of GHC in an environment where otool is not available
and more specifically in stdenvNoCC which is used by writers.writeHaskell.
Resolves#123228.
The broken build of ghcHEAD on aarch64-linux results from rts/Libdw.c
not supporting that platform. Seemingly this particular file is only
relevant for DWARF support in GHC, so we disable that on unsupported
platforms.
The tarball download URLs seem to have changed, so we adjust them in
case anyone wants to reproduce the source of ghc8102Binary and
ghc865Binary.
Tested for x86_64-linux, i686-linux, aarch64-linux, x86_64-darwin.
Resolves#121804.
Previously, the "ar command" in the global config of GHC in nixpkgs is
simply "ar" instead of a proper absolute path in the nix store. This
will result in an "ar: command not found" error when using GHC and cabal
in a pure nix shell. This commit adds the patch and applies to all
pre-9.0 versions.
See output of ghc --info for "ar command" value.
x86_64-linux
Ben Gamari's patch from #85924.
Fixes#85924, allowing one to bootstrap GHC in `pkgsMusl`
`nix-build -A pkgsMusl.haskellPackages.hello` succeeds with this patch.
Please do not use tarballs.nixos.org in src URLs. tarballs.nixos.org is
a cache, not an authority.
This patch differs from the one in tarballs.nixos.org only in source code
comments.
Fixes:
utils/ghc-cabal/dist-install/build/tmp/ghc-cabal:
error while loading shared libraries: libnuma.so.1:
cannot open shared object file: No such file or directory