1{ pkgs, haskellLib }:
2
3self: super:
4
5with haskellLib;
6
7let
8 inherit (pkgs) lib;
9
10 warnAfterVersion =
11 ver: pkg:
12 lib.warnIf (lib.versionOlder ver
13 super.${pkg.pname}.version
14 ) "override for haskell.packages.ghc910.${pkg.pname} may no longer be needed" pkg;
15
16in
17
18{
19 # Disable GHC core libraries
20 array = null;
21 base = null;
22 binary = null;
23 bytestring = null;
24 Cabal = null;
25 Cabal-syntax = null;
26 containers = null;
27 deepseq = null;
28 directory = null;
29 exceptions = null;
30 filepath = null;
31 ghc-bignum = null;
32 ghc-boot = null;
33 ghc-boot-th = null;
34 ghc-compact = null;
35 ghc-experimental = null;
36 ghc-heap = null;
37 ghc-internal = null;
38 ghc-platform = null;
39 ghc-prim = null;
40 ghc-toolchain = null;
41 ghci = null;
42 haskeline = null;
43 hpc = null;
44 integer-gmp = null;
45 mtl = null;
46 os-string = null;
47 parsec = null;
48 pretty = null;
49 process = null;
50 rts = null;
51 semaphore-compat = null;
52 stm = null;
53 system-cxx-std-lib = null;
54 template-haskell = null;
55 # GHC only builds terminfo if it is a native compiler
56 terminfo =
57 if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then
58 null
59 else
60 doDistribute self.terminfo_0_4_1_7;
61 text = null;
62 time = null;
63 transformers = null;
64 unix = null;
65 xhtml = null;
66
67 #
68 # Version upgrades
69 #
70
71 # Upgrade to accommodate new core library versions, where the authors have
72 # already made the relevant changes.
73 # 2025-04-09: jailbreak to allow hedgehog >= 1.5, hspec-hedgehog >=0.2
74 extensions = doJailbreak (doDistribute self.extensions_0_1_0_2);
75 fourmolu = doDistribute self.fourmolu_0_16_0_0;
76 # https://github.com/digital-asset/ghc-lib/issues/600
77 ghc-lib = doDistribute self.ghc-lib_9_10_2_20250515;
78 ghc-lib-parser = doDistribute self.ghc-lib-parser_9_10_2_20250515;
79 ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_10_0_0;
80 htree = doDistribute self.htree_0_2_0_0;
81 ormolu = doDistribute self.ormolu_0_7_7_0;
82 stylish-haskell = doDistribute self.stylish-haskell_0_15_0_1;
83
84 # A given major version of ghc-exactprint only supports one version of GHC.
85 ghc-exactprint = doDistribute self.ghc-exactprint_1_9_0_0;
86 ghc-exactprint_1_9_0_0 = addBuildDepends [
87 self.Diff
88 self.extra
89 self.ghc-paths
90 self.silently
91 self.syb
92 self.HUnit
93 ] super.ghc-exactprint_1_9_0_0;
94
95 #
96 # Jailbreaks
97 #
98 # 2025-04-09: base <4.20, containers <0.7, filepath <1.5, Cabal-syntax <3.11
99 cabal-install-parsers =
100 assert super.cabal-install-parsers.version == "0.6.1.1";
101 doJailbreak super.cabal-install-parsers;
102 floskell = doJailbreak super.floskell; # base <4.20
103 # 2025-04-09: filepath <1.5
104 haddock-library =
105 assert super.haddock-library.version == "1.11.0";
106 doJailbreak super.haddock-library;
107 large-generics = doJailbreak super.large-generics; # base <4.20
108 tree-sitter = doJailbreak super.tree-sitter; # containers <0.7, filepath <1.5
109
110 hashable_1_5_0_0 = doJailbreak super.hashable_1_5_0_0; # relax bounds for QuickCheck, tasty, and tasty-quickcheck
111
112 #
113 # Test suite issues
114 #
115 call-stack = dontCheck super.call-stack; # https://github.com/sol/call-stack/issues/19
116 fsnotify = dontCheck super.fsnotify; # https://github.com/haskell-fswatch/hfsnotify/issues/115
117 hinotify = pkgs.haskell.lib.dontCheck super.hinotify; # https://github.com/kolmodin/hinotify/issues/38
118 monad-dijkstra = dontCheck super.monad-dijkstra; # needs hlint 3.10
119
120 haskell-language-server = super.haskell-language-server.override {
121 floskell = null;
122 retrie = null;
123 hlint = null;
124 apply-refact = null;
125 };
126
127}