ghcHEAD: update to 8.7
This commit is contained in:
parent
c92101bc32
commit
ea19a8ed1e
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# build-tools
|
# build-tools
|
||||||
, bootPkgs
|
, bootPkgs
|
||||||
, autoconf, automake, coreutils, fetchgit, perl, python3, m4, sphinx
|
, autoconf, automake, coreutils, fetchgit, fetchurl, fetchpatch, perl, python3, m4, sphinx
|
||||||
|
|
||||||
, libiconv ? null, ncurses
|
, libiconv ? null, ncurses
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@
|
||||||
|
|
||||||
, # Whether to build dynamic libs for the standard library (on the target
|
, # Whether to build dynamic libs for the standard library (on the target
|
||||||
# platform). Static libs are always built.
|
# platform). Static libs are always built.
|
||||||
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt
|
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
|
||||||
|
|
||||||
, # Whetherto build terminfo.
|
, # Whetherto build terminfo.
|
||||||
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
||||||
|
|
||||||
, version ? "8.5.20180118"
|
, version ? "8.7.20190115"
|
||||||
, # What flavour to build. An empty string indicates no
|
, # What flavour to build. An empty string indicates no
|
||||||
# specific flavour and falls back to ghc default values.
|
# specific flavour and falls back to ghc default values.
|
||||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
|
||||||
|
@ -84,9 +84,9 @@ stdenv.mkDerivation (rec {
|
||||||
name = "${targetPrefix}ghc-${version}";
|
name = "${targetPrefix}ghc-${version}";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "git://git.haskell.org/ghc.git";
|
url = "https://gitlab.haskell.org/ghc/ghc.git/";
|
||||||
rev = "e1d4140be4d2a1508015093b69e1ef53516e1eb6";
|
rev = "c9756dbf1ee58b117ea5c4ded45dea88030efd65";
|
||||||
sha256 = "1gdcr10dd968d40qgljdwx9vfkva3yrvjm9a4nis7whaaac3ag58";
|
sha256 = "0ja3ivyz4jrqkw6z1mdgsczxaqkjy5vw0nyyqlqr0bqxiw9p8834";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
@ -122,6 +122,24 @@ stdenv.mkDerivation (rec {
|
||||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||||
|
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||||
|
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||||
|
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||||
|
echo "patching llvm-targets for musl targets..."
|
||||||
|
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||||
|
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||||
|
echo "(go go gadget sed)"
|
||||||
|
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
|
||||||
|
echo "llvm-targets now contains these '*-linux-musl*' targets:"
|
||||||
|
grep linux-musl llvm-targets | sed 's/^/ /'
|
||||||
|
|
||||||
|
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
|
||||||
|
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
|
||||||
|
for x in configure aclocal.m4; do
|
||||||
|
substituteInPlace $x \
|
||||||
|
--replace '*-android*|*-gnueabi*)' \
|
||||||
|
'*-android*|*-gnueabi*|*-musleabi*)'
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||||
|
@ -131,8 +149,8 @@ stdenv.mkDerivation (rec {
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--datadir=$doc/share/doc/ghc"
|
"--datadir=$doc/share/doc/ghc"
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||||
|
@ -149,12 +167,9 @@ stdenv.mkDerivation (rec {
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
|
||||||
dontAddExtraLibs = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
perl autoconf automake m4 python3
|
perl autoconf automake m4 python3 sphinx
|
||||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
bootPkgs.ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||||
];
|
];
|
||||||
|
|
||||||
# For building runtime libs
|
# For building runtime libs
|
||||||
|
@ -195,14 +210,14 @@ stdenv.mkDerivation (rec {
|
||||||
inherit enableShared;
|
inherit enableShared;
|
||||||
|
|
||||||
# Our Cabal compiler name
|
# Our Cabal compiler name
|
||||||
haskellCompilerName = "ghc-8.5";
|
haskellCompilerName = "ghc-8.7";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://haskell.org/ghc;
|
homepage = http://haskell.org/ghc;
|
||||||
description = "The Glasgow Haskell Compiler";
|
description = "The Glasgow Haskell Compiler";
|
||||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||||
inherit (ghc.meta) license platforms;
|
inherit (bootPkgs.ghc.meta) license platforms;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
|
##
|
||||||
|
## Caveat: a copy of configuration-ghc-8.6.x.nix with minor changes:
|
||||||
|
##
|
||||||
|
## 1. "8.7" strings
|
||||||
|
## 2. llvm 6
|
||||||
|
## 3. disabled library update: parallel
|
||||||
|
##
|
||||||
{ pkgs, haskellLib }:
|
{ pkgs, haskellLib }:
|
||||||
|
|
||||||
with haskellLib;
|
with haskellLib;
|
||||||
|
|
||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
# This compiler version needs llvm 5.x.
|
# This compiler version needs llvm 6.x.
|
||||||
llvmPackages = pkgs.llvmPackages_5;
|
llvmPackages = pkgs.llvmPackages_6;
|
||||||
|
|
||||||
# Disable GHC 8.7.x core libraries.
|
# Disable GHC 8.7.x core libraries.
|
||||||
array = null;
|
array = null;
|
||||||
|
@ -20,12 +27,15 @@ self: super: {
|
||||||
ghc-boot = null;
|
ghc-boot = null;
|
||||||
ghc-boot-th = null;
|
ghc-boot-th = null;
|
||||||
ghc-compact = null;
|
ghc-compact = null;
|
||||||
ghc-prim = null;
|
ghc-heap = null;
|
||||||
ghci = null;
|
ghci = null;
|
||||||
|
ghc-prim = null;
|
||||||
haskeline = null;
|
haskeline = null;
|
||||||
hpc = null;
|
hpc = null;
|
||||||
integer-gmp = null;
|
integer-gmp = null;
|
||||||
|
libiserv = null;
|
||||||
mtl = null;
|
mtl = null;
|
||||||
|
parallel = null;
|
||||||
parsec = null;
|
parsec = null;
|
||||||
pretty = null;
|
pretty = null;
|
||||||
process = null;
|
process = null;
|
||||||
|
@ -39,60 +49,34 @@ self: super: {
|
||||||
unix = null;
|
unix = null;
|
||||||
xhtml = null;
|
xhtml = null;
|
||||||
|
|
||||||
# jailbreak-cabal can use the native Cabal library.
|
# https://github.com/tibbe/unordered-containers/issues/214
|
||||||
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; };
|
unordered-containers = dontCheck super.unordered-containers;
|
||||||
|
|
||||||
# haddock: No input file(s).
|
# Test suite does not compile.
|
||||||
nats = dontHaddock super.nats;
|
cereal = dontCheck super.cereal;
|
||||||
bytestring-builder = dontHaddock super.bytestring-builder;
|
data-clist = doJailbreak super.data-clist; # won't cope with QuickCheck 2.12.x
|
||||||
|
dates = doJailbreak super.dates; # base >=4.9 && <4.12
|
||||||
|
Diff = dontCheck super.Diff;
|
||||||
|
HaTeX = doJailbreak super.HaTeX; # containers >=0.4 && <0.6 is too tight; https://github.com/Daniel-Diaz/HaTeX/issues/126
|
||||||
|
hpc-coveralls = doJailbreak super.hpc-coveralls; # https://github.com/guillaume-nargeot/hpc-coveralls/issues/82
|
||||||
|
http-api-data = doJailbreak super.http-api-data;
|
||||||
|
persistent-sqlite = dontCheck super.persistent-sqlite;
|
||||||
|
psqueues = dontCheck super.psqueues; # won't cope with QuickCheck 2.12.x
|
||||||
|
system-fileio = dontCheck super.system-fileio; # avoid dependency on broken "patience"
|
||||||
|
unicode-transforms = dontCheck super.unicode-transforms;
|
||||||
|
wl-pprint-extras = doJailbreak super.wl-pprint-extras; # containers >=0.4 && <0.6 is too tight; https://github.com/ekmett/wl-pprint-extras/issues/17
|
||||||
|
RSA = dontCheck super.RSA; # https://github.com/GaloisInc/RSA/issues/14
|
||||||
|
monad-par = dontCheck super.monad-par; # https://github.com/simonmar/monad-par/issues/66
|
||||||
|
github = dontCheck super.github; # hspec upper bound exceeded; https://github.com/phadej/github/pull/341
|
||||||
|
binary-orphans = dontCheck super.binary-orphans; # tasty upper bound exceeded; https://github.com/phadej/binary-orphans/commit/8ce857226595dd520236ff4c51fa1a45d8387b33
|
||||||
|
|
||||||
# We have time 1.5
|
# https://github.com/jgm/skylighting/issues/55
|
||||||
aeson = disableCabalFlag super.aeson "old-locale";
|
skylighting-core = dontCheck super.skylighting-core;
|
||||||
|
|
||||||
# Setup: At least the following dependencies are missing: base <4.8
|
# Break out of "yaml >=0.10.4.0 && <0.11": https://github.com/commercialhaskell/stack/issues/4485
|
||||||
hspec-expectations = overrideCabal super.hspec-expectations (drv: {
|
stack = doJailbreak super.stack;
|
||||||
postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
|
||||||
});
|
|
||||||
utf8-string = overrideCabal super.utf8-string (drv: {
|
|
||||||
postPatch = "sed -i -e 's|base >= 4.3 && < 4.10|base|' utf8-string.cabal";
|
|
||||||
});
|
|
||||||
|
|
||||||
# bos/attoparsec#92
|
# Fix build with ghc 8.6.x.
|
||||||
attoparsec = dontCheck super.attoparsec;
|
git-annex = appendPatch super.git-annex ./patches/git-annex-fix-ghc-8.6.x-build.patch;
|
||||||
|
|
||||||
# test suite hangs silently for at least 10 minutes
|
|
||||||
split = dontCheck super.split;
|
|
||||||
|
|
||||||
# Test suite fails with some (seemingly harmless) error.
|
|
||||||
# https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24
|
|
||||||
syb = dontCheck super.syb;
|
|
||||||
|
|
||||||
# Test suite has stricter version bounds
|
|
||||||
retry = dontCheck super.retry;
|
|
||||||
|
|
||||||
# Test suite fails with time >= 1.5
|
|
||||||
http-date = dontCheck super.http-date;
|
|
||||||
|
|
||||||
# Version 1.19.5 fails its test suite.
|
|
||||||
happy = dontCheck super.happy;
|
|
||||||
|
|
||||||
# Workaround for a workaround, see comment for "ghcjs" flag.
|
|
||||||
jsaddle = let jsaddle' = disableCabalFlag super.jsaddle "ghcjs";
|
|
||||||
in addBuildDepends jsaddle' [ self.glib self.gtk3 self.webkitgtk3
|
|
||||||
self.webkitgtk3-javascriptcore ];
|
|
||||||
|
|
||||||
# The compat library is empty in the presence of mtl 2.2.x.
|
|
||||||
mtl-compat = dontHaddock super.mtl-compat;
|
|
||||||
|
|
||||||
# Won't work with LLVM 3.5.
|
|
||||||
llvm-general = markBrokenVersion "3.4.5.3" super.llvm-general;
|
|
||||||
|
|
||||||
# A bunch of jailbreaks due to 'base' bump
|
|
||||||
old-time = doJailbreak super.old-time;
|
|
||||||
old-locale = doJailbreak super.old-locale;
|
|
||||||
primitive = doJailbreak super.primitive;
|
|
||||||
test-framework = doJailbreak super.test-framework;
|
|
||||||
atomic-primops = doJailbreak (appendPatch super.atomic-primops ./patches/atomic-primops-Cabal-1.25.patch);
|
|
||||||
hashable = doJailbreak super.hashable;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,10 +78,10 @@ in {
|
||||||
llvmPackages = pkgs.llvmPackages_6;
|
llvmPackages = pkgs.llvmPackages_6;
|
||||||
};
|
};
|
||||||
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
|
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
|
||||||
bootPkgs = packages.ghc822Binary;
|
bootPkgs = packages.ghc863Binary;
|
||||||
inherit (buildPackages.python3Packages) sphinx;
|
inherit (buildPackages.python3Packages) sphinx;
|
||||||
buildLlvmPackages = buildPackages.llvmPackages_5;
|
buildLlvmPackages = buildPackages.llvmPackages_6;
|
||||||
llvmPackages = pkgs.llvmPackages_5;
|
llvmPackages = pkgs.llvmPackages_6;
|
||||||
};
|
};
|
||||||
ghcjs = compiler.ghcjs84;
|
ghcjs = compiler.ghcjs84;
|
||||||
ghcjs82 = callPackage ../development/compilers/ghcjs-ng {
|
ghcjs82 = callPackage ../development/compilers/ghcjs-ng {
|
||||||
|
|
Loading…
Reference in New Issue