2021-05-30 22:24:21 +00:00
|
|
|
|
{ pkgs, haskellLib }:
|
|
|
|
|
|
|
|
|
|
with haskellLib;
|
|
|
|
|
|
2021-12-24 20:12:56 +00:00
|
|
|
|
let
|
|
|
|
|
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
|
|
|
|
in
|
|
|
|
|
|
2021-05-30 22:24:21 +00:00
|
|
|
|
self: super: {
|
|
|
|
|
|
2021-11-23 15:11:37 +00:00
|
|
|
|
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
|
|
|
|
|
# Disable GHC 9.2.x core libraries.
|
|
|
|
|
array = null;
|
|
|
|
|
base = null;
|
|
|
|
|
binary = null;
|
|
|
|
|
bytestring = null;
|
|
|
|
|
Cabal = null;
|
|
|
|
|
containers = null;
|
|
|
|
|
deepseq = null;
|
|
|
|
|
directory = null;
|
|
|
|
|
exceptions = null;
|
|
|
|
|
filepath = null;
|
|
|
|
|
ghc-bignum = null;
|
|
|
|
|
ghc-boot = null;
|
|
|
|
|
ghc-boot-th = null;
|
|
|
|
|
ghc-compact = null;
|
|
|
|
|
ghc-heap = null;
|
|
|
|
|
ghc-prim = null;
|
|
|
|
|
ghci = null;
|
|
|
|
|
haskeline = null;
|
|
|
|
|
hpc = null;
|
|
|
|
|
integer-gmp = null;
|
|
|
|
|
libiserv = null;
|
|
|
|
|
mtl = null;
|
|
|
|
|
parsec = null;
|
|
|
|
|
pretty = null;
|
|
|
|
|
process = null;
|
|
|
|
|
rts = null;
|
|
|
|
|
stm = null;
|
|
|
|
|
template-haskell = null;
|
|
|
|
|
terminfo = null;
|
|
|
|
|
text = null;
|
|
|
|
|
time = null;
|
|
|
|
|
transformers = null;
|
|
|
|
|
unix = null;
|
|
|
|
|
xhtml = null;
|
|
|
|
|
|
2021-10-09 12:00:20 +00:00
|
|
|
|
# Tests fail because of typechecking changes
|
|
|
|
|
conduit = dontCheck super.conduit;
|
|
|
|
|
|
2022-03-20 15:41:26 +00:00
|
|
|
|
# 0.30 introduced support for GHC 9.2.x, so when this assert fails, the whole block can be removed
|
|
|
|
|
cryptonite = assert super.cryptonite.version == "0.29"; appendPatch (pkgs.fetchpatch {
|
2021-10-09 12:00:20 +00:00
|
|
|
|
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/cryptonite-0.29.patch";
|
|
|
|
|
sha256 = "1g48lrmqgd88hqvfq3klz7lsrpwrir2v1931myrhh6dy0d9pqj09";
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) super.cryptonite;
|
2021-09-05 19:43:43 +00:00
|
|
|
|
|
2021-10-12 11:53:13 +00:00
|
|
|
|
# cabal-install needs more recent versions of Cabal
|
2021-05-30 22:24:21 +00:00
|
|
|
|
cabal-install = (doJailbreak super.cabal-install).overrideScope (self: super: {
|
2022-03-08 12:45:33 +00:00
|
|
|
|
Cabal = self.Cabal_3_6_3_0;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
});
|
|
|
|
|
|
2022-02-20 00:14:16 +00:00
|
|
|
|
doctest = dontCheck (doJailbreak super.doctest);
|
2021-10-09 12:00:20 +00:00
|
|
|
|
|
|
|
|
|
# Tests fail in GHC 9.2
|
|
|
|
|
extra = dontCheck super.extra;
|
|
|
|
|
|
2021-05-30 22:24:21 +00:00
|
|
|
|
# Jailbreaks & Version Updates
|
2022-02-15 18:25:54 +00:00
|
|
|
|
|
2022-03-20 15:41:26 +00:00
|
|
|
|
# This `doJailbreak` can be removed once we have doctest v0.20
|
|
|
|
|
aeson-diff = assert super.doctest.version == "0.18.2"; doJailbreak super.aeson-diff;
|
2022-02-15 18:25:54 +00:00
|
|
|
|
|
2021-10-09 12:00:20 +00:00
|
|
|
|
assoc = doJailbreak super.assoc;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
async = doJailbreak super.async;
|
2021-10-01 11:06:03 +00:00
|
|
|
|
base64-bytestring = doJailbreak super.base64-bytestring;
|
2021-11-05 16:02:32 +00:00
|
|
|
|
base-compat = self.base-compat_0_12_1;
|
|
|
|
|
base-compat-batteries = self.base-compat-batteries_0_12_1;
|
|
|
|
|
binary-instances = doJailbreak super.binary-instances;
|
2021-10-01 11:04:50 +00:00
|
|
|
|
ChasingBottoms = doJailbreak super.ChasingBottoms;
|
2021-11-05 16:02:32 +00:00
|
|
|
|
constraints = doJailbreak super.constraints;
|
2021-10-26 10:20:34 +00:00
|
|
|
|
cpphs = overrideCabal (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}) super.cpphs;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
data-fix = doJailbreak super.data-fix;
|
2022-04-24 22:22:45 +00:00
|
|
|
|
dbus = super.dbus_1_2_24;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
dec = doJailbreak super.dec;
|
|
|
|
|
ed25519 = doJailbreak super.ed25519;
|
2021-10-09 12:00:20 +00:00
|
|
|
|
ghc-byteorder = doJailbreak super.ghc-byteorder;
|
2021-12-21 22:01:36 +00:00
|
|
|
|
ghc-exactprint = overrideCabal (drv: {
|
2022-01-14 14:34:12 +00:00
|
|
|
|
# HACK: ghc-exactprint 1.4.1 is not buildable for GHC < 9.2,
|
2021-12-21 22:01:36 +00:00
|
|
|
|
# but hackage2nix evaluates the cabal file with GHC 8.10.*,
|
|
|
|
|
# causing the build-depends to be skipped. Since the dependency
|
|
|
|
|
# list hasn't changed much since 0.6.4, we can just reuse the
|
|
|
|
|
# normal expression.
|
2022-01-14 14:34:12 +00:00
|
|
|
|
inherit (self.ghc-exactprint_1_4_1) src version;
|
2021-12-21 22:01:36 +00:00
|
|
|
|
revision = null; editedCabalFile = null;
|
|
|
|
|
libraryHaskellDepends = [
|
|
|
|
|
self.fail
|
|
|
|
|
self.ordered-containers
|
2022-02-04 09:56:58 +00:00
|
|
|
|
self.data-default
|
2021-12-21 22:01:36 +00:00
|
|
|
|
] ++ drv.libraryHaskellDepends or [];
|
|
|
|
|
}) super.ghc-exactprint;
|
2022-03-08 12:45:33 +00:00
|
|
|
|
ghc-lib = self.ghc-lib_9_2_2_20220307;
|
|
|
|
|
ghc-lib-parser = self.ghc-lib-parser_9_2_2_20220307;
|
2022-03-13 12:32:45 +00:00
|
|
|
|
ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_2_0_3;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
hackage-security = doJailbreak super.hackage-security;
|
2022-01-14 14:16:10 +00:00
|
|
|
|
hashable = super.hashable_1_4_0_2;
|
2022-02-20 00:14:16 +00:00
|
|
|
|
hashable-time = doJailbreak super.hashable-time;
|
2022-03-20 15:41:26 +00:00
|
|
|
|
# 1.1.1 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
|
|
|
|
|
hedgehog = assert super.hedgehog.version == "1.0.5"; doJailbreak super.hedgehog;
|
2021-10-26 10:20:34 +00:00
|
|
|
|
HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
|
|
|
|
|
integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
|
2021-10-09 12:00:20 +00:00
|
|
|
|
indexed-traversable = doJailbreak super.indexed-traversable;
|
2021-11-06 06:55:40 +00:00
|
|
|
|
indexed-traversable-instances = doJailbreak super.indexed-traversable-instances;
|
2021-10-09 12:00:20 +00:00
|
|
|
|
lifted-async = doJailbreak super.lifted-async;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
lukko = doJailbreak super.lukko;
|
2022-03-10 12:48:15 +00:00
|
|
|
|
lzma-conduit = doJailbreak super.lzma-conduit;
|
2021-12-03 16:01:29 +00:00
|
|
|
|
ormolu = self.ormolu_0_4_0_0;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
parallel = doJailbreak super.parallel;
|
2022-02-20 00:14:16 +00:00
|
|
|
|
path = doJailbreak super.path;
|
2021-10-26 10:20:34 +00:00
|
|
|
|
polyparse = overrideCabal (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }) (doJailbreak super.polyparse);
|
2021-10-01 11:06:03 +00:00
|
|
|
|
primitive = doJailbreak super.primitive;
|
2022-03-10 12:49:22 +00:00
|
|
|
|
# https://github.com/protolude/protolude/pull/136
|
|
|
|
|
protolude = appendPatches [
|
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
|
url = "https://github.com/protolude/protolude/commit/47820a36c25ea6f0c6e44382f7d4f3507358b8e7.diff";
|
|
|
|
|
sha256 = "sha256-PtHx5SyTgqFzI03YVeQD+RqglO6ASMQWSxdpy4ROMDY=";
|
|
|
|
|
})
|
|
|
|
|
] (doJailbreak super.protolude);
|
2021-05-30 22:24:21 +00:00
|
|
|
|
regex-posix = doJailbreak super.regex-posix;
|
|
|
|
|
resolv = doJailbreak super.resolv;
|
2022-02-05 02:14:13 +00:00
|
|
|
|
retrie = doDistribute (dontCheck self.retrie_1_2_0_1);
|
2021-05-30 22:24:21 +00:00
|
|
|
|
singleton-bool = doJailbreak super.singleton-bool;
|
2022-03-10 12:49:59 +00:00
|
|
|
|
servant = doJailbreak super.servant;
|
|
|
|
|
servant-auth = doJailbreak super.servant-auth;
|
|
|
|
|
servant-server = appendPatches [
|
|
|
|
|
# awaiting release
|
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
|
url = "https://github.com/haskell-servant/servant/commit/61d0d14b5cb01db3d589101b3f17b0178f52e386.diff";
|
2022-03-25 16:42:21 +00:00
|
|
|
|
relative = "servant-server";
|
|
|
|
|
sha256 = "sha256-3lM8xLO8avVRo8oncJR8QLDSWEzOaoCmzgVtyaEBEw8=";
|
2022-03-10 12:49:59 +00:00
|
|
|
|
})
|
|
|
|
|
] (doJailbreak super.servant-server);
|
|
|
|
|
servant-swagger = doJailbreak super.servant-swagger;
|
|
|
|
|
servant-auth-swagger = doJailbreak super.servant-auth-swagger;
|
2021-10-09 12:00:20 +00:00
|
|
|
|
shelly = doJailbreak super.shelly;
|
2021-09-29 17:11:48 +00:00
|
|
|
|
splitmix = doJailbreak super.splitmix;
|
2021-11-06 09:27:29 +00:00
|
|
|
|
tasty-hspec = doJailbreak super.tasty-hspec;
|
|
|
|
|
th-desugar = self.th-desugar_1_13;
|
2022-02-20 00:14:16 +00:00
|
|
|
|
time-compat = doJailbreak super.time-compat;
|
2022-03-10 12:50:12 +00:00
|
|
|
|
tomland = doJailbreak super.tomland;
|
2021-10-09 12:00:20 +00:00
|
|
|
|
type-equality = doJailbreak super.type-equality;
|
2021-11-05 16:02:32 +00:00
|
|
|
|
unordered-containers = doJailbreak super.unordered-containers;
|
2022-03-20 15:41:26 +00:00
|
|
|
|
vector = dontCheck super.vector;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
vector-binary-instances = doJailbreak super.vector-binary-instances;
|
2021-10-10 16:57:52 +00:00
|
|
|
|
|
2021-10-26 10:20:34 +00:00
|
|
|
|
hpack = overrideCabal (drv: {
|
2021-10-10 16:57:52 +00:00
|
|
|
|
# Cabal 3.6 seems to preserve comments when reading, which makes this test fail
|
|
|
|
|
# 2021-10-10: 9.2.1 is not yet supported (also no issue)
|
|
|
|
|
testFlags = [
|
|
|
|
|
"--skip=/Hpack/renderCabalFile/is inverse to readCabalFile/"
|
|
|
|
|
] ++ drv.testFlags or [];
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) (doJailbreak super.hpack);
|
2021-10-10 16:57:52 +00:00
|
|
|
|
|
2022-02-20 00:14:16 +00:00
|
|
|
|
validity = pkgs.lib.pipe super.validity [
|
2021-12-03 16:01:29 +00:00
|
|
|
|
# head.hackage patch
|
|
|
|
|
(appendPatch (pkgs.fetchpatch {
|
2021-12-08 13:32:39 +00:00
|
|
|
|
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/9110e6972b5daf085e19cad41f97920d3ddac499/patches/validity-0.12.0.0.patch";
|
|
|
|
|
sha256 = "0hzns596dxvyn8irgi7aflx76wak1qi13chkkvl0055pkgykm08f";
|
2021-12-03 16:01:29 +00:00
|
|
|
|
}))
|
|
|
|
|
# head.hackage ignores test suite
|
|
|
|
|
dontCheck
|
|
|
|
|
];
|
|
|
|
|
|
2021-11-20 12:06:38 +00:00
|
|
|
|
# lens >= 5.1 supports 9.2.1
|
2022-04-29 09:21:18 +00:00
|
|
|
|
lens = doDistribute self.lens_5_1;
|
2021-10-10 16:57:52 +00:00
|
|
|
|
|
2021-10-09 12:00:20 +00:00
|
|
|
|
# Syntax error in tests fixed in https://github.com/simonmar/alex/commit/84b29475e057ef744f32a94bc0d3954b84160760
|
|
|
|
|
alex = dontCheck super.alex;
|
|
|
|
|
|
2021-05-30 22:24:21 +00:00
|
|
|
|
# Apply patches from head.hackage.
|
2021-10-26 10:20:34 +00:00
|
|
|
|
language-haskell-extract = appendPatch (pkgs.fetchpatch {
|
2021-10-10 22:10:31 +00:00
|
|
|
|
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
|
|
|
|
|
sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv";
|
2021-10-26 10:20:34 +00:00
|
|
|
|
}) (doJailbreak super.language-haskell-extract);
|
2021-05-30 22:24:21 +00:00
|
|
|
|
|
2021-10-09 12:00:20 +00:00
|
|
|
|
# Tests depend on `parseTime` which is no longer available
|
|
|
|
|
hourglass = dontCheck super.hourglass;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
|
2022-03-20 15:41:26 +00:00
|
|
|
|
# 0.17.0 introduced support for GHC 9.2.x, so when this assert fails, the whole block can be removed
|
|
|
|
|
memory = assert super.memory.version == "0.16.0"; appendPatch (pkgs.fetchpatch {
|
2021-10-09 12:00:20 +00:00
|
|
|
|
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/memory-0.16.0.patch";
|
|
|
|
|
sha256 = "1kjganx729a6xfgfnrb3z7q6mvnidl042zrsd9n5n5a3i76nl5nl";
|
2021-12-06 10:16:54 +00:00
|
|
|
|
}) (overrideCabal {
|
|
|
|
|
editedCabalFile = null;
|
|
|
|
|
revision = null;
|
2022-02-20 00:14:16 +00:00
|
|
|
|
} super.memory);
|
2021-05-30 22:24:21 +00:00
|
|
|
|
|
2021-12-15 09:31:57 +00:00
|
|
|
|
# Use hlint from git for GHC 9.2.1 support
|
2021-12-21 15:08:13 +00:00
|
|
|
|
hlint = doDistribute (
|
|
|
|
|
overrideSrc {
|
|
|
|
|
version = "unstable-2021-12-12";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "ndmitchell";
|
|
|
|
|
repo = "hlint";
|
|
|
|
|
rev = "77a9702e10b772a7695c08682cd4f450fd0e9e46";
|
|
|
|
|
sha256 = "0hpp3iw7m7w2abr8vb86gdz3x6c8lj119zxln933k90ia7bmk8jc";
|
|
|
|
|
};
|
2022-02-20 00:14:16 +00:00
|
|
|
|
} super.hlint
|
2021-12-21 15:08:13 +00:00
|
|
|
|
);
|
2021-12-15 10:11:03 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/sjakobi/bsb-http-chunked/issues/38
|
|
|
|
|
bsb-http-chunked = dontCheck super.bsb-http-chunked;
|
2022-01-21 12:18:37 +00:00
|
|
|
|
|
|
|
|
|
# need bytestring >= 0.11 which is only bundled with GHC >= 9.2
|
|
|
|
|
regex-rure = doDistribute (markUnbroken super.regex-rure);
|
2022-01-21 12:40:28 +00:00
|
|
|
|
jacinda = doDistribute super.jacinda;
|
2022-02-05 02:14:13 +00:00
|
|
|
|
some = doJailbreak super.some;
|
2022-04-07 16:53:54 +00:00
|
|
|
|
fourmolu = super.fourmolu_0_6_0_0;
|
|
|
|
|
# hls-fourmolu-plugin in this version has a to strict upper bound of fourmolu <= 0.5.0.0
|
|
|
|
|
hls-fourmolu-plugin = assert super.hls-fourmolu-plugin.version == "1.0.2.0"; doJailbreak super.hls-fourmolu-plugin;
|
2022-02-05 02:14:13 +00:00
|
|
|
|
implicit-hie-cradle = doJailbreak super.implicit-hie-cradle;
|
2022-03-20 15:41:26 +00:00
|
|
|
|
# 1.3 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
|
|
|
|
|
hashtables = assert super.hashtables.version == "1.2.4.2"; doJailbreak super.hashtables;
|
2022-02-05 02:14:13 +00:00
|
|
|
|
hiedb = doJailbreak super.hiedb;
|
|
|
|
|
|
|
|
|
|
# 2022-02-05: The following plugins don‘t work yet on ghc9.2.
|
|
|
|
|
# Compare: https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html
|
2022-02-20 23:10:35 +00:00
|
|
|
|
haskell-language-server = overrideCabal (old: {libraryHaskellDepends = builtins.filter (x: x != super.hls-tactics-plugin) old.libraryHaskellDepends;})
|
|
|
|
|
(appendConfigureFlags [
|
2022-02-05 02:14:13 +00:00
|
|
|
|
"-f-alternateNumberFormat"
|
|
|
|
|
"-f-class"
|
|
|
|
|
"-f-eval"
|
|
|
|
|
"-f-haddockComments"
|
|
|
|
|
"-f-hlint"
|
|
|
|
|
"-f-retrie"
|
|
|
|
|
"-f-splice"
|
2022-02-20 23:10:35 +00:00
|
|
|
|
"-f-tactics"
|
2022-02-05 02:14:13 +00:00
|
|
|
|
] (super.haskell-language-server.override {
|
|
|
|
|
hls-alternate-number-format-plugin = null;
|
|
|
|
|
hls-class-plugin = null;
|
|
|
|
|
hls-eval-plugin = null;
|
|
|
|
|
hls-haddock-comments-plugin = null;
|
|
|
|
|
hls-hlint-plugin = null;
|
|
|
|
|
hls-retrie-plugin = null;
|
|
|
|
|
hls-splice-plugin = null;
|
2022-02-20 23:10:35 +00:00
|
|
|
|
}));
|
2021-12-24 20:12:56 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/fpco/inline-c/pull/131
|
|
|
|
|
inline-c-cpp =
|
|
|
|
|
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
|
|
|
|
|
super.inline-c-cpp;
|
2021-05-30 22:24:21 +00:00
|
|
|
|
}
|