2023-01-15 21:23:21 +01:00
|
|
|
{ pkgs, haskellLib }:
|
|
|
|
|
2023-03-18 20:47:49 +01:00
|
|
|
with haskellLib;
|
|
|
|
|
2023-01-15 21:23:21 +01:00
|
|
|
let
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
2023-03-18 20:47:49 +01:00
|
|
|
jailbreakWhileRevision = rev:
|
|
|
|
overrideCabal (old: {
|
|
|
|
jailbreak = assert old.revision or "0" == toString rev; true;
|
|
|
|
});
|
2023-04-22 22:04:15 +02:00
|
|
|
checkAgainAfter = pkg: ver: msg: act:
|
|
|
|
if builtins.compareVersions pkg.version ver <= 0 then act
|
|
|
|
else
|
|
|
|
builtins.throw "Check if '${msg}' was resolved in ${pkg.pname} ${pkg.version} and update or remove this";
|
|
|
|
jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
|
2023-07-06 10:08:01 +02:00
|
|
|
|
|
|
|
# Workaround for a ghc-9.6 issue: https://gitlab.haskell.org/ghc/ghc/-/issues/23392
|
|
|
|
disableParallelBuilding = overrideCabal (drv: { enableParallelBuilding = false; });
|
2023-03-18 20:47:49 +01:00
|
|
|
in
|
2023-01-15 21:23:21 +01:00
|
|
|
|
|
|
|
self: super: {
|
|
|
|
llvmPackages = lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
|
|
|
|
|
|
|
|
# Disable GHC core libraries
|
|
|
|
array = null;
|
|
|
|
base = null;
|
|
|
|
binary = null;
|
|
|
|
bytestring = null;
|
|
|
|
Cabal = null;
|
|
|
|
Cabal-syntax = 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;
|
|
|
|
system-cxx-std-lib = null;
|
|
|
|
template-haskell = null;
|
|
|
|
# terminfo is not built if GHC is a cross compiler
|
|
|
|
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
|
|
|
|
text = null;
|
|
|
|
time = null;
|
|
|
|
transformers = null;
|
|
|
|
unix = null;
|
|
|
|
xhtml = null;
|
2023-03-17 15:38:23 +01:00
|
|
|
|
2023-03-18 20:47:49 +01:00
|
|
|
#
|
|
|
|
# Version deviations from Stackage LTS
|
|
|
|
#
|
|
|
|
|
2023-10-29 20:45:09 +01:00
|
|
|
doctest = doDistribute super.doctest_0_22_2;
|
2023-07-01 19:00:34 +02:00
|
|
|
http-api-data = doDistribute self.http-api-data_0_6; # allows base >= 4.18
|
2023-03-30 06:31:07 +02:00
|
|
|
some = doDistribute self.some_1_0_5;
|
2023-08-18 10:40:03 +02:00
|
|
|
th-abstraction = doDistribute self.th-abstraction_0_6_0_0;
|
2023-03-30 06:31:07 +02:00
|
|
|
th-desugar = doDistribute self.th-desugar_1_15;
|
2023-06-26 14:33:49 +02:00
|
|
|
semigroupoids = doDistribute self.semigroupoids_6_0_0_1;
|
|
|
|
bifunctors = doDistribute self.bifunctors_5_6_1;
|
2023-10-22 12:37:39 +02:00
|
|
|
base-compat = doDistribute self.base-compat_0_13_1;
|
2023-06-26 14:33:49 +02:00
|
|
|
base-compat-batteries = doDistribute self.base-compat-batteries_0_13_0;
|
2023-10-13 22:28:08 +02:00
|
|
|
fgl = doDistribute self.fgl_5_8_1_1;
|
2023-03-18 20:47:49 +01:00
|
|
|
|
2023-08-22 01:50:52 +02:00
|
|
|
# Because we bumped the version of th-abstraction above.^
|
|
|
|
aeson = doJailbreak super.aeson;
|
|
|
|
free = doJailbreak super.free;
|
|
|
|
|
2023-10-15 21:15:58 +02:00
|
|
|
# Because we bumped the version of base-compat above.^
|
|
|
|
cabal-plan = unmarkBroken super.cabal-plan;
|
|
|
|
cabal-plan-bounds = unmarkBroken super.cabal-plan-bounds;
|
|
|
|
|
2023-09-05 23:22:15 +02:00
|
|
|
# Requires filepath >= 1.4.100.0 <=> GHC >= 9.6
|
|
|
|
file-io = unmarkBroken super.file-io;
|
|
|
|
|
2023-07-11 18:56:49 +02:00
|
|
|
# Too strict upper bound on template-haskell
|
|
|
|
# https://github.com/mokus0/th-extras/pull/21
|
|
|
|
th-extras = doJailbreak super.th-extras;
|
|
|
|
|
2023-10-29 20:45:09 +01:00
|
|
|
ghc-lib = doDistribute self.ghc-lib_9_6_3_20231014;
|
|
|
|
ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_3_20231014;
|
2023-09-14 18:33:52 +02:00
|
|
|
ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_6_0_2;
|
2023-03-18 21:04:22 +01:00
|
|
|
|
2023-10-22 01:23:30 +02:00
|
|
|
# Tests fail due to the newly-build fourmolu not being in PATH
|
|
|
|
# https://github.com/fourmolu/fourmolu/issues/231
|
|
|
|
fourmolu = dontCheck super.fourmolu_0_14_0_0;
|
|
|
|
ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu_0_7_2_0);
|
|
|
|
hlint = super.hlint_3_6_1;
|
|
|
|
|
2023-04-23 21:33:14 +02:00
|
|
|
# v0.1.6 forbids base >= 4.18
|
2023-04-23 23:07:32 +02:00
|
|
|
singleton-bool = doDistribute super.singleton-bool_0_1_7;
|
2023-04-23 21:33:14 +02:00
|
|
|
|
2023-03-18 20:47:49 +01:00
|
|
|
#
|
|
|
|
# Too strict bounds without upstream fix
|
|
|
|
#
|
|
|
|
|
|
|
|
# Forbids transformers >= 0.6
|
|
|
|
quickcheck-classes-base = doJailbreak super.quickcheck-classes-base;
|
|
|
|
# Forbids mtl >= 2.3
|
|
|
|
ChasingBottoms = doJailbreak super.ChasingBottoms;
|
|
|
|
# Forbids base >= 4.18
|
|
|
|
cabal-install-solver = doJailbreak super.cabal-install-solver;
|
|
|
|
cabal-install = doJailbreak super.cabal-install;
|
|
|
|
|
2023-04-22 16:15:11 +02:00
|
|
|
# Forbids base >= 4.18, fix proposed: https://github.com/sjakobi/newtype-generics/pull/25
|
2023-04-22 22:04:15 +02:00
|
|
|
newtype-generics = jailbreakForCurrentVersion super.newtype-generics "0.6.2";
|
2023-05-29 09:16:24 +02:00
|
|
|
|
2023-04-22 22:04:15 +02:00
|
|
|
cborg-json = jailbreakForCurrentVersion super.cborg-json "0.2.5.0";
|
|
|
|
serialise = jailbreakForCurrentVersion super.serialise "0.2.6.0";
|
2023-04-22 16:15:11 +02:00
|
|
|
|
2023-03-18 20:47:49 +01:00
|
|
|
#
|
|
|
|
# Too strict bounds, waiting on Hackage release in nixpkgs
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Compilation failure workarounds
|
|
|
|
#
|
|
|
|
|
2023-04-22 16:36:11 +02:00
|
|
|
# Add support for time 1.10
|
|
|
|
# https://github.com/vincenthz/hs-hourglass/pull/56
|
|
|
|
hourglass = appendPatches [
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
name = "hourglass-pr-56.patch";
|
|
|
|
url =
|
|
|
|
"https://github.com/vincenthz/hs-hourglass/commit/cfc2a4b01f9993b1b51432f0a95fa6730d9a558a.patch";
|
|
|
|
sha256 = "sha256-gntZf7RkaR4qzrhjrXSC69jE44SknPDBmfs4z9rVa5Q=";
|
|
|
|
})
|
|
|
|
] (super.hourglass);
|
|
|
|
|
|
|
|
|
2023-03-18 20:47:49 +01:00
|
|
|
# Test suite doesn't compile with base-4.18 / GHC 9.6
|
|
|
|
# https://github.com/dreixel/syb/issues/40
|
|
|
|
syb = dontCheck super.syb;
|
2023-04-03 16:27:33 +02:00
|
|
|
|
2023-07-03 12:15:37 +02:00
|
|
|
# Support for template-haskell >= 2.16
|
|
|
|
language-haskell-extract = appendPatch (pkgs.fetchpatch {
|
|
|
|
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
|
|
|
|
sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv";
|
|
|
|
}) (doJailbreak super.language-haskell-extract);
|
|
|
|
|
2023-07-26 07:42:10 +02:00
|
|
|
# Patch 0.17.1 for support of mtl-2.3
|
|
|
|
xmonad-contrib = appendPatch
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
name = "xmonad-contrib-mtl-2.3.patch";
|
|
|
|
url = "https://github.com/xmonad/xmonad-contrib/commit/8cb789af39e93edb07f1eee39c87908e0d7c5ee5.patch";
|
|
|
|
sha256 = "sha256-ehCvVy0N2Udii/0K79dsRSBP7/i84yMoeyupvO8WQz4=";
|
|
|
|
})
|
|
|
|
(doJailbreak super.xmonad-contrib);
|
|
|
|
|
2023-07-26 07:42:44 +02:00
|
|
|
# Patch 0.12.0.1 for support of unix-2.8.0.0
|
|
|
|
arbtt = appendPatch
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
name = "arbtt-unix-2.8.0.0.patch";
|
|
|
|
url = "https://github.com/nomeata/arbtt/pull/168/commits/ddaac94395ac50e3d3cd34c133dda4a8e5a3fd6c.patch";
|
|
|
|
sha256 = "sha256-5Gmz23f4M+NfgduA5O+9RaPmnneAB/lAlge8MrFpJYs=";
|
|
|
|
})
|
|
|
|
super.arbtt;
|
|
|
|
|
2023-04-03 16:27:33 +02:00
|
|
|
# 2023-04-03: plugins disabled for hls 1.10.0.0 based on
|
|
|
|
#
|
2023-08-22 01:50:52 +02:00
|
|
|
haskell-language-server = super.haskell-language-server.override {
|
2023-05-30 01:56:03 +02:00
|
|
|
hls-floskell-plugin = null;
|
|
|
|
};
|
2023-04-03 16:27:33 +02:00
|
|
|
|
2023-07-25 07:26:50 +02:00
|
|
|
# Newer version of servant required for GHC 9.6
|
2023-10-14 00:07:14 +02:00
|
|
|
servant = self.servant_0_20_1;
|
2023-07-25 07:26:50 +02:00
|
|
|
servant-server = self.servant-server_0_20;
|
|
|
|
servant-client = self.servant-client_0_20;
|
|
|
|
servant-client-core = self.servant-client-core_0_20;
|
2023-10-14 00:07:14 +02:00
|
|
|
# Select versions compatible with servant_0_20_1
|
2023-07-25 07:26:50 +02:00
|
|
|
servant-docs = self.servant-docs_0_13;
|
|
|
|
servant-swagger = self.servant-swagger_1_2;
|
|
|
|
# Jailbreaks for servant <0.20
|
|
|
|
servant-lucid = doJailbreak super.servant-lucid;
|
|
|
|
|
|
|
|
# Jailbreak strict upper bounds: http-api-data <0.6
|
2023-10-14 00:07:14 +02:00
|
|
|
servant_0_20_1 = doJailbreak super.servant_0_20_1;
|
2023-07-25 07:26:50 +02:00
|
|
|
servant-server_0_20 = doJailbreak super.servant-server_0_20;
|
|
|
|
servant-client_0_20 = doJailbreak super.servant-client_0_20;
|
|
|
|
servant-client-core_0_20 = doJailbreak super.servant-client-core_0_20;
|
|
|
|
# Jailbreak strict upper bounds: doctest <0.22
|
|
|
|
servant-swagger_1_2 = doJailbreak super.servant-swagger_1_2;
|
|
|
|
|
2023-04-03 16:27:33 +02:00
|
|
|
lifted-base = dontCheck super.lifted-base;
|
|
|
|
hw-fingertree = dontCheck super.hw-fingertree;
|
|
|
|
hw-prim = dontCheck (doJailbreak super.hw-prim);
|
|
|
|
stm-containers = dontCheck super.stm-containers;
|
|
|
|
regex-tdfa = dontCheck super.regex-tdfa;
|
|
|
|
rebase = doJailbreak super.rebase_1_20;
|
|
|
|
rerebase = doJailbreak super.rerebase_1_20;
|
|
|
|
hiedb = dontCheck super.hiedb;
|
2023-07-25 05:08:04 +02:00
|
|
|
retrie = dontCheck super.retrie;
|
|
|
|
# https://github.com/kowainik/relude/issues/436
|
|
|
|
relude = dontCheck (doJailbreak super.relude);
|
2023-04-03 16:27:33 +02:00
|
|
|
|
|
|
|
ghc-exactprint = unmarkBroken (addBuildDepends (with self.ghc-exactprint.scope; [
|
|
|
|
HUnit Diff data-default extra fail free ghc-paths ordered-containers silently syb
|
2023-06-09 12:08:37 +02:00
|
|
|
]) super.ghc-exactprint_1_7_0_1);
|
2023-04-03 16:27:33 +02:00
|
|
|
|
|
|
|
inherit (pkgs.lib.mapAttrs (_: doJailbreak ) super)
|
|
|
|
hls-cabal-plugin
|
|
|
|
algebraic-graphs
|
|
|
|
co-log-core
|
|
|
|
lens
|
|
|
|
cryptohash-sha1
|
|
|
|
cryptohash-md5
|
|
|
|
ghc-trace-events
|
|
|
|
tasty-hspec
|
|
|
|
constraints-extras
|
|
|
|
tree-diff
|
|
|
|
implicit-hie-cradle
|
|
|
|
focus
|
2023-06-26 14:33:49 +02:00
|
|
|
hie-compat
|
|
|
|
dbus # template-haskell >=2.18 && <2.20, transformers <0.6, unix <2.8
|
2023-07-06 10:02:50 +02:00
|
|
|
gi-cairo-connector # mtl <2.3
|
2023-07-25 07:40:59 +02:00
|
|
|
haskintex # text <2
|
|
|
|
lens-family-th # template-haskell <2.19
|
|
|
|
ghc-prof # base <4.18
|
|
|
|
profiteur # vector <0.13
|
|
|
|
mfsolve # mtl <2.3
|
|
|
|
cubicbezier # mtl <2.3
|
|
|
|
dhall # template-haskell <2.20
|
2023-07-26 05:21:16 +02:00
|
|
|
env-guard # doctest <0.21
|
|
|
|
package-version # doctest <0.21, tasty-hedgehog <1.4
|
2023-06-26 14:33:49 +02:00
|
|
|
;
|
|
|
|
|
2023-07-06 10:08:01 +02:00
|
|
|
# Avoid triggering an issue in ghc-9.6.2
|
2023-07-26 22:11:12 +02:00
|
|
|
gi-gtk = disableParallelBuilding super.gi-gtk;
|
2023-07-06 10:08:01 +02:00
|
|
|
|
2023-06-26 14:33:49 +02:00
|
|
|
# Pending text-2.0 support https://github.com/gtk2hs/gtk2hs/issues/327
|
|
|
|
gtk = doJailbreak super.gtk;
|
|
|
|
|
|
|
|
# Doctest comments have bogus imports.
|
|
|
|
bsb-http-chunked = dontCheck super.bsb-http-chunked;
|
|
|
|
|
|
|
|
# Fix ghc-9.6.x build errors.
|
|
|
|
libmpd = appendPatch
|
|
|
|
(pkgs.fetchpatch { url = "https://github.com/vimus/libmpd-haskell/pull/138.patch";
|
|
|
|
sha256 = "sha256-CvvylXyRmoCoRJP2MzRwL0SBbrEzDGqAjXS+4LsLutQ=";
|
|
|
|
})
|
|
|
|
super.libmpd;
|
|
|
|
|
2023-07-06 09:46:52 +02:00
|
|
|
# Apply patch from PR with mtl-2.3 fix.
|
|
|
|
ConfigFile = overrideCabal (drv: {
|
|
|
|
editedCabalFile = null;
|
|
|
|
buildDepends = drv.buildDepends or [] ++ [ self.HUnit ];
|
|
|
|
patches = [(pkgs.fetchpatch {
|
|
|
|
name = "ConfigFile-pr-12.patch";
|
|
|
|
url = "https://github.com/jgoerzen/configfile/pull/12.patch";
|
|
|
|
sha256 = "sha256-b7u9GiIAd2xpOrM0MfILHNb6Nt7070lNRIadn2l3DfQ=";
|
|
|
|
})];
|
|
|
|
}) super.ConfigFile;
|
2023-07-06 09:51:38 +02:00
|
|
|
|
|
|
|
# The curl executable is required for withApplication tests.
|
2023-10-13 22:34:46 +02:00
|
|
|
warp_3_3_29 = addTestToolDepend pkgs.curl super.warp_3_3_29;
|
2023-10-02 03:27:40 +02:00
|
|
|
|
|
|
|
# The NCG backend for aarch64 generates invalid jumps in some situations,
|
|
|
|
# the workaround on 9.6 is to revert to the LLVM backend (which is used
|
|
|
|
# for these sorts of situations even on 9.2 and 9.4).
|
|
|
|
# https://gitlab.haskell.org/ghc/ghc/-/issues/23746#note_525318
|
2023-10-09 23:10:53 +02:00
|
|
|
tls = if pkgs.stdenv.hostPlatform.isAarch64 then self.forceLlvmCodegenBackend super.tls else super.tls;
|
2023-01-15 21:23:21 +01:00
|
|
|
}
|