Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Haskell package set to LTS 15.8 (plus other fixes) #85178

Merged
merged 15 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/languages-frameworks/haskell.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ to compile your Haskell packages with any GHC version you please. The following
command displays the complete list of available compilers:
```
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler
haskell.compiler.ghc8101 ghc-8.10.0.20191210
haskell.compiler.integer-simple.ghc8101 ghc-8.10.0.20191210
haskell.compiler.ghcHEAD ghc-8.10.20191119
haskell.compiler.integer-simple.ghcHEAD ghc-8.10.20191119
haskell.compiler.ghc8101 ghc-8.10.1
haskell.compiler.integer-simple.ghc8101 ghc-8.10.1
haskell.compiler.ghcHEAD ghc-8.11.20200403
haskell.compiler.integer-simple.ghcHEAD ghc-8.11.20200403
haskell.compiler.ghc822Binary ghc-8.2.2-binary
haskell.compiler.ghc844 ghc-8.4.4
haskell.compiler.ghc863Binary ghc-8.6.3-binary
Expand Down
4 changes: 2 additions & 2 deletions pkgs/data/misc/hackage/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ fetchurl }:

fetchurl {
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/90b24a91103dca4f0df6cb28cecb205a7d7ab650.tar.gz";
sha256 = "1zfj8c6s9icqg83ycfvd150s4jd07ccbjg2w2mn10rx5ng76mn53";
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/3e87a900a11faa97a8a068874c932f3172d0aa76.tar.gz";
sha256 = "0cf35vics1211pr1g8a804zm3w4lsdacqkgw3hqk7wdrrbasb8ip";
}
48 changes: 30 additions & 18 deletions pkgs/development/compilers/ghc/head.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

# build-tools
, bootPkgs
, autoconf, autoreconfHook, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx
, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx
, bash

, libiconv ? null, ncurses

, # GHC can be built with system libffi or a bundled one.
libffi ? null

, enableDwarf ? !stdenv.targetPlatform.isDarwin &&
!stdenv.targetPlatform.isWindows, elfutils # for DWARF support
!stdenv.targetPlatform.isWindows
, elfutils # for DWARF support

, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
, # LLVM is conceptually a run-time-only depedendency, but for
Expand All @@ -18,7 +22,8 @@

, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
, gmp

, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
Expand All @@ -30,7 +35,7 @@
, # Whetherto build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows

, version ? "8.10.20191119"
, version ? "8.11.20200403"
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
Expand Down Expand Up @@ -75,6 +80,7 @@ let

# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
++ stdenv.lib.optional enableDwarf elfutils;
Expand All @@ -97,17 +103,14 @@ stdenv.mkDerivation (rec {

src = fetchgit {
url = "https://gitlab.haskell.org/ghc/ghc.git/";
rev = "0418c38d55c7a47967187dce2db5ea2ab1021b1e";
sha256 = "1d8g30ii0w4xh6fh61bxbalsqqyanny99nn3p727fx7favnhgvxi";
rev = "4291bddaea3148908c55f235ee8978e1d9aa6f20";
sha256 = "1gs3mxmsdpsgsp7vnawx8mys0qwg4x2zhfrbciy3wv8nv13ar1af";
};

enableParallelBuilding = true;

outputs = [ "out" "doc" ];

patches = [
];

postPatch = "patchShebangs .";

# GHC is a bit confused on its cross terminology.
Expand All @@ -130,8 +133,8 @@ stdenv.mkDerivation (rec {
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"

echo -n "${buildMK}" > mk/build.mk
echo ${version} >VERSION
echo ${src.rev} >GIT_COMMIT_ID
echo ${version} > VERSION
echo ${src.rev} > GIT_COMMIT_ID
./boot
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
Expand Down Expand Up @@ -161,31 +164,40 @@ stdenv.mkDerivation (rec {
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
"--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optionals (libffi != null) [
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optionals (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) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals useLdGold [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
] ++ stdenv.lib.optionals enableDwarf [
] ++ stdenv.lib.optional disableLargeAddressSpace "--disable-large-address-space"
++ stdenv.lib.optionals enableDwarf [
"--enable-dwarf-unwind"
"--with-libdw-includes=${stdenv.lib.getDev elfutils}/include"
"--with-libdw-libraries=${stdenv.lib.getLib elfutils}/lib"
];

# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;

# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;

nativeBuildInputs = [
perl autoconf autoreconfHook automake m4 python3 sphinx
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
Expand Down
15 changes: 12 additions & 3 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ self: super: {
# Test suite build depends on ancient tasty 0.11.x.
cryptohash-sha512 = dontCheck super.cryptohash-sha512;

# Test suite depends on source code being available
simple-affine-space = dontCheck super.simple-affine-space;

# https://github.com/kazu-yamamoto/simple-sendfile/issues/17
simple-sendfile = dontCheck super.simple-sendfile;

Expand Down Expand Up @@ -1450,9 +1453,12 @@ self: super: {
# details.
cryptonite = dontCheck super.cryptonite;

# The test suite depends on an impure cabal-install installation
# in $HOME, which we don't have in our build sandbox.
cabal-install-parsers = dontCheck super.cabal-install-parsers;
# The test suite depends on an impure cabal-install installation in
# $HOME, which we don't have in our build sandbox, and it is keeping
# up with the most recent Cabal version.
cabal-install-parsers = dontCheck (super.cabal-install-parsers.overrideScope (self: super: {
Cabal = self.Cabal_3_2_0_0;
}));

# haskell-ci-0.8 needs cabal-install-parsers ==0.1, but we have 0.2.
haskell-ci = doJailbreak super.haskell-ci;
Expand Down Expand Up @@ -1501,4 +1507,7 @@ self: super: {
# Fixed at head, but hasn't cut a release in awhile.
darcs = doJailbreak super.darcs;

# Test suite requires running a database server. Testing is done upstream.
hasql-pool = dontCheck super.hasql-pool;

} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super
3 changes: 3 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,7 @@ self: super: {
ListLike = addBuildDepend super.ListLike self.semigroups;
base-compat-batteries = addBuildDepend super.base-compat-batteries self.contravariant;

# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;

}
3 changes: 3 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ self: super: {
# The old Haddock cannot process the newer documentation syntax.
fast-logger = dontHaddock super.fast-logger;

# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;

}
3 changes: 3 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,7 @@ self: super: {
stylish-cabal = doDistribute (markUnbroken (super.stylish-cabal.override { haddock-library = self.haddock-library_1_7_0; }));
haddock-library_1_7_0 = dontCheck super.haddock-library_1_7_0;

# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;

}
Loading