2022-08-12 12:06:08 +00:00
|
|
|
{ pkgs, haskellLib }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs) fetchpatch lib;
|
2022-10-06 18:32:54 +00: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";
|
2022-08-12 12:06:08 +00:00
|
|
|
in
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
with haskellLib;
|
|
|
|
self: super: let
|
|
|
|
jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
|
|
|
|
in {
|
2022-08-12 12:06:08 +00:00
|
|
|
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;
|
|
|
|
# GHC only builds terminfo if it is a native compiler
|
2024-01-02 11:29:13 +00:00
|
|
|
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
|
2022-08-12 12:06:08 +00:00
|
|
|
text = null;
|
|
|
|
time = null;
|
|
|
|
transformers = null;
|
|
|
|
unix = null;
|
|
|
|
# GHC only bundles the xhtml library if haddock is enabled, check if this is
|
|
|
|
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
|
2024-01-02 11:29:13 +00:00
|
|
|
xhtml = if self.ghc.hasHaddock or true then null else doDistribute self.xhtml_3000_3_0_0;
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
# Jailbreaks & Version Updates
|
|
|
|
|
|
|
|
hashable-time = doJailbreak super.hashable-time;
|
2023-02-16 17:41:37 +00:00
|
|
|
libmpd = doJailbreak super.libmpd;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
# generically needs base-orphans for 9.4 only
|
|
|
|
base-orphans = dontCheck (doDistribute super.base-orphans);
|
2024-04-21 15:54:59 +00:00
|
|
|
generically = addBuildDepends [
|
|
|
|
self.base-orphans
|
|
|
|
] super.generically;
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
# the dontHaddock is due to a GHC panic. might be this bug, not sure.
|
|
|
|
# https://gitlab.haskell.org/ghc/ghc/-/issues/21619
|
2023-08-22 20:05:09 +00:00
|
|
|
hedgehog = dontHaddock super.hedgehog;
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
hpack = overrideCabal (drv: {
|
|
|
|
# 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 [];
|
|
|
|
}) (doJailbreak super.hpack);
|
|
|
|
|
|
|
|
# Tests depend on `parseTime` which is no longer available
|
|
|
|
hourglass = dontCheck super.hourglass;
|
|
|
|
|
|
|
|
# https://github.com/sjakobi/bsb-http-chunked/issues/38
|
|
|
|
bsb-http-chunked = dontCheck super.bsb-http-chunked;
|
|
|
|
|
|
|
|
# 2022-08-01: Tests are broken on ghc 9.2.4: https://github.com/wz1000/HieDb/issues/46
|
|
|
|
hiedb = dontCheck super.hiedb;
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# 2022-10-06: https://gitlab.haskell.org/ghc/ghc/-/issues/22260
|
|
|
|
ghc-check = dontHaddock super.ghc-check;
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
ghc-tags = self.ghc-tags_1_6;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# A given major version of ghc-exactprint only supports one version of GHC.
|
|
|
|
ghc-exactprint = super.ghc-exactprint_1_6_1_3;
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# Too strict upper bound on template-haskell
|
|
|
|
# https://github.com/mokus0/th-extras/issues/18
|
|
|
|
th-extras = doJailbreak super.th-extras;
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# https://github.com/kowainik/relude/issues/436
|
2023-08-22 20:05:09 +00:00
|
|
|
relude = dontCheck super.relude;
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit
|
|
|
|
(
|
|
|
|
let
|
|
|
|
hls_overlay = lself: lsuper: {
|
2024-04-21 15:54:59 +00:00
|
|
|
Cabal-syntax = lself.Cabal-syntax_3_10_3_0;
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) {
|
|
|
|
haskell-language-server = allowInconsistentDependencies super.haskell-language-server;
|
2024-04-21 15:54:59 +00:00
|
|
|
fourmolu = super.fourmolu;
|
|
|
|
ormolu = super.ormolu;
|
|
|
|
hlint = super.hlint;
|
2023-11-16 04:20:00 +00:00
|
|
|
stylish-haskell = super.stylish-haskell;
|
|
|
|
}
|
|
|
|
)
|
|
|
|
haskell-language-server
|
|
|
|
fourmolu
|
|
|
|
ormolu
|
|
|
|
hlint
|
|
|
|
stylish-haskell
|
|
|
|
;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
# Packages which need compat library for GHC < 9.6
|
|
|
|
inherit
|
|
|
|
(lib.mapAttrs
|
|
|
|
(_: addBuildDepends [ self.foldable1-classes-compat ])
|
|
|
|
super)
|
|
|
|
indexed-traversable
|
|
|
|
OneTuple
|
|
|
|
these
|
|
|
|
;
|
|
|
|
base-compat-batteries = addBuildDepends [
|
|
|
|
self.foldable1-classes-compat
|
|
|
|
self.OneTuple
|
|
|
|
] super.base-compat-batteries;
|
|
|
|
|
|
|
|
# Too strict lower bound on base
|
|
|
|
primitive-addr = doJailbreak super.primitive-addr;
|
2022-08-12 12:06:08 +00:00
|
|
|
}
|