Synchronize Haskell infrastructure with master @ f62deb0f92.

This commit is contained in:
Peter Simons
2018-03-11 16:08:16 +01:00
parent b6bd99869d
commit b8ebbc0e3d
10 changed files with 3022 additions and 1213 deletions

View File

@@ -15,7 +15,7 @@
, # 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 ? false, gmp ? null
enableIntegerSimple ? false, gmp ? null, m4
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@@ -24,7 +24,7 @@
# platform). Static libs are always built.
enableShared ? true
, version ? "8.4.0.20180224"
, version ? "8.4.1"
, # Whether to backport https://phabricator.haskell.org/D4388 for
# deterministic profiling symbol names, at the cost of a slightly
# non-standard GHC API
@@ -77,8 +77,8 @@ stdenv.mkDerivation rec {
src = fetchgit {
url = "git://git.haskell.org/ghc.git";
rev = "a1e15c8f59092ef2d11be7966bd20688d8dc01e6";
sha256 = "1pimf5ryl76r3vwnc2n0qzk4yh7zckp2r2g5rlz8nbddsws2v893";
rev = "0a3e2f324dbd525d626ebd3d97e8ffa1cf2f0ffb";
sha256 = "1m51khnmf8gw203d8kh6y4ivh0acb2wiqqnb950yfbg2a2k7bcfi";
};
enableParallelBuilding = true;
@@ -149,7 +149,7 @@ stdenv.mkDerivation rec {
# masss-rebuild.
crossConfig = true;
nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
# For building runtime libs
depsBuildTarget = toolsForTarget;

View File

@@ -37,7 +37,7 @@ self: super: {
hackage-security = dontCheck super.hackage-security;
# Link statically to avoid runtime dependency on GHC.
jailbreak-cabal = (disableSharedExecutables super.jailbreak-cabal).override { Cabal = self.Cabal_1_20_0_4; };
jailbreak-cabal = disableSharedExecutables super.jailbreak-cabal;
# enable using a local hoogle with extra packagages in the database
# nix-shell -p "haskellPackages.hoogleLocal { packages = with haskellPackages; [ mtl lens ]; }"
@@ -603,12 +603,12 @@ self: super: {
'';
doCheck = false; # https://github.com/chrisdone/hindent/issues/299
})).override {
haskell-src-exts = self.haskell-src-exts_1_20_1;
haskell-src-exts = self.haskell-src-exts_1_20_2;
};
# Need newer versions of their dependencies than the ones we have in LTS-10.x.
cabal2nix = super.cabal2nix.override { hpack = self.hpack_0_27_0; };
hlint = super.hlint.overrideScope (self: super: { haskell-src-exts = self.haskell-src-exts_1_20_1; });
cabal2nix = super.cabal2nix.overrideScope (self: super: { hpack = self.hpack_0_27_0; hackage-db = self.hackage-db_2_0_1; });
hlint = super.hlint.overrideScope (self: super: { haskell-src-exts = self.haskell-src-exts_1_20_2; });
# https://github.com/bos/configurator/issues/22
configurator = dontCheck super.configurator;
@@ -847,14 +847,14 @@ self: super: {
# Hoogle needs newer versions than lts-10 provides. lambdabot-haskell-plugins
# depends on Hoogle and therefore needs to use the same version.
hoogle = super.hoogle.override {
haskell-src-exts = self.haskell-src-exts_1_20_1;
haskell-src-exts = self.haskell-src-exts_1_20_2;
http-conduit = self.http-conduit_2_3_0;
};
lambdabot-haskell-plugins = super.lambdabot-haskell-plugins.override {
haskell-src-exts-simple = self.haskell-src-exts-simple_1_20_0_0;
};
haskell-src-exts-simple_1_20_0_0 = super.haskell-src-exts-simple_1_20_0_0.override {
haskell-src-exts = self.haskell-src-exts_1_20_1;
haskell-src-exts = self.haskell-src-exts_1_20_2;
};
# These packages depend on each other, forming an infinite loop.
@@ -946,8 +946,8 @@ self: super: {
# Tries to read a file it is not allowed to in the test suite
load-env = dontCheck super.load-env;
# Sporadically OOMs even with 16G
ChasingBottoms = dontCheck super.ChasingBottoms;
# Use latest version to support newer QuickCheck and base libraries.
ChasingBottoms = self.ChasingBottoms_1_3_1_4;
# Add support for https://github.com/haskell-hvr/multi-ghc-travis.
multi-ghc-travis = self.callPackage ../tools/haskell/multi-ghc-travis {};
@@ -1006,4 +1006,7 @@ self: super: {
# Needs older hlint
hpio = dontCheck super.hpio;
# Needs turtle >=1.5.0, which we use by default in lts-10.x.
changelogged = super.changelogged.override { turtle = self.turtle_1_5_4; };
}

View File

@@ -35,9 +35,6 @@ self: super: {
unix = null;
xhtml = null;
# jailbreak-cabal can use the native Cabal library.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; };
# https://github.com/bmillwood/applicative-quoters/issues/6
applicative-quoters = appendPatch super.applicative-quoters (pkgs.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/bmillwood/applicative-quoters/pull/7.patch";

View File

@@ -86,4 +86,28 @@ self: super: {
# https://github.com/purescript/purescript/issues/3189
purescript = doJailbreak (super.purescript);
# Needs text >=1.2.3.0 && <1.3, which is not the default yet.
Cabal_2_2_0_0 = super.Cabal_2_2_0_0.overrideScope (self: super: {
text = self.text_1_2_3_0;
});
# These packages need Cabal 2.2.x, which is not the default.
distribution-nixpkgs = super.distribution-nixpkgs.overrideScope (self: super: {
Cabal = self.Cabal_2_2_0_0;
text = self.text_1_2_3_0;
});
hackage-db_2_0_1 = super.hackage-db_2_0_1.overrideScope (self: super: {
Cabal = self.Cabal_2_2_0_0;
text = self.text_1_2_3_0;
});
cabal2nix = super.cabal2nix.overrideScope (self: super: {
Cabal = self.Cabal_2_2_0_0;
text = self.text_1_2_3_0;
});
stylish-cabal = dontHaddock (dontCheck (super.stylish-cabal.overrideScope (self: super: {
Cabal = self.Cabal_2_2_0_0;
text = self.text_1_2_3_0;
haddock-library = dontHaddock (dontCheck self.haddock-library_1_5_0_1);
})));
}

View File

@@ -60,11 +60,16 @@ self: super: {
doCheck = false;
});
## Needs bump to a versioned attribute
## Setup: Encountered missing dependencies:
## free >=4.9 && <5
either = super.either_5;
## Needs bump to a versioned attribute
## • Could not deduce (Semigroup (IterT m a))
## arising from the superclasses of an instance declaration
## from the context: (Monad m, Monoid a)
free = super.free_5;
free = super.free_5_0_1;
## Needs bump to a versioned attribute
## Setup: Encountered missing dependencies:
@@ -125,6 +130,11 @@ self: super: {
doCheck = false;
});
## Needs bump to a versioned attribute
## Setup: Encountered missing dependencies:
## doctest >=0.7 && <0.14
turtle = super.turtle_1_5_4;
## Needs bump to a versioned attribute
## Module ‘Data.Semigroup’ does not export ‘Monoid(..)’
## |
@@ -323,6 +333,7 @@ self: super: {
rev = "b7195f160795a081adbb9013810d843f1ba5e062";
sha256 = "1g351fdpsvn2lbqiy9bg2s0wwrdccb8q1zh7gvpsx5nnj24b1c00";
};
jailbreak = true; # https://github.com/lpsmith/blaze-builder/issues/12
});
## Unmerged. PR: https://github.com/wrengr/bytestring-trie/pull/3
@@ -441,6 +452,7 @@ self: super: {
rev = "34f4593a520176a917b74b8c7fcbbfbd72fb8178";
sha256 = "1aiklvf08w1hx2jn9n3sm61mfvdx4fkabszkjliapih2yjpmi3hq";
};
jailbreak = true; # base >=4 && <4.11
});
## Unmerged. PR: https://github.com/vincenthz/hs-securemem/pull/12
@@ -576,12 +588,6 @@ self: super: {
jailbreak = true;
});
ChasingBottoms = overrideCabal super.ChasingBottoms (drv: {
## Setup: Encountered missing dependencies:
## QuickCheck >=2.3 && <2.11, base >=4.2 && <4.11
jailbreak = true;
});
deepseq-generics = overrideCabal super.deepseq-generics (drv: {
## Setup: Encountered missing dependencies:
## base >=4.5 && <4.11
@@ -752,4 +758,52 @@ self: super: {
jailbreak = true;
});
# https://github.com/haskell/HTTP/pull/114
HTTP = self.HTTP_4000_3_10;
HTTP_4000_3_10 = dontCheck super.HTTP_4000_3_10;
# Older versions don't compile.
haddock-library = self.haddock-library_1_5_0_1;
haddock-library_1_5_0_1 = dontHaddock (dontCheck super.haddock-library_1_5_0_1);
# https://github.com/phadej/tree-diff/issues/15
tree-diff = doJailbreak super.tree-diff;
# https://github.com/jgm/doctemplates/issues/2
doctemplates = appendPatch super.doctemplates (pkgs.fetchpatch
{ url = https://github.com/jgm/doctemplates/commit/3f8bb8feb19ed86b881bc09d963026db9d98df21.patch;
sha256 = "0xmjljh8c90qlzp6wn39iy23pj2j0d4m4r1hxs22zps6qdwk5s6d";
});
# https://github.com/bitemyapp/esqueleto/issues/77
esqueleto = markBrokenVersion "2.5.3" super.esqueleto;
# https://github.com/haskell-pkg-janitors/haskell-src/issues/5
haskell-src = markBrokenVersion "1.0.2.0" super.haskell-src;
# Older versions don't compile.
hackage-db = super.hackage-db_2_0_1;
# https://github.com/RazvanRanca/GenericPretty/issues/2
GenericPretty = appendPatch super.GenericPretty (pkgs.fetchpatch
{ url = https://github.com/RazvanRanca/GenericPretty/pull/3.patch;
sha256 = "1dpdqsjmy9j9b6md5r9jyhbxnxjd51nmfb5in01j10iqzhj9j51k";
}
);
# https://github.com/haskell/hackage-security/issues/211
hackage-security = doJailbreak super.hackage-security;
# https://github.com/pikajude/stylish-cabal/issues/6
stylish-cabal = dontHaddock super.stylish-cabal;
# https://github.com/treeowl/boxes/issues/29
boxes = appendPatch super.boxes (pkgs.fetchpatch
{ url = https://github.com/asr/boxes/commit/f03e16cb8677a9d85687c641fe27a87e6fd94d54.patch;
sha256 = "179vkn6jimiy64dwyam04x8v981l3pfrq3ig97600vnkns3v8i6a";
});
# https://bitbucket.org/IchUndNichtDu/haskell-setlocale/issues/1/please-allow-base-412-from-ghc-841
setlocale = doJailbreak super.setlocale;
}

