···23let
4 inherit (pkgs) fetchpatch lib;
5- inherit (lib) throwIfNot versionOlder;
0006in
78-self: super: {
00009 llvmPackages = lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
1011 # Disable GHC core libraries.
···48 # GHC only bundles the xhtml library if haddock is enabled, check if this is
49 # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
50 xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000051}
···23let
4 inherit (pkgs) fetchpatch lib;
5+ checkAgainAfter = pkg: ver: msg: act:
6+ if builtins.compareVersions pkg.version ver <= 0 then act
7+ else
8+ builtins.throw "Check if '${msg}' was resolved in ${pkg.pname} ${pkg.version} and update or remove this";
9in
1011+with haskellLib;
12+self: super: let
13+ doctest_0_20_broken = p: checkAgainAfter self.doctest "0.20.0" "doctest broken on 9.4" (dontCheck p);
14+ jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
15+in {
16 llvmPackages = lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
1718 # Disable GHC core libraries.
···55 # GHC only bundles the xhtml library if haddock is enabled, check if this is
56 # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
57 xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;
58+59+ # Tests fail because of typechecking changes
60+ conduit = dontCheck super.conduit;
61+62+ # 0.30 introduced support for GHC 9.2.
63+ cryptonite = doDistribute self.cryptonite_0_30;
64+65+ # Too strict bound on base
66+ # https://github.com/haskell/cabal/issues/8509
67+ # Requested versions of Cabal, Cabal-syntax and process match GHC 9.4's for now
68+ cabal-install = doJailbreak super.cabal-install;
69+ cabal-install-solver = doJailbreak super.cabal-install-solver;
70+71+ # Test failure due to new Cabal 3.8 version. Since the failure only pertains
72+ # to a change in how Cabal internally represents some platforms and we depend
73+ # on the type of representation anywhere, this failure is harmless. Can be
74+ # removed after https://github.com/NixOS/cabal2nix/pull/571 is merged.
75+ # TODO(@sternenseemann): merge and release a fixed version
76+ distribution-nixpkgs = dontCheck super.distribution-nixpkgs;
77+ cabal2nix = dontCheck super.cabal2nix;
78+ cabal2nix-unstable = dontCheck super.cabal2nix-unstable;
79+80+ # build fails on due to ghc api changes
81+ # unfinished PR that doesn't yet compile:
82+ # https://github.com/sol/doctest/pull/375
83+ doctest = markBroken super.doctest_0_20_0;
84+ # consequences of doctest breakage follow:
85+ http-types = doctest_0_20_broken super.http-types;
86+ iproute = doctest_0_20_broken super.iproute;
87+ foldl = doctest_0_20_broken super.foldl;
88+ prettyprinter-ansi-terminal = doctest_0_20_broken super.prettyprinter-ansi-terminal;
89+ pretty-simple = doctest_0_20_broken super.pretty-simple;
90+ http-date = doctest_0_20_broken super.http-date;
91+ network-byte-order = doctest_0_20_broken super.network-byte-order;
92+ co-log-core = doctest_0_20_broken (doJailbreak super.co-log-core);
93+ xml-conduit = doctest_0_20_broken (dontCheck super.xml-conduit);
94+ validation-selective = doctest_0_20_broken (dontCheck super.validation-selective);
95+96+ double-conversion = markBroken super.double-conversion;
97+ blaze-textual = checkAgainAfter super.double-conversion "2.0.4.1" "double-conversion fails to build; required for testsuite" (dontCheck super.blaze-textual);
98+ ghc-source-gen = checkAgainAfter super.ghc-source-gen "0.4.3.0" "fails to build" (markBroken super.ghc-source-gen);
99+100+ lucid = jailbreakForCurrentVersion super.lucid "2.11.1";
101+ invariant = jailbreakForCurrentVersion super.invariant "0.5.6";
102+ implicit-hie-cradle = jailbreakForCurrentVersion super.implicit-hie-cradle "0.5.0.0";
103+104+ haskell-src-meta = doJailbreak super.haskell-src-meta;
105+106+ # Tests fail in GHC 9.2
107+ extra = dontCheck super.extra;
108+109+ # Jailbreaks & Version Updates
110+111+ aeson = self.aeson_2_1_1_0;
112+ aeson-diff = doctest_0_20_broken (dontCheck super.aeson-diff);
113+ lens-aeson = self.lens-aeson_1_2_2;
114+115+ assoc = doJailbreak super.assoc;
116+ async = doJailbreak super.async;
117+ base64-bytestring = doJailbreak super.base64-bytestring;
118+ base-compat = self.base-compat_0_12_2;
119+ base-compat-batteries = self.base-compat-batteries_0_12_2;
120+ binary-instances = doJailbreak super.binary-instances;
121+ ChasingBottoms = doJailbreak super.ChasingBottoms;
122+ constraints = doJailbreak super.constraints;
123+ cpphs = overrideCabal (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}) super.cpphs;
124+ data-fix = doJailbreak super.data-fix;
125+ dec = doJailbreak super.dec;
126+ ed25519 = doJailbreak super.ed25519;
127+ ghc-byteorder = doJailbreak super.ghc-byteorder;
128+ ghc-lib = doDistribute self.ghc-lib_9_4_2_20220822;
129+ ghc-lib-parser = doDistribute self.ghc-lib-parser_9_4_2_20220822;
130+ ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_4_0_0;
131+ hackage-security = doJailbreak super.hackage-security;
132+ hashable = super.hashable_1_4_1_0;
133+ hashable-time = doJailbreak super.hashable-time;
134+ HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
135+ integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
136+ indexed-traversable = doJailbreak super.indexed-traversable;
137+ indexed-traversable-instances = doJailbreak super.indexed-traversable-instances;
138+ lifted-async = doJailbreak super.lifted-async;
139+ lukko = doJailbreak super.lukko;
140+ lzma-conduit = doJailbreak super.lzma-conduit;
141+ parallel = doJailbreak super.parallel;
142+ path = doJailbreak super.path;
143+ polyparse = overrideCabal (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }) (doJailbreak super.polyparse);
144+ primitive = dontCheck (doJailbreak self.primitive_0_7_4_0);
145+ regex-posix = doJailbreak super.regex-posix;
146+ resolv = doJailbreak super.resolv;
147+ singleton-bool = doJailbreak super.singleton-bool;
148+149+ # 2022-09-02: Too strict bounds on lens
150+ # https://github.com/GetShopTV/swagger2/pull/242
151+ swagger2 = doctest_0_20_broken (dontCheck (doJailbreak super.swagger2));
152+153+ base-orphans = dontCheck super.base-orphans;
154+155+ # Note: Any compilation fixes need to be done on the versioned attributes,
156+ # since those are used for the internal dependencies between the versioned
157+ # hspec packages in configuration-common.nix.
158+ hspec = self.hspec_2_10_6;
159+ hspec-core = self.hspec-core_2_10_6;
160+ hspec-meta = self.hspec-meta_2_10_5;
161+ hspec-discover = self.hspec-discover_2_10_6;
162+163+ # the dontHaddock is due to a GHC panic. might be this bug, not sure.
164+ # https://gitlab.haskell.org/ghc/ghc/-/issues/21619
165+ #
166+ # We need >= 1.1.2 for ghc-9.4 support, but we don't have 1.1.x in
167+ # hackage-packages.nix
168+ hedgehog = doDistribute (dontHaddock super.hedgehog_1_2);
169+ # does not work with hedgehog 1.2 yet:
170+ # https://github.com/qfpl/tasty-hedgehog/pull/63
171+ tasty-hedgehog = markBroken super.tasty-hedgehog;
172+ # due to tasty-hedgehog
173+ retry = checkAgainAfter super.tasty-hedgehog "1.3.0.0" "tasty-hedgehog broken" (dontCheck super.retry);
174+175+ # https://github.com/dreixel/syb/issues/38
176+ syb = dontCheck super.syb;
177+178+ splitmix = doJailbreak super.splitmix;
179+ th-desugar = self.th-desugar_1_14;
180+ time-compat = doJailbreak super.time-compat;
181+ tomland = doJailbreak super.tomland;
182+ type-equality = doJailbreak super.type-equality;
183+ unordered-containers = doJailbreak super.unordered-containers;
184+ vector = dontCheck super.vector;
185+ vector-binary-instances = doJailbreak super.vector-binary-instances;
186+187+ # fixed in 1.16.x but it's not in hackage-packages yet.
188+ rebase = jailbreakForCurrentVersion super.rebase "1.15.0.3";
189+ rerebase = jailbreakForCurrentVersion super.rerebase "1.15.0.3";
190+191+ hpack = overrideCabal (drv: {
192+ # Cabal 3.6 seems to preserve comments when reading, which makes this test fail
193+ # 2021-10-10: 9.2.1 is not yet supported (also no issue)
194+ testFlags = [
195+ "--skip=/Hpack/renderCabalFile/is inverse to readCabalFile/"
196+ ] ++ drv.testFlags or [];
197+ }) (doJailbreak super.hpack);
198+199+ # lens >= 5.1 supports 9.2.1
200+ lens = doDistribute self.lens_5_2;
201+202+ # Apply patches from head.hackage.
203+ language-haskell-extract = appendPatch (pkgs.fetchpatch {
204+ url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
205+ sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv";
206+ }) (doJailbreak super.language-haskell-extract);
207+208+ # Tests depend on `parseTime` which is no longer available
209+ hourglass = dontCheck super.hourglass;
210+211+ memory = super.memory_0_18_0;
212+213+ # https://github.com/sjakobi/bsb-http-chunked/issues/38
214+ bsb-http-chunked = dontCheck super.bsb-http-chunked;
215+216+ # need bytestring >= 0.11 which is only bundled with GHC >= 9.2
217+ regex-rure = doDistribute (markUnbroken super.regex-rure);
218+ jacinda = doDistribute super.jacinda;
219+ some = doJailbreak super.some;
220+221+ # 1.3 introduced support for GHC 9.2.x, so when this assert fails, the jailbreak can be removed
222+ hashtables = assert super.hashtables.version == "1.2.4.2"; doJailbreak super.hashtables;
223+224+ # 2022-08-01: Tests are broken on ghc 9.2.4: https://github.com/wz1000/HieDb/issues/46
225+ hiedb = dontCheck super.hiedb;
226+227}