Merge pull request #85178 from NixOS/haskell-updates

Update Haskell package set to LTS 15.8 (plus other fixes)
This commit is contained in:
Peter Simons 2020-04-17 21:02:58 +02:00 committed by GitHub
commit e9687df24a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 2566 additions and 912 deletions

View File

@ -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

View File

@ -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";
}

View File

@ -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
@ -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
@ -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)
@ -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;
@ -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.
@ -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) ''
@ -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;
# Dont 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

View File

@ -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;
@ -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;
@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -72,7 +72,7 @@ default-package-overrides:
# gi-gdkx11-4.x requires gtk-4.x, which is still under development and
# not yet available in Nixpkgs
- gi-gdkx11 < 4
# LTS Haskell 15.7
# LTS Haskell 15.8
- abstract-deque ==0.3
- abstract-par ==0.3.3
- AC-Angle ==1.0
@ -346,7 +346,7 @@ default-package-overrides:
- buffer-builder ==0.2.4.7
- buffer-pipe ==0.0
- bugsnag-hs ==0.1.0.0
- butcher ==1.3.2.3
- butcher ==1.3.3.0
- bv ==0.5
- bv-little ==1.1.1
- byteable ==0.1.1
@ -556,10 +556,10 @@ default-package-overrides:
- data-default-instances-dlist ==0.0.1
- data-default-instances-old-locale ==0.0.1
- data-diverse ==4.7.0.0
- datadog ==0.2.4.0
- data-dword ==0.3.1.3
- datadog ==0.2.5.0
- data-dword ==0.3.2
- data-endian ==0.1.1
- data-fix ==0.2.0
- data-fix ==0.2.1
- data-has ==0.3.0.0
- data-interval ==2.0.1
- data-inttrie ==0.1.4
@ -613,7 +613,7 @@ default-package-overrides:
- disk-free-space ==0.1.0.1
- distributed-closure ==0.4.2.0
- distribution-opensuse ==1.1.1
- distributive ==0.6.1
- distributive ==0.6.2
- dl-fedora ==0.7.4
- dlist ==0.8.0.8
- dlist-instances ==0.1.1.1
@ -668,7 +668,7 @@ default-package-overrides:
- emojis ==0.1
- enclosed-exceptions ==1.0.3
- ENIG ==0.0.1.0
- entropy ==0.4.1.5
- entropy ==0.4.1.6
- enummapset ==0.6.0.2
- enumset ==0.0.5
- enum-subset-generate ==0.1.0.0
@ -706,7 +706,7 @@ default-package-overrides:
- extensible-exceptions ==0.1.1.4
- extra ==1.6.21
- extractable-singleton ==0.0.1
- extrapolate ==0.4.1
- extrapolate ==0.4.2
- fail ==4.9.0.0
- failable ==1.2.4.0
- fakedata ==0.5.0
@ -750,6 +750,7 @@ default-package-overrides:
- flow ==1.0.20
- flush-queue ==1.0.0
- fmlist ==0.9.3
- fmt ==0.6.1.2
- fn ==0.3.0.2
- focus ==1.0.1.3
- focuslist ==0.1.0.2
@ -908,7 +909,7 @@ default-package-overrides:
- hashmap ==1.3.3
- hashtables ==1.2.3.4
- haskeline ==0.7.5.0
- haskell-gi ==0.23.0
- haskell-gi ==0.23.1
- haskell-gi-base ==0.23.0
- haskell-gi-overloading ==1.0
- haskell-import-graph ==1.0.4
@ -922,7 +923,7 @@ default-package-overrides:
- haskell-src-meta ==0.8.5
- haskey-btree ==0.3.0.1
- haskoin-core ==0.10.1
- haskoin-node ==0.9.16
- haskoin-node ==0.9.21
- hasql ==1.4.2
- hasql-optparse-applicative ==0.3.0.5
- hasql-pool ==0.5.1
@ -977,6 +978,7 @@ default-package-overrides:
- hourglass ==0.2.12
- hourglass-orphans ==0.1.0.0
- hp2pretty ==0.9
- hpack ==0.33.0
- hpc-codecov ==0.1.0.0
- hreader ==1.1.0
- hreader-lens ==0.1.3.0
@ -1122,7 +1124,7 @@ default-package-overrides:
- inline-c ==0.9.1.0
- inline-c-cpp ==0.4.0.2
- insert-ordered-containers ==0.2.3
- inspection-testing ==0.4.2.2
- inspection-testing ==0.4.2.4
- instance-control ==0.1.2.0
- int-cast ==0.2.0.0
- integer-logarithms ==1.0.3
@ -1501,7 +1503,7 @@ default-package-overrides:
- pandoc ==2.9.1.1
- pandoc-citeproc ==0.16.4.1
- pandoc-csv2table ==1.0.8
- pandoc-plot ==0.2.1.0
- pandoc-plot ==0.2.2.0
- pandoc-pyplot ==2.3.0.1
- pandoc-types ==1.20
- papillon ==0.1.1.1
@ -1721,6 +1723,7 @@ default-package-overrides:
- regex-posix ==0.96.0.0
- regex-tdfa ==1.3.1.0
- regex-with-pcre ==1.1.0.0
- registry ==0.1.7.1
- reinterpret-cast ==0.1.0
- relapse ==1.0.0.0
- relational-query ==0.12.2.2
@ -1738,7 +1741,7 @@ default-package-overrides:
- resourcet ==1.2.3
- result ==0.2.6.0
- rethinkdb-client-driver ==0.0.25
- retry ==0.8.1.0
- retry ==0.8.1.1
- rev-state ==0.1.2
- rfc1751 ==0.1.2
- rfc5051 ==0.1.0.4
@ -1875,7 +1878,7 @@ default-package-overrides:
- simplistic-generics ==0.1.0.0
- since ==0.0.0
- singleton-bool ==0.1.5
- singleton-nats ==0.4.4
- singleton-nats ==0.4.5
- singletons ==2.6
- singletons-presburger ==0.3.0.0
- siphash ==1.0.3
@ -1908,7 +1911,7 @@ default-package-overrides:
- sparse-tensor ==0.2.1.3
- spatial-math ==0.5.0.1
- special-values ==0.1.0.0
- speculate ==0.4.1
- speculate ==0.4.2
- speedy-slice ==0.3.0
- Spintax ==0.3.4
- splice ==0.6.1.1
@ -2060,7 +2063,7 @@ default-package-overrides:
- th-expand-syns ==0.4.6.0
- th-extras ==0.0.0.4
- th-lift ==0.8.1
- th-lift-instances ==0.1.14
- th-lift-instances ==0.1.15
- th-orphans ==0.13.9
- th-printf ==0.7
- thread-hierarchy ==0.3.0.1
@ -2102,7 +2105,7 @@ default-package-overrides:
- topograph ==1.0.0.1
- torsor ==0.1
- tostring ==0.2.1.1
- tracing ==0.0.4.0
- tracing ==0.0.5.1
- transaction ==0.1.1.3
- transformers-base ==0.4.5.2
- transformers-bifunctors ==0.1
@ -2208,7 +2211,7 @@ default-package-overrides:
- validity-uuid ==0.1.0.3
- validity-vector ==0.2.0.3
- valor ==0.1.0.0
- vault ==0.3.1.3
- vault ==0.3.1.4
- vec ==0.3
- vector ==0.12.1.2
- vector-algorithms ==0.8.0.3
@ -2245,7 +2248,7 @@ default-package-overrides:
- wai-session ==0.3.3
- wai-slack-middleware ==0.2.0
- wai-websockets ==3.0.1.2
- warp ==3.3.9
- warp ==3.3.10
- warp-tls ==3.2.11
- warp-tls-uid ==0.2.0.6
- wave ==0.2.0
@ -4329,7 +4332,6 @@ broken-packages:
- duet
- dumb-cas
- dump-core
- dunai
- dunai-core
- dunai-test
- Dung
@ -5618,7 +5620,6 @@ broken-packages:
- hasql-migration
- hasql-notifications
- hasql-optparse-applicative
- hasql-pool
- hasql-postgres
- hasql-postgres-options
- hasql-simple
@ -7842,6 +7843,7 @@ broken-packages:
- onama
- ONC-RPC
- oneormore
- online-csv
- onpartitions
- OnRmt
- onu-course
@ -8284,7 +8286,6 @@ broken-packages:
- postgresql-simple-typed
- postgresql-typed
- postgresql-typed-lifted
- postgrest
- postgrest-ws
- postie
- postmark
@ -8905,6 +8906,7 @@ broken-packages:
- saferoute
- sai-shape-syb
- sajson
- sak
- salak-toml
- Salsa
- saltine-quickcheck
@ -9187,7 +9189,6 @@ broken-packages:
- simgi
- simple
- simple-actors
- simple-affine-space
- simple-atom
- simple-bluetooth
- simple-c-value

