Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-01-03 00:56:46 +00:00
committed by GitHub
32 changed files with 1788 additions and 2162 deletions

View File

@@ -6,6 +6,7 @@
, bash
, libiconv ? null, ncurses
, glibcLocales ? null
, # GHC can be built with system libffi or a bundled one.
libffi ? null
@@ -95,12 +96,12 @@ let
in
stdenv.mkDerivation (rec {
version = "9.0.0.20200925";
version = "9.0.0.20201227";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/9.0.1-alpha1/ghc-${version}-src.tar.xz";
sha256 = "1c6vgic0bx0c4c6gszq7znvc5gxf0lgh630283mivbs1lyiqj88l";
url = "https://downloads.haskell.org/ghc/9.0.1-rc1/ghc-${version}-src.tar.xz";
sha256 = "1kg227fzg9qq2p7r8xqr99vvnx7ind4clxkydikyzf3vqvaacjfy";
};
enableParallelBuilding = true;
@@ -109,6 +110,9 @@ stdenv.mkDerivation (rec {
postPatch = "patchShebangs .";
# GHC needs the locale configured during the Haddock phase.
LANG = "en_US.UTF-8";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
@@ -129,6 +133,8 @@ stdenv.mkDerivation (rec {
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (stdenv.isLinux) ''
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
@@ -185,7 +191,7 @@ stdenv.mkDerivation (rec {
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3 sphinx