View File

@@ -58,9 +58,8 @@ self: super: builtins.intersectAttrs super {
# CUDA needs help finding the SDK headers and libraries.
cuda = overrideCabal super.cuda (drv: {
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
configureFlags = (drv.configureFlags or []) ++
pkgs.lib.optional pkgs.stdenv.is64bit "--extra-lib-dirs=${pkgs.cudatoolkit}/lib64" ++ [
"--extra-lib-dirs=${pkgs.cudatoolkit}/lib"
configureFlags = (drv.configureFlags or []) ++ [
"--extra-lib-dirs=${pkgs.cudatoolkit.lib}/lib"
"--extra-include-dirs=${pkgs.cudatoolkit}/include"
];
preConfigure = ''

File diff suppressed because it is too large Load Diff

View File

@@ -107,7 +107,7 @@ let
inherit packages;
};
haskellSrc2nix = { name, src, sha256 ? null }:
haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
let
sha256Arg = if isNull sha256 then "--sha256=" else ''--sha256="${sha256}"'';
in pkgs.buildPackages.stdenv.mkDerivation {
@@ -120,7 +120,7 @@ let
installPhase = ''
export HOME="$TMP"
mkdir -p "$out"
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
'';
};
@@ -188,6 +188,52 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
};
in withPackages (packages ++ [ hoogle ]);
# Returns a derivation whose environment contains a GHC with only
# the dependencies of packages listed in `packages`, not the
# packages themselves. Using nix-shell on this derivation will
# give you an environment suitable for developing the listed
# packages with an incremental tool like cabal-install.
#
# # default.nix
# with import <nixpkgs> {};
# haskellPackages.extend (haskell.lib.packageSourceOverrides {
# frontend = ./frontend;
# backend = ./backend;
# common = ./common;
# })
#
# # shell.nix
# (import ./.).shellFor {
# packages = p: [p.frontend p.backend p.common];
# withHoogle = true;
# }
#
# -- cabal.project
# packages:
# frontend/
# backend/
# common/
#
# bash$ nix-shell --run "cabal new-build all"
shellFor = { packages, withHoogle ? false, ... } @ args:
let
selected = packages self;
packageInputs = builtins.map (p: p.override { mkDerivation = haskellLib.extractBuildInputs p.compiler; }) selected;
haskellInputs =
builtins.filter
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
(pkgs.lib.concatMap (p: p.haskellBuildInputs) packageInputs);
systemInputs = pkgs.lib.concatMap (p: p.systemBuildInputs) packageInputs;
withPackages = if withHoogle then self.ghcWithHoogle else self.ghcWithPackages;
mkDrvArgs = builtins.removeAttrs args ["packages" "withHoogle"];
in pkgs.stdenv.mkDerivation (mkDrvArgs // {
name = "ghc-shell-for-packages";
nativeBuildInputs = [(withPackages (_: haskellInputs))] ++ mkDrvArgs.nativeBuildInputs or [];
buildInputs = systemInputs ++ mkDrvArgs.buildInputs or [];
phases = ["installPhase"];
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
});
ghc = ghc // {
withPackages = self.ghcWithPackages;
withHoogle = self.ghcWithHoogle;

View File

@@ -8,8 +8,8 @@ mkDerivation {
src = fetchFromGitHub {
owner = "haskell-CI";
repo = "haskell-ci";
rev = "36b2ee58b9fd160d606608832625b2b6c32aec43";
sha256 = "16g99jh5bszvfvb7mmyhl95mkf1l3ydyax8d9py91hi3m8r0c2x0";
rev = "a4962f1478089654d138da7a3807dfcf2cef4284";
sha256 = "1qwknajabxcfz5w5g0yn30r8p0180wxp7pncr6nwfhszlhay0vb7";
};
isLibrary = true;
isExecutable = true;