View File

@ -572,23 +572,9 @@ self: super: builtins.intersectAttrs super {
# The test-suite requires a running PostgreSQL server.
Frames-beam = dontCheck super.Frames-beam;
# * Compile manpages (which are in RST and are compiled with Sphinx).
#
# * Wrap so that binary can find GCC and OpenCL headers (dubious if
# a good idea).
# Compile manpages (which are in RST and are compiled with Sphinx).
futhark = with pkgs;
let maybeWrap =
if pkgs.stdenv.isDarwin then ""
else
let path = stdenv.lib.makeBinPath [ gcc ];
in ''
wrapProgram $out/bin/futhark \
--prefix PATH : "${path}" \
--set NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST 1 \
--set NIX_CFLAGS_COMPILE "-I${opencl-headers}/include" \
--set NIX_CFLAGS_LINK "-L${ocl-icd}/lib"
'';
in overrideCabal (addBuildTools super.futhark [makeWrapper python37Packages.sphinx])
overrideCabal (addBuildTools super.futhark [makeWrapper python37Packages.sphinx])
(_drv: {
postBuild = (_drv.postBuild or "") + ''
make -C docs man
@ -597,8 +583,7 @@ self: super: builtins.intersectAttrs super {
postInstall = (_drv.postInstall or "") + ''
mkdir -p $out/share/man/man1
mv docs/_build/man/*.1 $out/share/man/man1/
''
+ maybeWrap;
'';
});
git-annex = with pkgs;
@ -655,22 +640,19 @@ self: super: builtins.intersectAttrs super {
spago =
let
# Spago needs a patch for MonadFail changes.
# https://github.com/purescript/spago/pull/584
# This can probably be removed when a version after spago-0.14.0 is released.
# Spago needs a small patch to work with the latest versions of rio.
# https://github.com/purescript/spago/pull/616
# This can probably be removed when a version after spago-0.15.1 is released.
spagoWithPatches = appendPatch super.spago (pkgs.fetchpatch {
url = "https://github.com/purescript/spago/pull/584/commits/898a8e48665e5a73ea03525ce2c973455ab9ac52.patch";
sha256 = "05gs1hjlcf60cr6728rhgwwgxp3ildly14v4l2lrh6ma2fljhyjy";
url = "https://github.com/purescript/spago/pull/616/commits/95b5fa0f1d3bfb07972d1ef5004b8bee8a070667.patch";
sha256 = "0v3890lwhddfrq9mhbq92962pkxra8kwbin97wg3s0b02dk65ysc";
});
# Spago basically compiles with LTS-14, but it requires a newer version
# of directory. This is to work around a bug only present on windows, so
# we can safely jailbreak spago and use the older directory package from
# LTS-14.
spagoWithOverrides = doJailbreak (spagoWithPatches.override {
# spago requires dhall-1.29.0.
dhall = self.dhall_1_29_0;
});
spagoWithOverrides = doJailbreak spagoWithPatches;
# This defines the version of the purescript-docs-search release we are using.
# This is defined in the src/Spago/Prelude.hs file in the spago source.
@ -742,4 +724,13 @@ self: super: builtins.intersectAttrs super {
# dhall_1_29_0 is no longer used, since more recent versions of dhall don't
# access the network in checks.
dhall_1_29_0 = dontCheck super.dhall_1_29_0;
cut-the-crap =
let path = pkgs.stdenv.lib.makeBinPath [ pkgs.ffmpeg ];
in overrideCabal (addBuildTool super.cut-the-crap pkgs.makeWrapper) (_drv: {
postInstall = ''
wrapProgram $out/bin/cut-the-crap \
--prefix PATH : "${path}"
'';
});
}

View File

@ -4,62 +4,91 @@ with haskellLib;
self: super:
let
# This contains updates to the dependencies, without which it would
# be even more work to get it to build.
# As of 2020-04, there's no new release in sight, which is why we're
# pulling from Github.
tensorflow-haskell = pkgs.fetchFromGitHub {
owner = "tensorflow";
repo = "haskell";
rev = "85bf0bb12cecfcdfcf31dea43b67cbe44576f685";
sha256 = "1xbwc8y4a7n2163g746dpyh1q86rbxaw3d41kcy1mbhvmfqq56x7";
rev = "0f322b2e0611cbe7011c84ba8b6cb822e4725ebc";
sha256 = "15gn66i547q20sd50ixwm6yk1g00syfgxp8xa6xjd0i3kcsl3gs1";
fetchSubmodules = true;
};
setSourceRoot = dir: drv: drv.overrideAttrs (_oldAttrs: {sourceRoot = "source/${dir}";});
setTensorflowSourceRoot = dir: drv:
(overrideCabal drv (drv: { src = tensorflow-haskell; }))
.overrideAttrs (_oldAttrs: {sourceRoot = "source/${dir}";});
proto-lens = self.proto-lens;
proto-lens-protoc = self.proto-lens-protoc;
proto-lens-protobuf-types = self.proto-lens-protobuf-types;
mainland-pretty = self.mainland-pretty_0_6_2;
proto-lens = self.proto-lens_0_5_1_0;
proto-lens-protoc = self.proto-lens-protoc_0_5_0_0;
proto-lens-runtime = self.proto-lens-runtime_0_5_0_0;
proto-lens-protobuf-types = self.proto-lens-protobuf-types_0_5_0_0;
proto-lens-setup = self.proto-lens-setup_0_4_0_2;
lens-family = self.lens-family_1_2_3;
in
{
proto-lens = appendPatch super.proto-lens ./patches/proto-lens-0.2.2.0.patch;
proto-lens-descriptors = doJailbreak (super.proto-lens-descriptors.override {
inherit proto-lens;
lens-labels = self.lens-labels_0_1_0_2;
});
proto-lens-protoc = appendPatch (addBuildDepend (super.proto-lens-protoc.override {
inherit proto-lens;
}) self.semigroups) ./patches/proto-lens-protoc-0.2.2.3.patch;
proto-lens-protobuf-types = doJailbreak (super.proto-lens-protobuf-types.override {
inherit proto-lens proto-lens-protoc;
lens-family_1_2_3 = super.lens-family_1_2_3.override {
lens-family-core = self.lens-family-core_1_2_3;
};
proto-lens_0_5_1_0 = (appendPatch (doJailbreak super.proto-lens_0_5_1_0) ./patches/proto-lens-0.5.1.0.patch).override {
inherit lens-family;
};
proto-lens-runtime_0_5_0_0 = doJailbreak (super.proto-lens-runtime_0_5_0_0.override {
inherit lens-family proto-lens;
});
lens-labels_0_1_0_2 = doJailbreak super.lens-labels_0_1_0_2;
proto-lens-protoc_0_5_0_0 = doJailbreak (super.proto-lens-protoc_0_5_0_0.override {
inherit lens-family proto-lens;
haskell-src-exts = self.haskell-src-exts_1_19_1;
});
proto-lens-setup_0_4_0_2 = appendPatch (doJailbreak (super.proto-lens-setup_0_4_0_2.override {
inherit proto-lens-protoc;
})) ./patches/proto-lens-setup-0.4.0.2.patch;
haskell-src-exts_1_19_1 = appendPatch (doJailbreak super.haskell-src-exts_1_19_1) (
proto-lens-protobuf-types_0_5_0_0 = doJailbreak (super.proto-lens-protobuf-types_0_5_0_0.override {
inherit lens-family proto-lens proto-lens-runtime proto-lens-setup;
});
haskell-src-exts_1_19_1 = appendPatches (doJailbreak super.haskell-src-exts_1_19_1) [
# Adapt to the SemigroupMonoid Proposal (enables building on GHC >= 8.4)
pkgs.fetchpatch {
url = "https://github.com/haskell-suite/haskell-src-exts/commit/258e072fe9e37f94360b7488b58ea2832843bbb8.patch";
sha256 = "0ja6ai41v9plinlhjwja282m6ahn6mw4xi79np0jxqk83cg0z1ff";
}
);
(pkgs.fetchpatch {
url = https://github.com/haskell-suite/haskell-src-exts/commit/258e072fe9e37f94360b7488b58ea2832843bbb8.patch;
sha256 = "0ja6ai41v9plinlhjwja282m6ahn6mw4xi79np0jxqk83cg0z1ff";
})
# Adapt to MonadFail proposal (enables building on GHC >= 8.8)
(pkgs.fetchpatch {
url = https://gist.githubusercontent.com/mikesperber/0f2addaf3fbe97ffb4a5234d8711ba41/raw/e09e20998283c7195e82d546ba9266d290eb000d/gistfile1.txt;
sha256 = "18clvli7vpqsqlf2f3qidn71738j9zdlpana6wha3x0dxwan5ly0";
}) ];
tensorflow-proto = super.tensorflow-proto.override {
inherit proto-lens proto-lens-protobuf-types;
tensorflow-proto = (setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto).override {
inherit proto-lens proto-lens-runtime proto-lens-setup proto-lens-protobuf-types;
};
tensorflow = super.tensorflow.override {
inherit mainland-pretty proto-lens;
tensorflow = (setTensorflowSourceRoot "tensorflow" super.tensorflow).override {
inherit lens-family proto-lens;
# the "regular" Python package does not seem to include the binary library
libtensorflow = pkgs.libtensorflow-bin;
};
tensorflow-core-ops = super.tensorflow-core-ops.override {
inherit mainland-pretty proto-lens;
tensorflow-core-ops = (setTensorflowSourceRoot "tensorflow-core-ops" super.tensorflow-core-ops).override {
inherit lens-family proto-lens;
};
tensorflow-logging = super.tensorflow-logging.override {
inherit proto-lens;
tensorflow-logging = (setTensorflowSourceRoot "tensorflow-logging" super.tensorflow-logging).override {
inherit lens-family proto-lens;
};
tensorflow-mnist = overrideCabal (super.tensorflow-mnist.override {
inherit proto-lens;
tensorflow-mnist = (setTensorflowSourceRoot "tensorflow-mnist" super.tensorflow-mnist).override {
inherit lens-family proto-lens;
# https://github.com/tensorflow/haskell/issues/215
tensorflow-mnist-input-data = self.tensorflow-mnist-input-data;
}) (_drv: { broken = false; });
tensorflow-mnist-input-data = setSourceRoot "tensorflow-mnist-input-data" (super.callPackage (
};
tensorflow-mnist-input-data = setTensorflowSourceRoot "tensorflow-mnist-input-data" (super.callPackage (
{ mkDerivation, base, bytestring, Cabal, cryptonite, directory
, filepath, HTTP, network-uri, stdenv
}:
@ -80,7 +109,6 @@ in
mkDerivation {
pname = "tensorflow-mnist-input-data";
version = "0.1.0.0";
src = tensorflow-haskell;
enableSeparateDataOutput = true;
setupHaskellDepends = [
base bytestring Cabal cryptonite directory filepath HTTP
@ -95,10 +123,12 @@ in
license = stdenv.lib.licenses.asl20;
}
) {});
tensorflow-opgen = super.tensorflow-opgen.override {
inherit mainland-pretty proto-lens;
tensorflow-opgen = (setTensorflowSourceRoot "tensorflow-opgen" super.tensorflow-opgen).override {
inherit lens-family proto-lens;
};
tensorflow-ops = super.tensorflow-ops.override {
inherit proto-lens;
tensorflow-ops = (setTensorflowSourceRoot "tensorflow-ops" super.tensorflow-ops).override {
inherit lens-family proto-lens;
};
}

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +0,0 @@
diff -Naur proto-lens-0.2.2.0/proto-lens.cabal proto-lens-0.2.2.0-patched/proto-lens.cabal
--- proto-lens-0.2.2.0/proto-lens.cabal 2018-08-13 18:05:41.704823370 +0200
+++ proto-lens-0.2.2.0-patched/proto-lens.cabal 2018-08-13 18:07:42.352372300 +0200
@@ -33,7 +33,7 @@
Data.ProtoLens.Encoding.Wire
Data.ProtoLens.TextFormat.Parser
build-depends: attoparsec == 0.13.*
- , base >= 4.8 && < 4.11
+ , base >= 4.8
, bytestring == 0.10.*
, containers == 0.5.*
, data-default-class >= 0.0 && < 0.2
diff -Naur proto-lens-0.2.2.0/src/Data/ProtoLens/TextFormat.hs proto-lens-0.2.2.0-patched/src/Data/ProtoLens/TextFormat.hs
--- proto-lens-0.2.2.0/src/Data/ProtoLens/TextFormat.hs 2017-04-28 02:16:46.000000000 +0200
+++ proto-lens-0.2.2.0-patched/src/Data/ProtoLens/TextFormat.hs 2018-08-13 18:08:06.371486594 +0200
@@ -17,6 +17,7 @@
readMessageOrDie,
) where
+import Prelude hiding ((<>))
import Lens.Family2 ((&),(^.),(.~), set, over)
import Control.Arrow (left)
import qualified Data.ByteString

View File

@ -0,0 +1,23 @@
diff --git a/src/Data/ProtoLens/Encoding/Parser/Internal.hs b/src/Data/ProtoLens/Encoding/Parser/Internal.hs
index 30eeaad..f2703e7 100644
--- a/src/Data/ProtoLens/Encoding/Parser/Internal.hs
+++ b/src/Data/ProtoLens/Encoding/Parser/Internal.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE CPP #-}
-- | Definition of the parsing monad, plus internal
-- unsafe functions.
module Data.ProtoLens.Encoding.Parser.Internal
@@ -36,8 +37,11 @@ instance Applicative Parser where
(<*>) = ap
instance Monad Parser where
- fail s = Parser $ \_ _ -> return $ ParseFailure s
return = pure
Parser f >>= g = Parser $ \end pos -> f end pos >>= \case
ParseSuccess pos' x -> unParser (g x) end pos'
ParseFailure s -> return $ ParseFailure s
+#if MIN_VERSION_base(4,13,0)
+instance MonadFail Parser where
+#endif
+ fail s = Parser $ \_ _ -> return $ ParseFailure s

View File

@ -1,51 +0,0 @@
diff -Naur proto-lens-protoc-0.2.2.3/proto-lens-protoc.cabal proto-lens-protoc-0.2.2.3-patched/proto-lens-protoc.cabal
--- proto-lens-protoc-0.2.2.3/proto-lens-protoc.cabal 2018-07-21 22:55:12.041698876 +0200
+++ proto-lens-protoc-0.2.2.3-patched/proto-lens-protoc.cabal 2018-08-13 19:44:44.993147985 +0200
@@ -37,8 +37,8 @@
default-language: Haskell2010
hs-source-dirs: src
build-depends:
- Cabal >= 1.22 && < 2.1
- , base >= 4.8 && < 4.11
+ Cabal >= 1.22
+ , base >= 4.8
, bytestring == 0.10.*
, containers == 0.5.*
, data-default-class >= 0.0 && < 0.2
@@ -53,6 +53,7 @@
, proto-lens == 0.2.2.*
, proto-lens-descriptors == 0.2.2.*
, text == 1.2.*
+ , semigroups
reexported-modules:
-- Modules that are needed by the generated Haskell files.
-- For forwards compatibility, reexport them as new module names so that
@@ -76,7 +77,7 @@
main-is: protoc-gen-haskell.hs
build-depends:
- base >= 4.8 && < 4.11
+ base >= 4.8
, bytestring == 0.10.*
, containers == 0.5.*
, data-default-class >= 0.0 && < 0.2
diff -Naur proto-lens-protoc-0.2.2.3/src/Data/ProtoLens/Compiler/Definitions.hs proto-lens-protoc-0.2.2.3-patched/src/Data/ProtoLens/Compiler/Definitions.hs
--- proto-lens-protoc-0.2.2.3/src/Data/ProtoLens/Compiler/Definitions.hs 2017-08-07 06:52:21.000000000 +0200
+++ proto-lens-protoc-0.2.2.3-patched/src/Data/ProtoLens/Compiler/Definitions.hs 2018-08-13 19:14:07.240505220 +0200
@@ -35,6 +35,7 @@
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
import Data.Monoid
+import qualified Data.Semigroup as Semigroup
import qualified Data.Set as Set
import Data.String (IsString(..))
import Data.Text (Text, cons, splitOn, toLower, uncons, unpack)
@@ -139,7 +140,7 @@
-- a 'Symbol' is used to construct both the type-level argument to
-- @HasLens@ and the name of the function @foo@.
newtype Symbol = Symbol String
- deriving (Eq, Ord, IsString, Monoid)
+ deriving (Eq, Ord, IsString, Semigroup.Semigroup, Monoid)
nameFromSymbol :: Symbol -> Name
nameFromSymbol (Symbol s) = fromString s

View File

@ -0,0 +1,154 @@
diff --git a/src/Data/ProtoLens/Setup.hs b/src/Data/ProtoLens/Setup.hs
index e68f32b..f381199 100644
--- a/src/Data/ProtoLens/Setup.hs
+++ b/src/Data/ProtoLens/Setup.hs
@@ -41,9 +41,6 @@ import Distribution.PackageDescription
, exeName
, exposedModules
, extraSrcFiles
-#if !MIN_VERSION_Cabal(2,0,0)
- , hsSourceDirs
-#endif
#if MIN_VERSION_Cabal(2,4,0)
, specVersion
#endif
@@ -53,7 +50,7 @@ import Distribution.PackageDescription
, testBuildInfo
, testName
)
-import qualified Distribution.Simple.BuildPaths as BuildPaths
+import Distribution.Simple.BuildPaths (autogenComponentModulesDir)
import Distribution.Simple.InstallDirs (datadir)
import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..)
@@ -61,9 +58,10 @@ import Distribution.Simple.LocalBuildInfo
, ComponentName(..)
, ComponentLocalBuildInfo
, componentPackageDeps
-#if MIN_VERSION_Cabal(2,0,0)
, allComponentsInBuildOrder
, componentNameMap
+#if MIN_VERSION_Cabal(3,0,0)
+ , LibraryName(..)
#endif
)
import qualified Distribution.Simple.PackageIndex as PackageIndex
@@ -205,16 +203,6 @@ generatingSpecificProtos root getProtos hooks = hooks
{ buildHook = \p l h f -> generate l >> buildHook hooks p l h f
, haddockHook = \p l h f -> generate l >> haddockHook hooks p l h f
, replHook = \p l h f args -> generate l >> replHook hooks p l h f args
-#if !MIN_VERSION_Cabal(2,0,0)
- -- Older versions of Cabal don't support the autogen-modules field.
- -- Work around it by manually generating the modules and putting them
- -- in a place where `cabal sdist` will pick them up.
- , sDistHook = \p maybe_l h f -> case maybe_l of
- Nothing -> error "Can't run protoc; run 'cabal configure' first."
- Just l -> do
- generate l
- sDistHook hooks (fudgePackageDesc l p) maybe_l h f
-#endif
, postCopy = \a flags pkg lbi -> do
let verb = fromFlag $ copyVerbosity flags
let destDir = datadir (absoluteInstallDirs pkg lbi
@@ -316,39 +304,6 @@ copyProtosToDataDir verb root destDir files = do
protoLensImportsPrefix :: FilePath
protoLensImportsPrefix = "proto-lens-imports"
-#if !MIN_VERSION_Cabal(2,0,0)
--- | Add the autogen directory to the hs-source-dirs of all the targets in the
--- .cabal file. Used to fool 'sdist' by pointing it to the generated source
--- files.
-fudgePackageDesc :: LocalBuildInfo -> PackageDescription -> PackageDescription
-fudgePackageDesc lbi p = p
- { library =
- (\lib -> lib { libBuildInfo = fudgeBuildInfo CLibName $ libBuildInfo lib })
- <$> library p
- , executables =
- (\exe -> exe { buildInfo = fudgeBuildInfo (CExeName $ exeName exe)
- $ buildInfo exe })
- <$> executables p
- , testSuites =
- (\test -> test { testBuildInfo = fudgeBuildInfo (CTestName $ testName test)
- $ testBuildInfo test })
- <$> testSuites p
- , benchmarks =
- (\bench -> bench { benchmarkBuildInfo =
- fudgeBuildInfo (CBenchName $ benchmarkName bench)
- $ benchmarkBuildInfo bench })
- <$> benchmarks p
- }
- where
- comps = allComponents lbi
- fudgeBuildInfo n bi
- | Just compLBI <- Map.lookup n comps
- = bi { hsSourceDirs = autogenComponentModulesDir lbi compLBI
- : hsSourceDirs bi }
- | otherwise = bi -- Could happen if a component isn't active; try
- -- anyway and see whether Cabal complains later on.
-#endif
-
-- | Returns whether the @root@ is a parent folder of @f@.
isSubdirectoryOf :: FilePath -> FilePath -> Bool
isSubdirectoryOf root f
@@ -423,15 +378,18 @@ collectActiveModules
collectActiveModules l = map (\(n, c) -> (c, f n)) $ Map.toList $ allComponents l
where
p = localPkgDescr l
- f CLibName = maybeToList (library p) >>=
+#if MIN_VERSION_Cabal(3,0,0)
+ f (CLibName LMainLibName)
+#else
+ f CLibName
+#endif
+ = maybeToList (library p) >>=
\lib -> exposedModules lib
++ otherModules (libBuildInfo lib)
f (CExeName n) = otherModules . buildInfo $ exes Map.! n
f (CTestName n) = otherModules . testBuildInfo $ tests Map.! n
f (CBenchName n) = otherModules . benchmarkBuildInfo $ benchs Map.! n
-#if MIN_VERSION_Cabal(2,0,0)
f _ = [] -- TODO: other lib kinds; for now just suppress the warning
-#endif
exes = Map.fromList [(exeName e, e) | e <- executables p]
tests = Map.fromList [(testName e, e) | e <- testSuites p]
benchs = Map.fromList [(benchmarkName e, e) | e <- benchmarks p]
@@ -441,22 +399,14 @@ collectActiveModules l = map (\(n, c) -> (c, f n)) $ Map.toList $ allComponents
-- | List all the packages that this one depends on.
collectDeps :: LocalBuildInfo -> [InstalledPackageInfo.InstalledPackageInfo]
-#if MIN_VERSION_Cabal(2,0,0)
collectDeps l = do
c <- allComponentsInBuildOrder l
(i,_) <- componentPackageDeps c
Just p <- [PackageIndex.lookupUnitId (installedPkgs l) i]
return p
-#else
-collectDeps l = do
- (_, c ,_) <- componentsConfigs l
- (_, i) <- componentPackageDeps c
- PackageIndex.lookupSourcePackageId (installedPkgs l) i
-#endif
-- | All the components that will be built by this Cabal command.
allComponents :: LocalBuildInfo -> Map.Map ComponentName ComponentLocalBuildInfo
-#if MIN_VERSION_Cabal(2,0,0)
allComponents l = fmap requireOne $ componentNameMap l
where
-- TODO: this doesn't support Backpack, which can have more than one
@@ -464,16 +414,3 @@ allComponents l = fmap requireOne $ componentNameMap l
requireOne [x] = x
requireOne xs = error $ "Data.ProtoLens.Setup.allComponents: expected one "
++ "component per name, got " ++ show xs
-
-#else
-allComponents l = Map.fromList [(c, b) | (c, b, _) <- componentsConfigs l]
-#endif
-
--- | Get the component-level "autogen" directory where we're putting the
--- generated .hs files. (For Cabal-1.0, use the shared 'BuildPaths.autogenModulesDir'.)
-autogenComponentModulesDir :: LocalBuildInfo -> ComponentLocalBuildInfo -> FilePath
-#if MIN_VERSION_Cabal(2,0,0)
-autogenComponentModulesDir = BuildPaths.autogenComponentModulesDir
-#else
-autogenComponentModulesDir lbi _ = BuildPaths.autogenModulesDir lbi
-#endif

View File

@ -127,7 +127,18 @@ symlinkJoin {
rm $f-tmp
done
'') + ''
${lib.optionalString hasLibraries "$out/bin/${ghcCommand}-pkg recache"}
${lib.optionalString hasLibraries ''
# GHC 8.10 changes.
# Instead of replacing package.cache[.lock] with the new file,
# ghc-pkg is now trying to open the file. These file are symlink
# to another nix derivation, so they are not writable. Removing
# them allow the correct behavior of ghc-pkg recache
# See: https://github.com/NixOS/nixpkgs/issues/79441
rm $out/lib/${ghc.name}/package.conf.d/package.cache.lock
rm $out/lib/${ghc.name}/package.conf.d/package.cache
$out/bin/${ghcCommand}-pkg recache
''}
${# ghcjs will read the ghc_libdir file when resolving plugins.
lib.optionalString (isGhcjs && ghcLibdir != null) ''
mkdir -p "${libDir}"

View File

@ -7,15 +7,15 @@
, prettyprinter, process, QuickCheck, retry, rio, rio-orphans, safe
, semver-range, stdenv, stm, tar, template-haskell, temporary, text
, time, transformers, turtle, unliftio, unordered-containers
, vector, versions, zlib
, vector, versions, with-utf8, zlib
}:
mkDerivation {
pname = "spago";
version = "0.14.0";
version = "0.15.1";
src = fetchgit {
url = "https://github.com/purescript/spago.git";
sha256 = "12i1430prqspy73nwfxc17zf51yprhrxxcnhw4rks6jhkgwxf4a4";
rev = "7a99343e4876a465600eaa64b0697a9f0b2a49a9";
sha256 = "09ypbm03ap8xfhq803ra3cc01dxcavckn7nis6hi80dk2xxlhc3d";
rev = "d5d206ff0f5c686f8b609fb4bc2e866959cc0144";
fetchSubmodules = true;
};
isLibrary = true;
@ -25,17 +25,13 @@ mkDerivation {
bytestring Cabal containers dhall directory either exceptions
file-embed filepath foldl fsnotify github Glob http-client
http-conduit lens-family-core megaparsec mtl network-uri
open-browser prettyprinter process retry rio rio-orphans safe
semver-range stm tar template-haskell temporary text time
transformers turtle unliftio unordered-containers vector versions
zlib
open-browser optparse-applicative prettyprinter process retry rio
rio-orphans safe semver-range stm tar template-haskell temporary
text time transformers turtle unliftio unordered-containers vector
versions with-utf8 zlib
];
libraryToolDepends = [ hpack ];
executableHaskellDepends = [
aeson-pretty async-pool base bytestring containers dhall filepath
github lens-family-core megaparsec optparse-applicative process
retry stm temporary text time turtle vector
];
executableHaskellDepends = [ base text turtle with-utf8 ];
testHaskellDepends = [
base containers directory extra hspec hspec-megaparsec megaparsec
process QuickCheck temporary text turtle versions

View File

@ -81,10 +81,11 @@ in {
llvmPackages = pkgs.llvmPackages_9;
};
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
bootPkgs = packages.ghc865Binary;
bootPkgs = packages.ghc883; # no binary yet
inherit (buildPackages.python3Packages) sphinx;
buildLlvmPackages = buildPackages.llvmPackages_6;
llvmPackages = pkgs.llvmPackages_6;
buildLlvmPackages = buildPackages.llvmPackages_9;
llvmPackages = pkgs.llvmPackages_9;
libffi = pkgs.libffi;
};
ghcjs = compiler.ghcjs86;
ghcjs86 = callPackage ../development/compilers/ghcjs-ng {