Merge pull request #82345 from NixOS/haskell-updates

Update Haskell package set to LTS 15.3 (plus other fixes)
This commit is contained in:
Peter Simons 2020-03-13 21:20:32 +01:00 committed by GitHub
commit 2d08e57e01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1224 additions and 822 deletions

View file

@ -81,12 +81,12 @@ self: super: {
# The Hackage tarball is purposefully broken, because it's not intended to be, like, useful.
# https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
git-annex = (overrideSrc (appendPatch super.git-annex ./patches/git-annex-fix-build-with-ghc-8.8.x.patch) {
git-annex = (overrideSrc super.git-annex {
src = pkgs.fetchgit {
name = "git-annex-${super.git-annex.version}-src";
url = "git://git-annex.branchable.com/";
rev = "refs/tags/" + super.git-annex.version;
sha256 = "0pl0yip7zp4i78cj9jqkmm33wqaaaxjq3ggnfmv95y79yijd6yh4";
sha256 = "0y2qcjahi705c6nnypqpa5w3bzyzk4kqvbwfnpiaxzk5vna589gg";
};
}).override {
dbus = if pkgs.stdenv.isLinux then self.dbus else null;
@ -376,6 +376,7 @@ self: super: {
Rlang-QQ = dontCheck super.Rlang-QQ;
safecopy = dontCheck super.safecopy;
sai-shape-syb = dontCheck super.sai-shape-syb;
saltine = dontCheck super.saltine; # https://github.com/tel/saltine/pull/56
scp-streams = dontCheck super.scp-streams;
sdl2 = dontCheck super.sdl2; # the test suite needs an x server
sdl2-ttf = dontCheck super.sdl2-ttf; # as of version 0.2.1, the test suite requires user intervention
@ -1219,7 +1220,13 @@ self: super: {
temporary-resourcet = doJailbreak super.temporary-resourcet;
# Requires dhall >= 1.23.0
ats-pkg = super.ats-pkg.override { dhall = self.dhall_1_29_0; };
ats-pkg = dontCheck (super.ats-pkg.override { dhall = self.dhall_1_29_0; });
# fake a home dir and capture generated man page
ats-format = overrideCabal super.ats-format (old : {
preConfigure = "export HOME=$PWD";
postBuild = "mv .local/share $out";
});
# Test suite doesn't work with current QuickCheck
# https://github.com/pruvisto/heap/issues/11
@ -1467,4 +1474,26 @@ self: super: {
# haskell-ci-0.8 needs cabal-install-parsers ==0.1, but we have 0.2.
haskell-ci = doJailbreak super.haskell-ci;
persistent-mysql = dontCheck super.persistent-mysql;
# Fix EdisonAPI and EdisonCore for GHC 8.8:
# https://github.com/robdockins/edison/pull/16
EdisonAPI = appendPatch super.EdisonAPI (pkgs.fetchpatch {
url = "https://github.com/robdockins/edison/pull/16/commits/8da6c0f7d8666766e2f0693425c347c0adb492dc.patch";
postFetch = ''
${pkgs.patchutils}/bin/filterdiff --include='a/edison-api/*' --strip=1 "$out" > "$tmpfile"
mv "$tmpfile" "$out"
'';
sha256 = "0yi5pz039lcm4pl9xnl6krqxyqq5rgb5b6m09w0sfy06x0n4x213";
});
EdisonCore = appendPatch super.EdisonCore (pkgs.fetchpatch {
url = "https://github.com/robdockins/edison/pull/16/commits/8da6c0f7d8666766e2f0693425c347c0adb492dc.patch";
postFetch = ''
${pkgs.patchutils}/bin/filterdiff --include='a/edison-core/*' --strip=1 "$out" > "$tmpfile"
mv "$tmpfile" "$out"
'';
sha256 = "097wqn8hxsr50b9mhndg5pjim5jma2ym4ylpibakmmb5m98n17zp";
});
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View file

@ -1,6 +1,6 @@
# pkgs/development/haskell-modules/configuration-hackage2nix.yaml
compiler: ghc-8.8.2
compiler: ghc-8.8.3
core-packages:
- array-0.5.4.0
@ -10,23 +10,23 @@ core-packages:
- Cabal-3.0.1.0
- containers-0.6.2.1
- deepseq-1.4.4.0
- directory-1.3.4.0
- directory-1.3.6.0
- filepath-1.4.2.1
- ghc-8.8.2
- ghc-boot-8.8.2
- ghc-boot-th-8.8.2
- ghc-8.8.3
- ghc-boot-8.8.3
- ghc-boot-th-8.8.3
- ghc-compact-0.1.0.0
- ghc-heap-8.8.2
- ghc-heap-8.8.3
- ghc-prim-0.5.3
- ghci-8.8.2
- ghci-8.8.3
- haskeline-0.7.5.0
- hpc-0.6.0.3
- integer-gmp-1.0.2.0
- libiserv-8.8.2
- libiserv-8.8.3
- mtl-2.2.2
- parsec-3.1.14.0
- pretty-1.1.3.6
- process-1.6.7.0
- process-1.6.8.0
- rts-1.0
- stm-2.5.0.0
- template-haskell-2.15.0.0
@ -76,7 +76,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.2
# LTS Haskell 15.3
- abstract-deque ==0.3
- abstract-par ==0.3.3
- AC-Angle ==1.0
@ -361,7 +361,7 @@ default-package-overrides:
- bytes ==0.17
- byteset ==0.1.1.0
- byteslice ==0.2.2.0
- bytesmith ==0.3.5.0
- bytesmith ==0.3.6.0
- bytestring-builder ==0.10.8.2.0
- bytestring-conversion ==0.3.1
- bytestring-lexing ==0.5.0.2
@ -407,7 +407,7 @@ default-package-overrides:
- Chart-diagrams ==1.9.3
- chaselev-deque ==0.5.0.5
- ChasingBottoms ==1.3.1.7
- checkers ==0.5.2
- checkers ==0.5.4
- checksum ==0.0
- chimera ==0.3.0.0
- choice ==0.2.2
@ -444,7 +444,7 @@ default-package-overrides:
- co-log ==0.4.0.0
- co-log-core ==0.2.1.0
- co-log-polysemy ==0.0.1.1
- Color ==0.1.3.1
- Color ==0.1.4
- colorful-monoids ==0.2.1.2
- colorize-haskell ==1.0.1
- colour ==2.3.5
@ -577,7 +577,7 @@ default-package-overrides:
- data-tree-print ==0.1.0.2
- dataurl ==0.1.0.0
- DAV ==1.3.4
- dbus ==1.2.11
- dbus ==1.2.12
- debian-build ==0.10.2.0
- debug-trace-var ==0.2.0
- dec ==0.0.3
@ -707,7 +707,7 @@ default-package-overrides:
- extended-reals ==0.2.3.0
- extensible-effects ==5.0.0.1
- extensible-exceptions ==0.1.1.4
- extra ==1.6.20
- extra ==1.6.21
- extractable-singleton ==0.0.1
- extrapolate ==0.4.1
- fail ==4.9.0.0
@ -785,12 +785,12 @@ default-package-overrides:
- funcmp ==1.9
- function-builder ==0.3.0.1
- functor-classes-compat ==1
- fused-effects ==1.0.0.1
- fused-effects ==1.0.2.0
- fusion-plugin ==0.1.1
- fusion-plugin-types ==0.1.0
- fuzzcheck ==0.1.1
- fuzzy ==0.1.0.0
- fuzzy-dates ==0.1.1.1
- fuzzy-dates ==0.1.1.2
- fuzzyset ==0.2.0
- fuzzy-time ==0.1.0.0
- gauge ==0.2.5
@ -868,9 +868,9 @@ default-package-overrides:
- gi-pango ==1.0.22
- giphy-api ==0.7.0.0
- githash ==0.1.3.3
- github-rest ==1.0.1
- github-rest ==1.0.2
- github-types ==0.2.1
- gitlab-haskell ==0.1.5
- gitlab-haskell ==0.1.7
- gitrev ==1.3.1
- gi-xlib ==2.0.8
- gl ==0.9
@ -1059,8 +1059,8 @@ default-package-overrides:
- hunit-dejafu ==2.0.0.1
- hvect ==0.4.0.0
- hvega ==0.5.0.0
- hw-balancedparens ==0.3.0.4
- hw-bits ==0.7.1.0
- hw-balancedparens ==0.3.0.5
- hw-bits ==0.7.1.2
- hw-conduit ==0.2.0.6
- hw-conduit-merges ==0.2.0.0
- hw-diagnostics ==0.0.0.7
@ -1287,7 +1287,7 @@ default-package-overrides:
- markdown-unlit ==0.5.0
- markov-chain ==0.0.3.4
- massiv ==0.4.5.0
- massiv-io ==0.2.0.0
- massiv-io ==0.2.1.0
- massiv-test ==0.1.2
- mathexpr ==0.3.0.0
- math-functions ==0.3.3.0
@ -1331,9 +1331,9 @@ default-package-overrides:
- mime-types ==0.1.0.9
- mini-egison ==0.1.6
- minimal-configuration ==0.1.4
- minimorph ==0.2.1.0
- minimorph ==0.2.2.0
- minio-hs ==1.5.2
- miniutter ==0.5.0.0
- miniutter ==0.5.1.0
- mintty ==0.1.2
- miso ==1.4.0.0
- missing-foreign ==0.1.1
@ -1356,7 +1356,7 @@ default-package-overrides:
- monad-extras ==0.6.0
- monadic-arrays ==0.2.2
- monad-journal ==0.8.1
- monad-logger ==0.3.31
- monad-logger ==0.3.32
- monad-logger-json ==0.1.0.0
- monad-logger-prefix ==0.1.11
- monad-loops ==0.4.3
@ -1551,7 +1551,7 @@ default-package-overrides:
- persistent-sqlite ==2.10.6.2
- persistent-template ==2.8.2.3
- persistent-test ==2.0.3.1
- persistent-typed-db ==0.1.0.0
- persistent-typed-db ==0.1.0.1
- pg-harness-client ==0.6.0
- pgp-wordlist ==0.1.0.3
- pg-transact ==0.3.1.1
@ -1739,7 +1739,7 @@ default-package-overrides:
- rerebase ==1.4.1
- resolv ==0.1.1.3
- resource-pool ==0.2.3.2
- resourcet ==1.2.2
- resourcet ==1.2.3
- result ==0.2.6.0
- rethinkdb-client-driver ==0.0.25
- retry ==0.8.1.0
@ -1747,7 +1747,7 @@ default-package-overrides:
- rfc1751 ==0.1.2
- rfc5051 ==0.1.0.4
- rigel-viz ==0.2.0.0
- rio ==0.1.14.0
- rio ==0.1.14.1
- rio-orphans ==0.1.1.0
- rio-prettyprint ==0.1.0.0
- roc-id ==0.1.0.0
@ -1792,7 +1792,7 @@ default-package-overrides:
- sdl2-gfx ==0.2
- sdl2-image ==2.0.0
- sdl2-mixer ==1.1.0
- sdl2-ttf ==2.1.0
- sdl2-ttf ==2.1.1
- search-algorithms ==0.3.1
- secp256k1-haskell ==0.1.8
- securemem ==0.1.10
@ -2178,7 +2178,7 @@ default-package-overrides:
- unix-bytestring ==0.3.7.3
- unix-compat ==0.5.2
- unix-time ==0.4.7
- unliftio ==0.2.12
- unliftio ==0.2.12.1
- unliftio-core ==0.1.2.0
- unliftio-pool ==0.2.1.0
- unlit ==0.4.0.0
@ -2239,7 +2239,7 @@ default-package-overrides:
- wai-app-static ==3.1.7.1
- wai-conduit ==3.0.0.4
- wai-cors ==0.2.7
- wai-enforce-https ==0.0.1
- wai-enforce-https ==0.0.2
- wai-eventsource ==3.0.0
- wai-extra ==3.0.29.1
- wai-handler-launch ==3.0.3.1
@ -2324,7 +2324,7 @@ default-package-overrides:
- yesod-auth ==1.6.9
- yesod-auth-hashdb ==1.7.1.2
- yesod-bin ==1.6.0.4
- yesod-core ==1.6.17.2
- yesod-core ==1.6.17.3
- yesod-form ==1.6.7
- yesod-gitrev ==0.2.1
- yesod-newsfeed ==1.7.0.0
@ -2344,7 +2344,7 @@ default-package-overrides:
- zeromq4-haskell ==0.8.0
- zeromq4-patterns ==0.3.1.0
- zim-parser ==0.2.1.0
- zip ==1.3.1
- zip ==1.3.2
- zip-archive ==0.4.1
- zippers ==0.3
- zip-stream ==0.2.0.1
@ -2847,6 +2847,7 @@ broken-packages:
- arbor-monad-metric
- arbor-monad-metric-datadog
- arbtt
- archive-tar-bytestring
- archiver
- archlinux
- archlinux-web
@ -2920,8 +2921,6 @@ broken-packages:
- atomic-primops-vector
- atomo
- atp-haskell
- ats-format
- ats-pkg
- ats-setup
- ats-storable
- attempt
@ -3179,6 +3178,8 @@ broken-packages:
- bitcoin-rpc
- bitcoin-script
- bitcoin-tx
- bitcoind-regtest
- bitcoind-rpc
- Bitly
- bitly-cli
- bitmaps
@ -3427,6 +3428,7 @@ broken-packages:
- carte
- cartel
- Cartesian
- cas-store
- casa-abbreviations-and-acronyms
- casadi-bindings
- casadi-bindings-control
@ -4383,8 +4385,6 @@ broken-packages:
- edentv
- edge
- edges
- EdisonAPI
- EdisonCore
- edit
- edit-lenses
- editable
@ -8156,7 +8156,6 @@ broken-packages:
- persistent-map
- persistent-migration
- persistent-mongoDB
- persistent-mysql
- persistent-mysql-haskell
- persistent-protobuf
- persistent-ratelimit
@ -8979,7 +8978,6 @@ broken-packages:
- sajson
- salak-toml
- Salsa
- saltine
- saltine-quickcheck
- salvia
- salvia-demo
@ -9377,7 +9375,6 @@ broken-packages:
- smuggler
- snake
- snake-game
- snap
- snap-accept
- snap-auth-cli
- snap-blaze-clay
@ -10962,5 +10959,3 @@ broken-packages:
- ztar
- zuramaru
- Zwaluw
- zxcvbn-dvorak
- zxcvbn-hs

File diff suppressed because it is too large Load diff

View file

@ -124,7 +124,7 @@ let
sha256Arg = if sha256 == null then "--sha256=" else ''--sha256="${sha256}"'';
in buildPackages.stdenv.mkDerivation {
name = "cabal2nix-${name}";
nativeBuildInputs = [ buildPackages.cabal2nix ];
nativeBuildInputs = [ buildPackages.cabal2nix-unwrapped ];
preferLocalBuild = true;
allowSubstitutes = false;
phases = ["installPhase"];

View file

@ -1,125 +0,0 @@
From f8d8959e43abd88c5e977079f0948e45cf4c0b0c Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Fri, 28 Feb 2020 11:56:48 +0100
Subject: [PATCH] Fix build with ghc-8.8.x.
The 'fail' method has been moved to the 'MonadFail' class. I made the changes
so that the code still compiles with previous versions of 'base' that don't
have the new MonadFail class exported by Prelude yet.
---
CmdLine/GitAnnex/Options.hs | 5 +++--
Command/Expire.hs | 5 +++--
Command/Init.hs | 7 ++++---
Utility/HumanTime.hs | 5 +++--
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs
index 030c83dd5..a9a36d76f 100644
--- a/CmdLine/GitAnnex/Options.hs
+++ b/CmdLine/GitAnnex/Options.hs
@@ -9,6 +9,7 @@
module CmdLine.GitAnnex.Options where
+import Control.Monad.Fail as Fail ( MonadFail(..) )
import Options.Applicative
import qualified Data.Map as M
@@ -215,8 +216,8 @@ parseAllOption = flag' WantAllKeys
<> help "operate on all versions of all files"
)
-parseKey :: Monad m => String -> m Key
-parseKey = maybe (fail "invalid key") return . deserializeKey
+parseKey :: MonadFail m => String -> m Key
+parseKey = maybe (Fail.fail "invalid key") return . deserializeKey
-- Options to match properties of annexed files.
annexedMatchingOptions :: [GlobalOption]
diff --git a/Command/Expire.hs b/Command/Expire.hs
index 83c38e569..37dc33883 100644
--- a/Command/Expire.hs
+++ b/Command/Expire.hs
@@ -17,6 +17,7 @@ import Annex.VectorClock
import qualified Remote
import Utility.HumanTime
+import Control.Monad.Fail as Fail ( MonadFail(..) )
import Data.Time.Clock.POSIX
import qualified Data.Map as M
@@ -105,9 +106,9 @@ parseExpire ps = do
Nothing -> giveup $ "bad expire time: " ++ s
Just d -> Just (now - durationToPOSIXTime d)
-parseActivity :: Monad m => String -> m Activity
+parseActivity :: MonadFail m => String -> m Activity
parseActivity s = case readish s of
- Nothing -> fail $ "Unknown activity. Choose from: " ++
+ Nothing -> Fail.fail $ "Unknown activity. Choose from: " ++
unwords (map show [minBound..maxBound :: Activity])
Just v -> return v
diff --git a/Command/Init.hs b/Command/Init.hs
index db6cb14fb..879a1110f 100644
--- a/Command/Init.hs
+++ b/Command/Init.hs
@@ -13,6 +13,7 @@ import Annex.Version
import Types.RepoVersion
import qualified Annex.SpecialRemote
+import Control.Monad.Fail as Fail ( MonadFail(..) )
import qualified Data.Map as M
cmd :: Command
@@ -33,14 +34,14 @@ optParser desc = InitOptions
<> help "Override default annex.version"
))
-parseRepoVersion :: Monad m => String -> m RepoVersion
+parseRepoVersion :: MonadFail m => String -> m RepoVersion
parseRepoVersion s = case RepoVersion <$> readish s of
- Nothing -> fail $ "version parse error"
+ Nothing -> Fail.fail $ "version parse error"
Just v
| v `elem` supportedVersions -> return v
| otherwise -> case M.lookup v autoUpgradeableVersions of
Just v' -> return v'
- Nothing -> fail $ s ++ " is not a currently supported repository version"
+ Nothing -> Fail.fail $ s ++ " is not a currently supported repository version"
seek :: InitOptions -> CommandSeek
seek = commandAction . start
diff --git a/Utility/HumanTime.hs b/Utility/HumanTime.hs
index 01fbeacfb..d2e70f332 100644
--- a/Utility/HumanTime.hs
+++ b/Utility/HumanTime.hs
@@ -19,6 +19,7 @@ module Utility.HumanTime (
import Utility.PartialPrelude
import Utility.QuickCheck
+import Control.Monad.Fail as Fail ( MonadFail(..) )
import qualified Data.Map as M
import Data.Time.Clock
import Data.Time.Clock.POSIX (POSIXTime)
@@ -44,7 +45,7 @@ daysToDuration :: Integer -> Duration
daysToDuration i = Duration $ i * dsecs
{- Parses a human-input time duration, of the form "5h", "1m", "5h1m", etc -}
-parseDuration :: Monad m => String -> m Duration
+parseDuration :: MonadFail m => String -> m Duration
parseDuration = maybe parsefail (return . Duration) . go 0
where
go n [] = return n
@@ -55,7 +56,7 @@ parseDuration = maybe parsefail (return . Duration) . go 0
u <- M.lookup c unitmap
go (n + num * u) rest
_ -> return $ n + num
- parsefail = fail "duration parse error; expected eg \"5m\" or \"1h5m\""
+ parsefail = Fail.fail "duration parse error; expected eg \"5m\" or \"1h5m\""
fromDuration :: Duration -> String
fromDuration Duration { durationSeconds = d }
--
2.25.1

View file

@ -1342,19 +1342,17 @@ in
cue2pops = callPackage ../tools/cd-dvd/cue2pops { };
cabal2nix = haskell.lib.overrideCabal (haskell.lib.generateOptparseApplicativeCompletion "cabal2nix" haskell.packages.ghc881.cabal2nix) (drv: {
isLibrary = false;
enableSharedExecutables = false;
executableToolDepends = (drv.executableToolDepends or []) ++ [ makeWrapper ];
postInstall = ''
exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
install -D $out/bin/${drv.pname} $exe
rm -rf $out/{bin,lib,share}
makeWrapper $exe $out/bin/${drv.pname} \
--prefix PATH ":" "${nix}/bin" \
--prefix PATH ":" "${nix-prefetch-scripts}/bin"
'' + (drv.postInstall or "");
});
cabal2nix-unwrapped = haskell.lib.justStaticExecutables (haskell.lib.generateOptparseApplicativeCompletion "cabal2nix" haskellPackages.cabal2nix);
cabal2nix = symlinkJoin {
inherit (cabal2nix-unwrapped) name meta;
nativeBuildInputs = [ makeWrapper ];
paths = [ cabal2nix-unwrapped ];
postBuild = ''
wrapProgram $out/bin/cabal2nix \
--prefix PATH ":" "${lib.makeBinPath [ nix nix-prefetch-scripts ]}"
'';
};
stack2nix = with haskell.lib; overrideCabal (justStaticExecutables haskellPackages.stack2nix) (drv: {
executableToolDepends = [ makeWrapper ];
@ -8310,7 +8308,7 @@ in
# Please update doc/languages-frameworks/haskell.section.md, “Our
# current default compiler is”, if you bump this:
haskellPackages = dontRecurseIntoAttrs haskell.packages.ghc882;
haskellPackages = dontRecurseIntoAttrs haskell.packages.ghc883;
inherit (haskellPackages) ghc;