Merge pull request #86116 from NixOS/haskell-updates

Update Haskell package set to LTS 15.10 (plus other fixes)
This commit is contained in:
Peter Simons 2020-05-01 21:59:02 +02:00 committed by GitHub
commit 4b942e88cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1596 additions and 1050 deletions

View File

@ -1,6 +1,6 @@
{ fetchurl }:
fetchurl {
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/3e87a900a11faa97a8a068874c932f3172d0aa76.tar.gz";
sha256 = "0cf35vics1211pr1g8a804zm3w4lsdacqkgw3hqk7wdrrbasb8ip";
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/9d50cd974714cdcfdaabd089923b571a66bae55a.tar.gz";
sha256 = "1hv4pxp47850l36ci2ywmc75c95fvdqr3swz9qymy25gd6rbfs9f";
}

View File

@ -45,12 +45,6 @@ self: super: {
# Needs older QuickCheck version
attoparsec-varword = dontCheck super.attoparsec-varword;
# http://bugs.darcs.net/issue2642
darcs = doJailbreak (appendPatches super.darcs [
./patches/darcs-setup.patch
./patches/darcs-2.14.2-Compile-against-GHC-8.8.patch
]);
# Tests are failing
# https://github.com/bos/statistics/issues/123
statistics = dontCheck super.statistics;
@ -1073,35 +1067,8 @@ self: super: {
# Generate shell completion.
cabal2nix = generateOptparseApplicativeCompletion "cabal2nix" super.cabal2nix;
stack =
let
stackWithOverrides =
super.stack.override {
# stack-2.1.3.1 requires pantry-0.2.0.0.
pantry = self.pantry_0_2_0_0;
};
in
generateOptparseApplicativeCompletion
"stack"
(appendPatches stackWithOverrides [
# This PR fixes stack up to be able to build with Cabal-3. This patch
# can probably be dropped when the next stack release is made after
# 2.1.3.1.
(pkgs.fetchpatch {
url = "https://github.com/commercialhaskell/stack/pull/5156.diff";
sha256 = "0knk6f9fh1b4fxkhvx5gfrwclal4vi2va4zy34gpmwnjr7knf42y";
excludes = [
"snapshot-lts-12.yaml"
"snapshot-nightly.yaml"
"snapshot.yaml"
];
})
# This patch fixes stack up to be able to build various GHC-8.8 changes.
# This can hopefully be dropped when the next stack release is made
# after 2.1.3.1 (assuming the next stack release uses GHC-8.8).
./patches/stack-ghc882-support.patch
]);
stack = generateOptparseApplicativeCompletion "stack" (super.stack.overrideScope (self: super: { http-download = self.http-download_0_2_0_0; }));
http-download_0_2_0_0 = dontCheck super.http-download_0_2_0_0;
# musl fixes
# dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test
@ -1516,4 +1483,9 @@ self: super: {
sha256 = "sha256:0xbfhzhzg94b4r5qy5dg1c40liswwpqarrc2chcwgfbfnrmwkfc2";
});
# Depends on selective >= 0.4, but the default of selective is 0.3
headed-megaparsec = super.headed-megaparsec.override {
selective = self.selective_0_4_1;
};
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View File

@ -42,12 +42,30 @@ self: super: {
unix = null;
xhtml = null;
# The proper 3.2.0.0 release does not compile with ghc-8.10.1, so we take the
# hitherto unreleased next version from the '3.2' branch of the upstream git
# repository for the time being.
cabal-install = assert super.cabal-install.version == "3.2.0.0";
overrideCabal super.cabal-install (drv: {
postUnpack = "sourceRoot+=/cabal-install; echo source root reset to $sourceRoot";
version = "3.2.0.0-git";
editedCabalFile = null;
src = pkgs.fetchgit {
url = "git://github.com/haskell/cabal.git";
rev = "9bd4cc0591616aeae78e17167338371a2542a475";
sha256 = "005q1shh7vqgykkp72hhmswmrfpz761x0q0jqfnl3wqim4xd9dg0";
};
});
# Deviate from Stackage LTS-15.x to fix the build.
haddock-library = self.haddock-library_1_9_0;
# Jailbreak to fix the build.
async = doJailbreak super.async;
ChasingBottoms = doJailbreak super.ChasingBottoms;
ed25519 = doJailbreak super.ed25519;
email-validate = doJailbreak super.email-validate; # https://github.com/Porges/email-validate-hs/issues/51
feed = doJailbreak super.feed; # https://github.com/bergmark/feed/issues/48
hashable = doJailbreak super.hashable;
pandoc = doJailbreak super.pandoc;
parallel = doJailbreak super.parallel;
@ -60,6 +78,7 @@ self: super: {
system-fileio = doJailbreak super.system-fileio;
tar = doJailbreak super.tar;
tasty-expected-failure = doJailbreak super.tasty-expected-failure;
tasty-rerun = doJailbreak super.tasty-rerun; # https://github.com/ocharles/tasty-rerun/issues/18
unliftio-core = doJailbreak super.unliftio-core;
vector = doJailbreak super.vector;
zlib = doJailbreak super.zlib;

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.9
# LTS Haskell 15.10
- abstract-deque ==0.3
- abstract-par ==0.3.3
- AC-Angle ==1.0
@ -319,7 +319,7 @@ default-package-overrides:
- blaze-bootstrap ==0.1.0.1
- blaze-builder ==0.4.1.0
- blaze-html ==0.9.1.2
- blaze-markup ==0.8.2.4
- blaze-markup ==0.8.2.5
- blaze-svg ==0.3.6.1
- blaze-textual ==0.2.1.0
- bmp ==1.2.6.3
@ -437,9 +437,9 @@ default-package-overrides:
- codec-rpm ==0.2.2
- code-page ==0.2
- coercible-utils ==0.1.0
- co-log ==0.4.0.0
- co-log-core ==0.2.1.0
- co-log-polysemy ==0.0.1.1
- co-log ==0.4.0.1
- co-log-core ==0.2.1.1
- co-log-polysemy ==0.0.1.2
- Color ==0.1.4
- colorful-monoids ==0.2.1.2
- colorize-haskell ==1.0.1
@ -859,7 +859,7 @@ default-package-overrides:
- gi-glib ==2.0.23
- gi-gobject ==2.0.22
- gi-graphene ==1.0.1
- gi-gtk ==3.0.32
- gi-gtk ==3.0.33
- gi-gtk-hs ==0.3.8.1
- gingersnap ==0.3.1.0
- gi-pango ==1.0.22
@ -889,7 +889,7 @@ default-package-overrides:
- graphviz ==2999.20.0.4
- graph-wrapper ==0.2.6.0
- gravatar ==0.8.0
- greskell ==1.0.0.1
- greskell ==1.0.1.0
- greskell-core ==0.1.3.2
- greskell-websocket ==0.1.2.1
- groom ==0.1.2.1
@ -932,6 +932,8 @@ default-package-overrides:
- HaXml ==1.25.5
- haxr ==3000.11.4
- hdaemonize ==0.5.6
- HDBC ==2.4.0.3
- HDBC-session ==0.1.2.0
- headroom ==0.1.3.0
- heap ==1.0.4
- heaps ==0.3.6.1
@ -958,7 +960,7 @@ default-package-overrides:
- highlighting-kate ==0.6.4
- hinfo ==0.0.3.0
- hinotify ==0.4
- hint ==0.9.0.2
- hint ==0.9.0.3
- hjsmin ==0.2.0.4
- hkgr ==0.2.5.2
- hlibcpuid ==0.2.0
@ -1471,7 +1473,7 @@ default-package-overrides:
- OneTuple ==0.2.2.1
- Only ==0.1
- oo-prototypes ==0.1.0.0
- opaleye ==0.6.7004.1
- opaleye ==0.6.7004.2
- OpenAL ==1.7.0.5
- open-browser ==0.2.1.0
- openexr-write ==0.1.0.2
@ -1541,6 +1543,7 @@ default-package-overrides:
- perfect-vector-shuffle ==0.1.1.1
- persist ==0.1.1.4
- persistable-record ==0.6.0.4
- persistable-types-HDBC-pg ==0.0.3.5
- persistent ==2.10.5.2
- persistent-mysql ==2.10.2.3
- persistent-pagination ==0.1.1.1
@ -1625,7 +1628,7 @@ default-package-overrides:
- print-console-colors ==0.1.0.0
- process-extras ==0.7.4
- product-isomorphic ==0.0.3.3
- product-profunctors ==0.10.0.0
- product-profunctors ==0.10.0.1
- profiterole ==0.1
- profunctors ==5.5.2
- projectroot ==0.2.0.1
@ -1727,6 +1730,8 @@ default-package-overrides:
- reinterpret-cast ==0.1.0
- relapse ==1.0.0.0
- relational-query ==0.12.2.2
- relational-query-HDBC ==0.7.2.0
- relational-record ==0.2.2.0
- relational-schemas ==0.1.8.0
- relude ==0.6.0.0
- renderable ==0.2.0.1
@ -1738,10 +1743,10 @@ default-package-overrides:
- rerebase ==1.4.1
- resolv ==0.1.2.0
- resource-pool ==0.2.3.2
- resourcet ==1.2.3
- resourcet ==1.2.4
- result ==0.2.6.0
- rethinkdb-client-driver ==0.0.25
- retry ==0.8.1.1
- retry ==0.8.1.2
- rev-state ==0.1.2
- rfc1751 ==0.1.2
- rfc5051 ==0.1.0.4
@ -1779,8 +1784,8 @@ default-package-overrides:
- sampling ==0.3.3
- say ==0.1.0.1
- sbp ==2.6.3
- scalpel ==0.6.1
- scalpel-core ==0.6.1
- scalpel ==0.6.2
- scalpel-core ==0.6.2
- scanf ==0.1.0.0
- scanner ==0.3.1
- scheduler ==1.4.2.2
@ -1844,7 +1849,7 @@ default-package-overrides:
- servant-swagger-ui-redoc ==0.3.3.1.22.3
- servant-websockets ==2.0.0
- servant-yaml ==0.1.0.1
- serverless-haskell ==0.10.2
- serverless-haskell ==0.10.5
- serversession ==1.0.1
- serversession-frontend-wai ==1.0
- ses-html ==0.4.0.0
@ -1889,7 +1894,7 @@ default-package-overrides:
- skip-var ==0.1.1.0
- skylighting ==0.8.3.4
- skylighting-core ==0.8.3.4
- slist ==0.1.0.0
- slist ==0.1.1.0
- small-bytearray-builder ==0.3.4.0
- smallcheck ==1.1.5
- smoothie ==0.4.2.10
@ -1946,7 +1951,7 @@ default-package-overrides:
- streaming ==0.2.3.0
- streaming-bytestring ==0.1.6
- streaming-commons ==0.2.1.2
- streamly ==0.7.1
- streamly ==0.7.2
- streams ==3.3
- strict ==0.3.2
- strict-base-types ==0.6.1
@ -1960,8 +1965,8 @@ default-package-overrides:
- string-qq ==0.0.4
- stringsearch ==0.3.6.6
- string-transform ==1.1.1
- stripe-concepts ==1.0.2.0
- stripe-signature ==1.0.0.1
- stripe-concepts ==1.0.2.2
- stripe-signature ==1.0.0.2
- strive ==5.0.10
- structs ==0.1.3
- structured-cli ==2.5.2.0
@ -2035,7 +2040,7 @@ default-package-overrides:
- test-framework-th ==0.2.4
- testing-feat ==1.1.0.0
- testing-type-modifiers ==0.1.0.1
- texmath ==0.12.0.1
- texmath ==0.12.0.2
- text-binary ==0.2.1.1
- text-builder ==0.6.6.1
- text-conversions ==0.3.0
@ -2131,7 +2136,7 @@ default-package-overrides:
- typed-uuid ==0.0.0.2
- type-equality ==1
- type-errors ==0.2.0.0
- type-errors-pretty ==0.0.1.0
- type-errors-pretty ==0.0.1.1
- type-fun ==0.1.1
- type-hint ==0.1
- type-level-integers ==0.0.1
@ -2143,7 +2148,7 @@ default-package-overrides:
- type-of-html ==1.5.1.0
- type-of-html-static ==0.1.0.2
- type-operators ==0.2.0.0
- typerep-map ==0.3.2
- typerep-map ==0.3.3.0
- type-spec ==0.4.0.0
- tzdata ==0.1.20190911.0
- ua-parser ==0.7.5.1
@ -2201,7 +2206,7 @@ default-package-overrides:
- validity ==0.9.0.3
- validity-aeson ==0.2.0.3
- validity-bytestring ==0.4.1.1
- validity-containers ==0.5.0.1
- validity-containers ==0.5.0.3
- validity-path ==0.4.0.1
- validity-primitive ==0.0.0.1
- validity-scientific ==0.2.0.3
@ -4419,6 +4424,8 @@ broken-packages:
- elision
- elm-street
- elm-websocket
- elynx
- elynx-markov
- elynx-seq
- elynx-tools
- elynx-tree
@ -5333,7 +5340,6 @@ broken-packages:
- haddock-leksah
- haddock-test
- haddocset
- hadolint
- hadoop-formats
- hadoop-rpc
- hadoop-tools
@ -5626,7 +5632,6 @@ broken-packages:
- hasql-postgres
- hasql-postgres-options
- hasql-simple
- hasql-th
- hastache
- hastache-aeson
- haste
@ -5708,7 +5713,6 @@ broken-packages:
- hdph-closure
- hdr-histogram
- HDRUtils
- headed-megaparsec
- headergen
- heapsort
- heart-app
@ -8658,6 +8662,7 @@ broken-packages:
- reflex-basic-host
- reflex-dom-retractable
- reflex-dom-svg
- reflex-dynamic-containers
- reflex-fsnotify
- reflex-ghci
- reflex-gloss
@ -8666,6 +8671,7 @@ broken-packages:
- reflex-orphans
- reflex-process
- reflex-sdl2
- reflex-test-host
- reflex-transformers
- reflex-vty
- reformat
@ -9151,6 +9157,7 @@ broken-packages:
- shake-pack
- shake-path
- shake-persist
- shakebook
- shaker
- shakespeare-babel
- shakespeare-sass

View File

@ -628,11 +628,6 @@ self: super: builtins.intersectAttrs super {
http-download = dontCheck super.http-download;
pantry = dontCheck super.pantry;
# Hadolint wants to build a statically linked binary by default.
hadolint = overrideCabal super.hadolint (drv: {
preConfigure = "sed -i -e /ld-options:/d hadolint.cabal";
});
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
# need it during the build itself, too.
cairo = addBuildTool super.cairo self.buildHaskellPackages.gtk2hs-buildtools;

File diff suppressed because it is too large Load Diff

View File

@ -1,104 +0,0 @@
diff --git a/src/Stack/Coverage.hs b/src/Stack/Coverage.hs
index d95fa332..f80e121a 100644
--- a/src/Stack/Coverage.hs
+++ b/src/Stack/Coverage.hs
@@ -235,7 +235,7 @@ generateHpcReportForTargets opts tixFiles targetNames = do
case nc of
CTest testName ->
liftM (pkgPath </>) $ parseRelFile (T.unpack testName ++ "/" ++ T.unpack testName ++ ".tix")
- _ -> fail $
+ _ -> liftIO $ fail $
"Can't specify anything except test-suites as hpc report targets (" ++
packageNameString name ++
" is used with a non test-suite target)"
diff --git a/src/Stack/Package.hs b/src/Stack/Package.hs
index b69337ce..08eb9b9f 100644
--- a/src/Stack/Package.hs
+++ b/src/Stack/Package.hs
@@ -463,7 +463,7 @@ makeObjectFilePathFromC
makeObjectFilePathFromC cabalDir namedComponent distDir cFilePath = do
relCFilePath <- stripProperPrefix cabalDir cFilePath
relOFilePath <-
- parseRelFile (replaceExtension (toFilePath relCFilePath) "o")
+ parseRelFile (System.FilePath.replaceExtension (toFilePath relCFilePath) "o")
return (componentOutputDir namedComponent distDir </> relOFilePath)
-- | Make the global autogen dir if Cabal version is new enough.
diff --git a/src/Stack/Script.hs b/src/Stack/Script.hs
index c63c9f62..70257be1 100644
--- a/src/Stack/Script.hs
+++ b/src/Stack/Script.hs
@@ -172,8 +172,8 @@ scriptCmd opts = do
toExeName fp =
if osIsWindows
- then replaceExtension fp "exe"
- else dropExtension fp
+ then System.FilePath.replaceExtension fp "exe"
+ else System.FilePath.dropExtension fp
getPackagesFromImports
:: FilePath -- ^ script filename
diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs
index 8bbfc45c..5c5b028c 100644
--- a/src/Stack/Setup.hs
+++ b/src/Stack/Setup.hs
@@ -876,7 +876,7 @@ buildGhcFromSource getSetupInfo' installed (CompilerRepository url) commitId fla
(_,files) <- listDir (cwd </> bindistPath)
let
isBindist p = "ghc-" `isPrefixOf` (toFilePath (filename p))
- && fileExtension (filename p) == ".xz"
+ && (maybe "" id (fileExtension (filename p))) == ".xz"
mbindist = filter isBindist files
case mbindist of
[bindist] -> do
diff --git a/src/Stack/Storage/Project.hs b/src/Stack/Storage/Project.hs
index dc5318d8..984e6259 100644
--- a/src/Stack/Storage/Project.hs
+++ b/src/Stack/Storage/Project.hs
@@ -12,6 +12,9 @@
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-unused-top-binds -Wno-identities #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
+
-- | Work with SQLite database used for caches across a single project.
module Stack.Storage.Project
( initProjectStorage
diff --git a/src/Stack/Storage/User.hs b/src/Stack/Storage/User.hs
index 3845b094..09695344 100644
--- a/src/Stack/Storage/User.hs
+++ b/src/Stack/Storage/User.hs
@@ -12,6 +12,9 @@
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-unused-top-binds -Wno-identities #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
+
-- | Work with SQLite database used for caches across an entire user account.
module Stack.Storage.User
( initUserStorage
diff --git a/src/Stack/Types/Config.hs b/src/Stack/Types/Config.hs
index a5cc22b5..a329d353 100644
--- a/src/Stack/Types/Config.hs
+++ b/src/Stack/Types/Config.hs
@@ -406,7 +406,7 @@ instance FromJSON CabalConfigKey where
instance FromJSONKey CabalConfigKey where
fromJSONKey = FromJSONKeyTextParser parseCabalConfigKey
-parseCabalConfigKey :: Monad m => Text -> m CabalConfigKey
+parseCabalConfigKey :: MonadFail m => Text -> m CabalConfigKey
parseCabalConfigKey "$targets" = pure CCKTargets
parseCabalConfigKey "$locals" = pure CCKLocals
parseCabalConfigKey "$everything" = pure CCKEverything
@@ -974,7 +974,7 @@ parseConfigMonoidObject rootDir obj = do
return ConfigMonoid {..}
where
- handleExplicitSetupDep :: Monad m => (Text, Bool) -> m (Maybe PackageName, Bool)
+ handleExplicitSetupDep :: MonadFail m => (Text, Bool) -> m (Maybe PackageName, Bool)
handleExplicitSetupDep (name', b) = do
name <-
if name' == "*"