Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1# COMMON OVERRIDES FOR THE HASKELL PACKAGE SET IN NIXPKGS
2#
3# This file contains haskell package overrides that are shared by all
4# haskell package sets provided by nixpkgs and distributed via the official
5# NixOS hydra instance.
6#
7# Overrides that would also make sense for custom haskell package sets not provided
8# as part of nixpkgs and that are specific to Nix should go in configuration-nix.nix
9#
10# See comment at the top of configuration-nix.nix for more information about this
11# distinction.
12{ pkgs, haskellLib }:
13
14self: super:
15
16let
17 inherit (pkgs) fetchpatch lib;
18 inherit (lib) throwIfNot versionOlder;
19
20 warnAfterVersion =
21 ver: pkg:
22 lib.warnIf (lib.versionOlder ver
23 super.${pkg.pname}.version
24 ) "override for haskellPackages.${pkg.pname} may no longer be needed" pkg;
25
26in
27
28with haskellLib;
29
30# To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead.
31{
32 # Hackage's accelerate is from 2020 and incompatible with our GHC.
33 # The existing derivation also has missing dependencies
34 # compared to the source from github.
35 # https://github.com/AccelerateHS/accelerate/issues/553
36 accelerate = lib.pipe super.accelerate [
37 (warnAfterVersion "1.3.0.0")
38 (addBuildDepends [
39 self.double-conversion
40 self.formatting
41 self.microlens
42 ])
43
44 (overrideCabal (drv: {
45 version = "1.3.0.0-unstable-2025-04-25";
46 src = pkgs.fetchFromGitHub {
47 owner = "AccelerateHS";
48 repo = "accelerate";
49 rev = "3f681a5091eddf5a3b97f4cd0de32adc830e1117";
50 sha256 = "sha256-tCcl7wAls+5cBSrqbxfEAJngbV43OJcLJdaC4qqkBxc=";
51 };
52 }))
53 ];
54
55 # https://github.com/ivanperez-keera/dunai/issues/427
56 dunai = addBuildDepend self.list-transformer (enableCabalFlag "list-transformer" super.dunai);
57
58 # Make sure that Cabal_* can be built as-is
59 Cabal_3_10_3_0 = doDistribute (
60 super.Cabal_3_10_3_0.override {
61 Cabal-syntax = self.Cabal-syntax_3_10_3_0;
62 }
63 );
64 Cabal_3_12_1_0 = doDistribute (
65 super.Cabal_3_12_1_0.override {
66 Cabal-syntax = self.Cabal-syntax_3_12_1_0;
67 }
68 );
69 Cabal_3_14_2_0 =
70 overrideCabal
71 (drv: {
72 # Revert increased lower bound on unix since we have backported
73 # the required patch to all GHC bundled versions of unix.
74 postPatch = drv.postPatch or "" + ''
75 substituteInPlace Cabal.cabal --replace-fail "unix >= 2.8.6.0" "unix >= 2.6.0.0"
76 '';
77 })
78 (
79 doDistribute (
80 super.Cabal_3_14_2_0.override {
81 Cabal-syntax = self.Cabal-syntax_3_14_2_0;
82 }
83 )
84 );
85
86 # Needs matching version of Cabal
87 Cabal-hooks = super.Cabal-hooks.override {
88 Cabal = self.Cabal_3_14_2_0;
89 };
90
91 # Needs Cabal>=3.14
92 cabal-lenses = super.cabal-lenses.override {
93 Cabal = self.Cabal_3_14_2_0;
94 };
95
96 # cabal-install needs most recent versions of Cabal and Cabal-syntax,
97 # so we need to put some extra work for non-latest GHCs
98 inherit
99 (
100 let
101 # !!! Use cself/csuper inside for the actual overrides
102 cabalInstallOverlay = cself: csuper: {
103 Cabal = cself.Cabal_3_14_2_0;
104 Cabal-syntax = cself.Cabal-syntax_3_14_2_0;
105 };
106 in
107 {
108 cabal-install =
109 let
110 cabal-install = super.cabal-install.overrideScope cabalInstallOverlay;
111 scope = cabal-install.scope;
112 in
113 # Some dead code is not properly eliminated on aarch64-darwin, leading
114 # to bogus references to some dependencies.
115 overrideCabal (
116 old:
117 {
118 # Prevent DOS line endings from Hackage from breaking a patch
119 prePatch = old.prePatch or "" + ''
120 ${pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
121 '';
122 # Ignore unix bound intended to prevent an unix bug on 32bit systems.
123 # We apply a patch for this issue to the GHC core packages directly.
124 # See unix-fix-ctimeval-size-32-bit.patch in ../compilers/ghc/common-*.nix
125 patches =
126 old.patches or [ ]
127 ++
128 lib.optionals
129 (
130 scope.unix == null
131 && lib.elem self.ghc.version [
132 "9.6.1"
133 "9.6.2"
134 "9.6.3"
135 "9.6.4"
136 "9.6.5"
137 "9.6.6"
138 "9.8.1"
139 "9.8.2"
140 "9.8.3"
141 "9.10.1"
142 ]
143 )
144 [
145 ./patches/cabal-install-3.14.1.1-lift-unix-bound.patch
146 ];
147 }
148 // lib.optionalAttrs (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) {
149 postInstall = ''
150 ${old.postInstall or ""}
151 remove-references-to -t ${scope.HTTP} "$out/bin/.cabal-wrapped"
152 # if we don't override Cabal, it is taken from ghc's core libs
153 remove-references-to -t ${
154 if scope.Cabal != null then scope.Cabal else scope.ghc
155 } "$out/bin/.cabal-wrapped"
156 '';
157 }
158 ) cabal-install;
159
160 cabal-install-solver = super.cabal-install-solver.overrideScope cabalInstallOverlay;
161
162 # Needs cabal-install >= 3.8 /as well as/ matching Cabal
163 guardian = lib.pipe (super.guardian.overrideScope cabalInstallOverlay) [
164 # Tests need internet access (run stack)
165 dontCheck
166 # May as well…
167 (self.generateOptparseApplicativeCompletions [ "guardian" ])
168 ];
169 }
170 )
171 cabal-install
172 cabal-install-solver
173 guardian
174 ;
175
176 # Expected test output for these accidentally checks the absolute location of the source directory
177 # https://github.com/dan-t/cabal-cargs/issues/9
178 cabal-cargs = overrideCabal (drv: {
179 testFlags = drv.testFlags or [ ] ++ [
180 "-p"
181 "!/FindCabalFilePure withoutSandbox/"
182 "-p"
183 "!/FromCabalFilePure withoutSandbox/"
184 "-p"
185 "!/FromLibSrcPure withoutSandbox/"
186 "-p"
187 "!/FromExeSrcFilePure withoutSandbox/"
188 "-p"
189 "!/FindCabalFilePure withSandbox/"
190 "-p"
191 "!/FromCabalFilePure withSandbox/"
192 "-p"
193 "!/FromLibSrcPure withSandbox/"
194 "-p"
195 "!/FromExeSrcFilePure withSandbox/"
196 ];
197 }) super.cabal-cargs;
198
199 # Extensions wants the latest version of Cabal for its list of Haskell
200 # language extensions.
201 # 2025-02-10: jailbreak to allow hspec-hedgehog 0.3.0.0 and hedgehog 1.5
202 extensions = doJailbreak (
203 super.extensions.override {
204 Cabal = if versionOlder self.ghc.version "9.6" then self.Cabal_3_10_3_0 else null; # use GHC bundled version
205 }
206 );
207
208 #######################################
209 ### HASKELL-LANGUAGE-SERVER SECTION ###
210 #######################################
211
212 # All jailbreaks in this section due to: https://github.com/haskell/haskell-language-server/pull/4316#discussion_r1667684895
213 haskell-language-server =
214 lib.pipe
215 (super.haskell-language-server.overrideScope (
216 lself: lsuper: {
217 # For most ghc versions, we overrideScope Cabal in the configuration-ghc-???.nix,
218 # because some packages, like ormolu, need a newer Cabal version.
219 # ghc-paths is special because it depends on Cabal for building
220 # its Setup.hs, and therefor declares a Cabal dependency, but does
221 # not actually use it as a build dependency.
222 # That means ghc-paths can just use the ghc included Cabal version,
223 # without causing package-db incoherence and we should do that because
224 # otherwise we have different versions of ghc-paths
225 # around which have the same abi-hash, which can lead to confusions and conflicts.
226 ghc-paths = lsuper.ghc-paths.override { Cabal = null; };
227 }
228 ))
229 [
230 dontCheck
231 ];
232
233 # For -f-auto see cabal.project in haskell-language-server.
234 ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (
235 disableCabalFlag "auto" super.ghc-lib-parser-ex
236 );
237
238 ###########################################
239 ### END HASKELL-LANGUAGE-SERVER SECTION ###
240 ###########################################
241
242 # Test ldap server test/ldap.js is missing from sdist
243 # https://github.com/supki/ldap-client/issues/18
244 ldap-client-og = dontCheck super.ldap-client-og;
245
246 # Support for template-haskell >= 2.16
247 language-haskell-extract = appendPatch (pkgs.fetchpatch {
248 url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
249 sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv";
250 }) (doJailbreak super.language-haskell-extract);
251
252 vector = overrideCabal (old: {
253 # vector-doctest seems to be broken when executed via ./Setup test
254 testTargets = [
255 "vector-tests-O0"
256 "vector-tests-O2"
257 ];
258 }) super.vector;
259
260 # https://github.com/lspitzner/data-tree-print/issues/4
261 data-tree-print = doJailbreak super.data-tree-print;
262
263 # jacinda needs latest version of alex and happy
264 jacinda = super.jacinda.override {
265 happy = self.happy_2_1_5;
266 };
267
268 # Test suite hangs on 32bit. Unclear if this is a bug or not, but if so, then
269 # it has been present in past versions as well.
270 # https://github.com/haskell-unordered-containers/unordered-containers/issues/491
271 unordered-containers =
272 if pkgs.stdenv.hostPlatform.is32bit then
273 dontCheck super.unordered-containers
274 else
275 super.unordered-containers;
276
277 aeson =
278 # aeson's test suite includes some tests with big numbers that fail on 32bit
279 # https://github.com/haskell/aeson/issues/1060
280 dontCheckIf pkgs.stdenv.hostPlatform.is32bit
281 # Deal with infinite and NaN values generated by QuickCheck-2.14.3
282 super.aeson;
283
284 time-compat = overrideCabal (drv: {
285 testFlags = drv.testFlags or [ ] ++ [
286 "-p"
287 (lib.concatStringsSep "&&" [
288 # Precision tests often fail in VMs:
289 # https://github.com/haskellari/time-compat/issues/31
290 "!/getCurrentTime/"
291 "!/taiClock/"
292 ])
293 ];
294 }) super.time-compat;
295
296 # 2023-06-28: Test error: https://hydra.nixos.org/build/225565149
297 orbits = dontCheck super.orbits;
298
299 # 2025-02-10: Too strict bounds on tasty-quickcheck < 0.11
300 tasty-discover = doJailbreak super.tasty-discover;
301
302 # 2025-02-10: Too strict bounds on tasty < 1.5
303 tasty-hunit-compat = doJailbreak super.tasty-hunit-compat;
304
305 # Out of date test data: https://github.com/ocharles/weeder/issues/176
306 weeder = appendPatch (pkgs.fetchpatch {
307 name = "weeder-2.9.0-test-fix-expected.patch";
308 url = "https://github.com/ocharles/weeder/commit/56028d0c80fe89d4f2ae25275aedb72714fec7da.patch";
309 sha256 = "10zkvclyir3zf21v41zdsvg68vrkq89n64kv9k54742am2i4aygf";
310 }) super.weeder;
311
312 # Version 2.1.1 is deprecated, but part of Stackage LTS at the moment.
313 # https://github.com/commercialhaskell/stackage/issues/7500
314 # https://github.com/yesodweb/shakespeare/issues/280
315 shakespeare = doDistribute self.shakespeare_2_1_0_1;
316
317 # Work around -Werror failures until a more permanent solution is released
318 # https://github.com/haskell-cryptography/HsOpenSSL/issues/88
319 # https://github.com/haskell-cryptography/HsOpenSSL/issues/93
320 # https://github.com/haskell-cryptography/HsOpenSSL/issues/95
321 HsOpenSSL = appendConfigureFlags [
322 "--ghc-option=-optc=-Wno-error=incompatible-pointer-types"
323 ] super.HsOpenSSL;
324 # Work around compilation failures with gcc >= 14
325 # https://github.com/audreyt/hssyck/issues/5
326 HsSyck = appendConfigureFlags [
327 "--ghc-option=-optc=-Wno-error=implicit-function-declaration"
328 ] super.HsSyck;
329 # https://github.com/rethab/bindings-dsl/issues/46
330 bindings-libcddb = appendConfigureFlags [
331 "--ghc-option=-optc=-Wno-error=incompatible-pointer-types"
332 ] super.bindings-libcddb;
333 # https://github.com/ocramz/hdf5-lite/issues/3
334 hdf5-lite = appendConfigureFlags [
335 "--ghc-option=-optc=-Wno-error=implicit-function-declaration"
336 ] super.hdf5-lite;
337 # https://github.com/awkward-squad/termbox/issues/5
338 termbox-bindings-c = appendConfigureFlags [
339 "--ghc-option=-optc=-Wno-error=implicit-function-declaration"
340 ] super.termbox-bindings-c;
341
342 # There are numerical tests on random data, that may fail occasionally
343 lapack = dontCheck super.lapack;
344
345 # support for transformers >= 0.6
346 lifted-base = appendPatch (fetchpatch {
347 url = "https://github.com/basvandijk/lifted-base/commit/6b61483ec7fd0d5d5d56ccb967860d42740781e8.patch";
348 sha256 = "sha256-b29AVDiEMcShceRJyKEauK/411UkOh3ME9AnKEYvcEs=";
349 }) super.lifted-base;
350
351 leveldb-haskell = overrideCabal (drv: {
352 version = "2024-05-05-unstable";
353 # Fix tests on mtl ≥ 2.3
354 # https://github.com/kim/leveldb-haskell/pull/42
355 src = pkgs.fetchFromGitHub {
356 owner = "kim";
357 repo = "leveldb-haskell";
358 rev = "3a505f3a7de0f5d14463538d7c2c9a9881a60eb9";
359 sha256 = "sha256-okUn5ZuWcj8vPr0GWXvO1LygNCrDfttkDaUoOt+FLA0=";
360 };
361 }) super.leveldb-haskell;
362
363 # 2024-06-23: Hourglass is archived and had its last commit 6 years ago.
364 # Patch is needed to add support for time 1.10, which is only used in the tests
365 # https://github.com/vincenthz/hs-hourglass/pull/56
366 # Jailbreak is needed because a hackage revision added the (correct) time <1.10 bound.
367 hourglass = doJailbreak (
368 appendPatches [
369 (pkgs.fetchpatch {
370 name = "hourglass-pr-56.patch";
371 url = "https://github.com/vincenthz/hs-hourglass/commit/cfc2a4b01f9993b1b51432f0a95fa6730d9a558a.patch";
372 sha256 = "sha256-gntZf7RkaR4qzrhjrXSC69jE44SknPDBmfs4z9rVa5Q=";
373 })
374 ] super.hourglass
375 );
376
377 # Arion's test suite needs a Nixpkgs, which is cumbersome to do from Nixpkgs
378 # itself. For instance, pkgs.path has dirty sources and puts a huge .git in the
379 # store. Testing is done upstream.
380 arion-compose = dontCheck super.arion-compose;
381
382 # 2023-07-17: Outdated base bound https://github.com/srid/lvar/issues/5
383 lvar = doJailbreak super.lvar;
384
385 # Don't call setEnv in parallel in the test suite (which leads to flaky failures)
386 env-extra =
387 appendPatches
388 [
389 (pkgs.fetchpatch {
390 name = "env-extra-no-parallel-setenv.patch";
391 url = "https://github.com/d12frosted/env-extra/commit/4fcbc031b210e71e4243fcfe7c48d381e2f51d78.patch";
392 sha256 = "sha256-EbXk+VOmxMJAMCMTXpTiW8fkbNI9za7f1alzCeaJaV4=";
393 excludes = [ "package.yaml" ];
394 })
395 ]
396 (
397 overrideCabal (drv: {
398 prePatch = ''
399 ${drv.prePatch or ""}
400 ${lib.getExe' pkgs.buildPackages.dos2unix "dos2unix"} *.cabal
401 '';
402 }) super.env-extra
403 );
404
405 # This used to be a core package provided by GHC, but then the compiler
406 # dropped it. We define the name here to make sure that old packages which
407 # depend on this library still evaluate (even though they won't compile
408 # successfully with recent versions of the compiler).
409 bin-package-db = null;
410
411 # waiting for release: https://github.com/jwiegley/c2hsc/issues/41
412 c2hsc = appendPatch (fetchpatch {
413 url = "https://github.com/jwiegley/c2hsc/commit/490ecab202e0de7fc995eedf744ad3cb408b53cc.patch";
414 sha256 = "1c7knpvxr7p8c159jkyk6w29653z5yzgjjqj11130bbb8mk9qhq7";
415 }) super.c2hsc;
416
417 # 2025-02-10: Too strict bounds on bytestring < 0.12
418 ghc-debug-common = doJailbreak super.ghc-debug-common;
419
420 # https://github.com/agrafix/superbuffer/issues/4
421 # Too strict bounds on bytestring < 0.12
422 superbuffer = doJailbreak super.superbuffer;
423
424 # Infinite recursion with test enabled.
425 # 2025-02-14: Too strict bounds on attoparsec < 0.14
426 attoparsec-varword = doJailbreak (dontCheck super.attoparsec-varword);
427
428 # These packages (and their reverse deps) cannot be built with profiling enabled.
429 ghc-heap-view = disableLibraryProfiling super.ghc-heap-view;
430 ghc-datasize = disableLibraryProfiling super.ghc-datasize;
431 ghc-vis = disableLibraryProfiling super.ghc-vis;
432
433 # Fix 32bit struct being used for 64bit syscall on 32bit platforms
434 # https://github.com/haskellari/lukko/issues/15
435 lukko = appendPatches [
436 (fetchpatch {
437 name = "lukko-ofd-locking-32bit.patch";
438 url = "https://github.com/haskellari/lukko/pull/32/commits/4e69ffad996c3771f50017b97375af249dd17c85.patch";
439 sha256 = "0n8vig48irjz0jckc20dzc23k16fl5hznrc0a81y02ms72msfwi1";
440 })
441 ] super.lukko;
442
443 # Relax version constraints (network < 3.2, text < 2.1)
444 # https://github.com/essandess/adblock2privoxy/pull/43
445 adblock2privoxy = doJailbreak super.adblock2privoxy;
446
447 # Missing test file https://gitlab.com/dpwiz/hs-jpeg-turbo/-/issues/1
448 jpeg-turbo = dontCheck super.jpeg-turbo;
449 JuicyPixels-jpeg-turbo = dontCheck super.JuicyPixels-jpeg-turbo;
450
451 # Fixes compilation for basement on i686 for GHC >= 9.4
452 # https://github.com/haskell-foundation/foundation/pull/573
453 # Patch would not work for GHC >= 9.2 where it breaks compilation on x86_64
454 # https://github.com/haskell-foundation/foundation/pull/573#issuecomment-1669468867
455 # TODO(@sternenseemann): make unconditional
456 basement = appendPatches (lib.optionals pkgs.stdenv.hostPlatform.is32bit [
457 (fetchpatch {
458 name = "basement-i686-ghc-9.4.patch";
459 url = "https://github.com/haskell-foundation/foundation/pull/573/commits/38be2c93acb6f459d24ed6c626981c35ccf44095.patch";
460 sha256 = "17kz8glfim29vyhj8idw8bdh3id5sl9zaq18zzih3schfvyjppj7";
461 stripLen = 1;
462 })
463 ]) super.basement;
464
465 # Fixes compilation of memory with GHC >= 9.4 on 32bit platforms
466 # https://github.com/vincenthz/hs-memory/pull/99
467 memory = appendPatches (lib.optionals pkgs.stdenv.hostPlatform.is32bit [
468 (fetchpatch {
469 name = "memory-i686-ghc-9.4.patch";
470 url = "https://github.com/vincenthz/hs-memory/pull/99/commits/2738929ce15b4c8704bbbac24a08539b5d4bf30e.patch";
471 sha256 = "196rj83iq2k249132xsyhbbl81qi1j23h9pa6mmk6zvxpcf63yfw";
472 })
473 ]) super.memory;
474
475 # Depends on outdated deps hedgehog < 1.4, doctest < 0.12 for tests
476 # As well as deepseq < 1.5 (so it forbids GHC 9.8)
477 hw-fingertree = doJailbreak super.hw-fingertree;
478
479 # Test suite is slow and sometimes comes up with counter examples.
480 # Upstream is aware (https://github.com/isovector/nspace/issues/1),
481 # if it's a bug, at least doesn't seem to be nixpkgs-specific.
482 nspace = dontCheck super.nspace;
483
484 # Unreleased commits relaxing bounds on various dependencies
485 gitit = appendPatches [
486 (fetchpatch {
487 name = "gitit-allow-hoauth2-2.14.patch";
488 url = "https://github.com/jgm/gitit/commit/58a226c48b37f076ccc1b94ad88a9ffc05f983cc.patch";
489 sha256 = "1fvfzbas18vsv9qvddp6g82hy9hdgz34n51w6dpkd7cm4sl07pjv";
490 })
491 (fetchpatch {
492 name = "gitit-allow-pandoc-3.6.patch";
493 url = "https://github.com/jgm/gitit/commit/c57c790fa0db81d383f22901a0db4ffe90f1bfcc.patch";
494 sha256 = "0nbzxyc9gkhkag1fhv3qmw5zgblhbz0axrlsismrcvdzr28amii8";
495 })
496 (fetchpatch {
497 name = "gitit-allow-zlib-0.7-network-3.2.patch";
498 url = "https://github.com/jgm/gitit/commit/efaee62bc32c558e618ad34458fa2ef85cb8eb1e.patch";
499 sha256 = "1ghky3afnib56w102mh09cz2alfyq743164mnjywwfl6a6yl6i5h";
500 })
501 ] super.gitit;
502
503 # https://github.com/schuelermine/ret/issues/3
504 ret = doJailbreak super.ret; # base < 4.19
505
506 # The latest release on hackage has an upper bound on containers which
507 # breaks the build, though it works with the version of containers present
508 # and the upper bound doesn't exist in code anymore:
509 # > https://github.com/roelvandijk/numerals
510 numerals = doJailbreak (dontCheck super.numerals);
511
512 # Bound on containers is too strict but jailbreak doesn't work with conditional flags
513 # https://github.com/NixOS/jailbreak-cabal/issues/24
514 containers-unicode-symbols = overrideCabal {
515 postPatch = ''
516 substituteInPlace containers-unicode-symbols.cabal \
517 --replace 'containers >= 0.5 && < 0.6.5' 'containers'
518 '';
519 } super.containers-unicode-symbols;
520
521 # Test file not included on hackage
522 numerals-base = dontCheck (doJailbreak super.numerals-base);
523
524 # This test keeps being aborted because it runs too quietly for too long
525 Lazy-Pbkdf2 =
526 if pkgs.stdenv.hostPlatform.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2;
527
528 # check requires mysql server
529 mysql-simple = dontCheck super.mysql-simple;
530
531 # Test data missing
532 # https://github.com/FPtje/GLuaFixer/issues/165
533 glualint = dontCheck super.glualint;
534
535 # Hackage tarball only includes what is supported by `cabal install git-annex`,
536 # but we want e.g. completions as well. See
537 # https://web.archive.org/web/20160724083703/https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
538 # or git-annex @ 3571b077a1244330cc736181ee04b4d258a78476 doc/bugs/bash_completion_file_is_missing*
539 git-annex = lib.pipe super.git-annex (
540 [
541 (overrideCabal (drv: {
542 src = pkgs.fetchgit {
543 name = "git-annex-${super.git-annex.version}-src";
544 url = "git://git-annex.branchable.com/";
545 rev = "refs/tags/" + super.git-annex.version;
546 sha256 = "0d968aciaxmblahk79x2m708rvbg19flj5naxzg0zdp9j2jwlcqf";
547 # delete android and Android directories which cause issues on
548 # darwin (case insensitive directory). Since we don't need them
549 # during the build process, we can delete it to prevent a hash
550 # mismatch on darwin.
551 postFetch = ''
552 rm -r $out/doc/?ndroid*
553 '';
554 };
555
556 patches = drv.patches or [ ] ++ [
557 # Prevent .desktop files from being installed to $out/usr/share.
558 # TODO(@sternenseemann): submit upstreamable patch resolving this
559 # (this should be possible by also taking PREFIX into account).
560 ./patches/git-annex-no-usr-prefix.patch
561
562 # Pick fix for git 2.50 related test suite failures from 10.20250630
563 # https://git-annex.branchable.com/bugs/test_suite_fail_with_git_2.50/
564 (pkgs.fetchpatch {
565 name = "git-annex-workaround-for-git-2.50.patch";
566 url = "https://git.joeyh.name/index.cgi/git-annex.git/patch/?id=fb155b1e3e59cc1f9cf8a4fe7d47cba49d1c81af";
567 sha256 = "sha256-w6eXW0JqshXTd0/tNPZ0fOW2SVmA90G5eFhsd9y05BI=";
568 excludes = [
569 "doc/**"
570 "CHANGELOG"
571 ];
572 })
573 ];
574
575 postPatch = ''
576 substituteInPlace Makefile \
577 --replace-fail 'InstallDesktopFile $(PREFIX)/bin/git-annex' \
578 'InstallDesktopFile git-annex'
579 '';
580 }))
581 ]
582 ++ lib.optionals (lib.versionOlder self.ghc.version "9.10") [
583 (disableCabalFlag "OsPath")
584 (addBuildDepends [ self.filepath-bytestring ])
585 ]
586 );
587
588 # Too strict bounds on servant
589 # Pending a hackage revision: https://github.com/berberman/arch-web/commit/5d08afee5b25e644f9e2e2b95380a5d4f4aa81ea#commitcomment-89230555
590 arch-web = doJailbreak super.arch-web;
591
592 # Fix test trying to access /home directory
593 shell-conduit = overrideCabal (drv: {
594 postPatch = "sed -i s/home/tmp/ test/Spec.hs";
595 }) super.shell-conduit;
596
597 # https://github.com/serokell/nixfmt/issues/130
598 nixfmt = doJailbreak super.nixfmt;
599
600 # Too strict upper bounds on turtle and text
601 # https://github.com/awakesecurity/nix-deploy/issues/35
602 nix-deploy = doJailbreak super.nix-deploy;
603
604 # Too strict upper bound on algebraic-graphs
605 # https://github.com/awakesecurity/nix-graph/issues/5
606 nix-graph = doJailbreak super.nix-graph;
607
608 # Too strict bounds on hspec
609 # https://github.com/illia-shkroba/pfile/issues/2
610 pfile = doJailbreak super.pfile;
611
612 # Manually maintained
613 cachix-api = overrideCabal (drv: {
614 version = "1.7.9";
615 src = pkgs.fetchFromGitHub {
616 owner = "cachix";
617 repo = "cachix";
618 tag = "v1.7.9";
619 hash = "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=";
620 };
621 postUnpack = "sourceRoot=$sourceRoot/cachix-api";
622 }) super.cachix-api;
623 cachix = (
624 overrideCabal
625 (drv: {
626 version = "1.7.9";
627 src = pkgs.fetchFromGitHub {
628 owner = "cachix";
629 repo = "cachix";
630 tag = "v1.7.9";
631 hash = "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=";
632 };
633 postUnpack = "sourceRoot=$sourceRoot/cachix";
634 })
635 (
636 lib.pipe
637 (super.cachix.override {
638 nix = self.hercules-ci-cnix-store.nixPackage;
639 })
640 [
641 (addBuildTool self.hercules-ci-cnix-store.nixPackage)
642 (addBuildTool pkgs.buildPackages.pkg-config)
643 (addBuildDepend self.hnix-store-nar)
644 ]
645 )
646 );
647
648 # Overly strict bounds on postgresql-simple (< 0.7), tasty (< 1.5) and tasty-quickcheck (< 0.11)
649 # https://github.com/tdammers/migrant/pull/5
650 migrant-core = doJailbreak super.migrant-core;
651 migrant-sqlite-simple = doJailbreak super.migrant-sqlite-simple;
652 migrant-hdbc = doJailbreak super.migrant-hdbc;
653 migrant-postgresql-simple = lib.pipe super.migrant-postgresql-simple [
654 (overrideCabal {
655 preCheck = ''
656 postgresqlTestUserOptions="LOGIN SUPERUSER"
657 '';
658 })
659 (addTestToolDepends [
660 pkgs.postgresql
661 pkgs.postgresqlTestHook
662 ])
663 doJailbreak
664 ];
665
666 # https://github.com/froozen/kademlia/issues/2
667 kademlia = dontCheck super.kademlia;
668
669 # Tests require older versions of tasty.
670 hzk = dontCheck super.hzk;
671
672 # Test suite doesn't compile with 9.6
673 # https://github.com/sebastiaanvisser/fclabels/issues/45
674 # Doesn't compile with 9.8 at all
675 # https://github.com/sebastiaanvisser/fclabels/issues/46
676 fclabels =
677 if lib.versionOlder self.ghc.version "9.8" then
678 dontCheck super.fclabels
679 else
680 dontDistribute (markBroken super.fclabels);
681
682 # Bounds on base are too strict.
683 # https://github.com/phadej/regex-applicative-text/issues/13
684 regex-applicative-text = doJailbreak super.regex-applicative-text;
685
686 # Tests require a Kafka broker running locally
687 haskakafka = dontCheck super.haskakafka;
688
689 bindings-levmar = addExtraLibrary pkgs.blas super.bindings-levmar;
690
691 # Requires wrapQtAppsHook
692 qtah-cpp-qt5 = overrideCabal (drv: {
693 buildDepends = [ pkgs.qt5.wrapQtAppsHook ];
694 }) super.qtah-cpp-qt5;
695
696 # The Haddock phase fails for one reason or another.
697 deepseq-magic = dontHaddock super.deepseq-magic;
698 feldspar-signal = dontHaddock super.feldspar-signal; # https://github.com/markus-git/feldspar-signal/issues/1
699 hoodle-core = dontHaddock super.hoodle-core;
700 hsc3-db = dontHaddock super.hsc3-db;
701
702 # Fix build with time >= 1.10 while retaining compat with time < 1.9
703 mbox = appendPatch ./patches/mbox-time-1.10.patch (
704 overrideCabal {
705 editedCabalFile = null;
706 revision = null;
707 } super.mbox
708 );
709
710 # https://github.com/techtangents/ablist/issues/1
711 ABList = dontCheck super.ABList;
712
713 inline-c-cpp = overrideCabal (drv: {
714 postPatch = (drv.postPatch or "") + ''
715 substituteInPlace inline-c-cpp.cabal --replace "-optc-std=c++11" ""
716 '';
717 }) super.inline-c-cpp;
718
719 inline-java = addBuildDepend pkgs.jdk super.inline-java;
720
721 # Too strict upper bound on unicode-transforms
722 # <https://gitlab.com/ngua/ipa-hs/-/issues/1>
723 ipa = doJailbreak super.ipa;
724
725 # Upstream notified by e-mail.
726 permutation = dontCheck super.permutation;
727
728 # https://github.com/jputcu/serialport/issues/25
729 serialport = dontCheck super.serialport;
730
731 # Test suite depends on source code being available
732 simple-affine-space = dontCheck super.simple-affine-space;
733
734 # Fails no apparent reason. Upstream has been notified by e-mail.
735 assertions = dontCheck super.assertions;
736
737 # These packages try to execute non-existent external programs.
738 cmaes = dontCheck super.cmaes; # http://hydra.cryp.to/build/498725/log/raw
739 dbmigrations = dontCheck super.dbmigrations;
740 filestore = dontCheck super.filestore;
741 graceful = dontCheck super.graceful;
742 ide-backend = dontCheck super.ide-backend;
743 marquise = dontCheck super.marquise; # https://github.com/anchor/marquise/issues/69
744 memcached-binary = dontCheck super.memcached-binary;
745 msgpack-rpc = dontCheck super.msgpack-rpc;
746 persistent-zookeeper = dontCheck super.persistent-zookeeper;
747 pocket-dns = dontCheck super.pocket-dns;
748 squeal-postgresql = dontCheck super.squeal-postgresql;
749 postgrest-ws = dontCheck super.postgrest-ws;
750 snowball = dontCheck super.snowball;
751 sophia = dontCheck super.sophia;
752 test-sandbox = dontCheck super.test-sandbox;
753 texrunner = dontCheck super.texrunner;
754 wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
755 xkbcommon = dontCheck super.xkbcommon;
756 xmlgen = dontCheck super.xmlgen;
757 HerbiePlugin = dontCheck super.HerbiePlugin;
758 wai-cors = dontCheck super.wai-cors;
759
760 # Apply patch fixing an incorrect QuickCheck property which occasionally causes false negatives
761 # https://github.com/Philonous/xml-picklers/issues/5
762 xml-picklers = appendPatch (pkgs.fetchpatch {
763 name = "xml-picklers-fix-prop-xp-attribute.patch";
764 url = "https://github.com/Philonous/xml-picklers/commit/887e5416b5e61c589cadf775d82013eb87751ea2.patch";
765 sha256 = "sha256-EAyTVkAqCvJ0lRD0+q/htzBJ8iD5qP47j5i2fKhRrlw=";
766 }) super.xml-picklers;
767
768 # 2024-05-18: Upstream tests against a different pandoc version
769 pandoc-crossref = dontCheck super.pandoc-crossref;
770
771 # 2022-01-29: Tests require package to be in ghc-db.
772 aeson-schemas = dontCheck super.aeson-schemas;
773
774 matterhorn = doJailbreak super.matterhorn;
775
776 # Too strict bounds on transformers and resourcet
777 # https://github.com/alphaHeavy/lzma-conduit/issues/23
778 lzma-conduit = doJailbreak super.lzma-conduit;
779
780 # doctest suite needs adjustment with GHC 9.12
781 xml-conduit = appendPatch (pkgs.fetchpatch {
782 name = "xml-conduit-ghc-9.12.patch";
783 url = "https://github.com/snoyberg/xml/commit/73ce67029c61decaa6525536377a15581325fd9e.patch";
784 sha256 = "1gvdhwz7f6rw28xqm82h1kx2kwbdvigipfcb0y66520lvd544sm6";
785 stripLen = 1;
786 }) super.xml-conduit;
787
788 # 2020-06-05: HACK: does not pass own build suite - `dontCheck`
789 # 2024-01-15: too strict bound on free < 5.2
790 hnix = doJailbreak (
791 dontCheck (
792 super.hnix.override {
793 # 2023-12-11: Needs older core due to remote
794 hnix-store-core = self.hnix-store-core_0_6_1_0;
795 }
796 )
797 );
798
799 # Too strict bounds on algebraic-graphs
800 # https://github.com/haskell-nix/hnix-store/issues/180
801 hnix-store-core_0_6_1_0 = doJailbreak super.hnix-store-core_0_6_1_0;
802
803 # 2023-12-11: Needs older core
804 hnix-store-remote = super.hnix-store-remote.override {
805 hnix-store-core = self.hnix-store-core_0_6_1_0;
806 };
807
808 # Fails for non-obvious reasons while attempting to use doctest.
809 focuslist = dontCheck super.focuslist;
810 search = dontCheck super.search;
811
812 # https://github.com/ekmett/structures/issues/3
813 structures = dontCheck super.structures;
814
815 # Disable test suites to fix the build.
816 acme-year = dontCheck super.acme-year; # http://hydra.cryp.to/build/497858/log/raw
817 aeson-lens = dontCheck super.aeson-lens; # http://hydra.cryp.to/build/496769/log/raw
818 aeson-schema = dontCheck super.aeson-schema; # https://github.com/timjb/aeson-schema/issues/9
819 angel = dontCheck super.angel;
820 apache-md5 = dontCheck super.apache-md5; # http://hydra.cryp.to/build/498709/nixlog/1/raw
821 app-settings = dontCheck super.app-settings; # http://hydra.cryp.to/build/497327/log/raw
822 aws-kinesis = dontCheck super.aws-kinesis; # needs aws credentials for testing
823 binary-protocol = dontCheck super.binary-protocol; # http://hydra.cryp.to/build/499749/log/raw
824 binary-search = dontCheck super.binary-search;
825 bloodhound = dontCheck super.bloodhound; # https://github.com/plow-technologies/quickcheck-arbitrary-template/issues/10
826 buildwrapper = dontCheck super.buildwrapper;
827 burst-detection = dontCheck super.burst-detection; # http://hydra.cryp.to/build/496948/log/raw
828 cabal-meta = dontCheck super.cabal-meta; # http://hydra.cryp.to/build/497892/log/raw
829 camfort = dontCheck super.camfort;
830 cjk = dontCheck super.cjk;
831 CLI = dontCheck super.CLI; # Upstream has no issue tracker.
832 command-qq = dontCheck super.command-qq; # http://hydra.cryp.to/build/499042/log/raw
833 conduit-connection = dontCheck super.conduit-connection;
834 craftwerk = dontCheck super.craftwerk;
835 crc = dontCheck super.crc; # https://github.com/MichaelXavier/crc/issues/2
836 damnpacket = dontCheck super.damnpacket; # http://hydra.cryp.to/build/496923/log
837 Deadpan-DDP = dontCheck super.Deadpan-DDP; # http://hydra.cryp.to/build/496418/log/raw
838 DigitalOcean = dontCheck super.DigitalOcean;
839 directory-layout = dontCheck super.directory-layout;
840 dom-selector = dontCheck super.dom-selector; # http://hydra.cryp.to/build/497670/log/raw
841 dotenv = dontCheck super.dotenv; # Tests fail because of missing test file on version 0.8.0.2 fixed on version 0.8.0.4
842 dotfs = dontCheck super.dotfs; # http://hydra.cryp.to/build/498599/log/raw
843 DRBG = dontCheck super.DRBG; # http://hydra.cryp.to/build/498245/nixlog/1/raw
844 ed25519 = dontCheck super.ed25519;
845 etcd = dontCheck super.etcd;
846 fb = dontCheck super.fb; # needs credentials for Facebook
847 fptest = dontCheck super.fptest; # http://hydra.cryp.to/build/499124/log/raw
848 friday-juicypixels = dontCheck super.friday-juicypixels; # tarball missing test/rgba8.png
849 ghc-events-parallel = dontCheck super.ghc-events-parallel; # http://hydra.cryp.to/build/496828/log/raw
850 ghc-imported-from = dontCheck super.ghc-imported-from;
851 ghc-parmake = dontCheck super.ghc-parmake;
852 git-vogue = dontCheck super.git-vogue;
853 github-rest = dontCheck super.github-rest; # test suite needs the network
854 gitlib-cmdline = dontCheck super.gitlib-cmdline;
855 GLFW-b = dontCheck super.GLFW-b; # https://github.com/bsl/GLFW-b/issues/50
856 hackport = dontCheck super.hackport;
857 hadoop-formats = dontCheck super.hadoop-formats;
858 hashed-storage = dontCheck super.hashed-storage;
859 hashring = dontCheck super.hashring;
860 haxl = dontCheck super.haxl; # non-deterministic failure https://github.com/facebook/Haxl/issues/85
861 haxl-facebook = dontCheck super.haxl-facebook; # needs facebook credentials for testing
862 hdbi-postgresql = dontCheck super.hdbi-postgresql;
863 hedis = dontCheck super.hedis;
864 hedis-pile = dontCheck super.hedis-pile;
865 hedis-tags = dontCheck super.hedis-tags;
866 hgdbmi = dontCheck super.hgdbmi;
867 hi = dontCheck super.hi;
868 hierarchical-clustering = dontCheck super.hierarchical-clustering;
869 hlibgit2 = disableHardening [ "format" ] super.hlibgit2;
870 hmatrix-tests = dontCheck super.hmatrix-tests;
871 hquery = dontCheck super.hquery;
872 hs2048 = dontCheck super.hs2048;
873 hsbencher = dontCheck super.hsbencher;
874 # 2025-02-11: Too strict bounds on bytestring
875 hsexif = doJailbreak (dontCheck super.hsexif);
876 hspec-server = dontCheck super.hspec-server;
877 HTF = overrideCabal (orig: {
878 # The scripts in scripts/ are needed to build the test suite.
879 preBuild = "patchShebangs --build scripts";
880 # test suite doesn't compile with aeson >= 2.0
881 # https://github.com/skogsbaer/HTF/issues/114
882 doCheck = false;
883 }) super.HTF;
884 htsn = dontCheck super.htsn;
885 htsn-import = dontCheck super.htsn-import;
886 http-link-header = dontCheck super.http-link-header; # non deterministic failure https://hydra.nixos.org/build/75041105
887 influxdb = dontCheck super.influxdb;
888 integer-roots = dontCheck super.integer-roots; # requires an old version of smallcheck, will be fixed in > 1.0
889 itanium-abi = dontCheck super.itanium-abi;
890 katt = dontCheck super.katt;
891 language-slice = dontCheck super.language-slice;
892
893 # Bogus lower bound on data-default-class added via Hackage revision
894 # https://github.com/mrkkrp/req/pull/180#issuecomment-2628201485
895 req = overrideCabal {
896 revision = null;
897 editedCabalFile = null;
898 } super.req;
899
900 # Group of libraries by same upstream maintainer for interacting with
901 # Telegram messenger. Bit-rotted a bit since 2020.
902 tdlib = appendPatch (fetchpatch {
903 # https://github.com/poscat0x04/tdlib/pull/3
904 url = "https://github.com/poscat0x04/tdlib/commit/8eb9ecbc98c65a715469fdb8b67793ab375eda31.patch";
905 hash = "sha256-vEI7fTsiafNGBBl4VUXVCClW6xKLi+iK53fjcubgkpc=";
906 }) (doJailbreak super.tdlib);
907 tdlib-types = doJailbreak super.tdlib-types;
908 tdlib-gen = doJailbreak super.tdlib-gen;
909 # https://github.com/poscat0x04/language-tl/pull/1
910 language-tl = doJailbreak super.language-tl;
911
912 ldap-client = dontCheck super.ldap-client;
913 lensref = dontCheck super.lensref;
914 lvmrun = disableHardening [ "format" ] (dontCheck super.lvmrun);
915 matplotlib = dontCheck super.matplotlib;
916 milena = dontCheck super.milena;
917 modular-arithmetic = dontCheck super.modular-arithmetic; # tests require a very old Glob (0.7.*)
918 nats-queue = dontCheck super.nats-queue;
919 network-dbus = dontCheck super.network-dbus;
920 notcpp = dontCheck super.notcpp;
921 ntp-control = dontCheck super.ntp-control;
922 odpic-raw = dontCheck super.odpic-raw; # needs a running oracle database server
923 opaleye = dontCheck super.opaleye;
924 openpgp = dontCheck super.openpgp;
925 optional = dontCheck super.optional;
926 orgmode-parse = dontCheck super.orgmode-parse;
927 os-release = dontCheck super.os-release;
928 parameterized = dontCheck super.parameterized; # https://github.com/louispan/parameterized/issues/2
929 persistent-redis = dontCheck super.persistent-redis;
930 pipes-extra = dontCheck super.pipes-extra;
931 posix-pty = dontCheck super.posix-pty; # https://github.com/merijn/posix-pty/issues/12
932 postgresql-binary = dontCheck super.postgresql-binary; # needs a running postgresql server
933 powerdns = dontCheck super.powerdns; # Tests require networking and external services
934 process-streaming = dontCheck super.process-streaming;
935 punycode = dontCheck super.punycode;
936 pwstore-cli = dontCheck super.pwstore-cli;
937 quantities = dontCheck super.quantities;
938 redis-io = dontCheck super.redis-io;
939 rethinkdb = dontCheck super.rethinkdb;
940 Rlang-QQ = dontCheck super.Rlang-QQ;
941 sai-shape-syb = dontCheck super.sai-shape-syb;
942 scp-streams = dontCheck super.scp-streams;
943 sdl2 = dontCheck super.sdl2; # the test suite needs an x server
944 separated = dontCheck super.separated;
945 shadowsocks = dontCheck super.shadowsocks;
946 shake-language-c = dontCheck super.shake-language-c;
947 sourcemap = dontCheck super.sourcemap;
948 static-resources = dontCheck super.static-resources;
949 svndump = dontCheck super.svndump;
950 tar = dontCheck super.tar; # https://hydra.nixos.org/build/25088435/nixlog/2 (fails only on 32-bit)
951 thumbnail-plus = dontCheck super.thumbnail-plus;
952 tickle = dontCheck super.tickle;
953 tpdb = dontCheck super.tpdb;
954 translatable-intset = dontCheck super.translatable-intset;
955 ua-parser = dontCheck super.ua-parser;
956 unagi-chan = dontCheck super.unagi-chan;
957 WebBits = dontCheck super.WebBits; # http://hydra.cryp.to/build/499604/log/raw
958 webdriver-angular = dontCheck super.webdriver-angular;
959 xsd = dontCheck super.xsd;
960
961 # Allow template-haskell 2.22
962 # https://github.com/well-typed/ixset-typed/pull/23
963 ixset-typed =
964 appendPatches
965 [
966 (fetchpatch {
967 name = "ixset-typed-template-haskell-2.21.patch";
968 url = "https://github.com/well-typed/ixset-typed/commit/085cccbaa845bff4255028ed5ff71402e98a953a.patch";
969 sha256 = "1cz30dmby3ff3zcnyz7d2xsqls7zxmzig7bgzy2gfa24s3sa32jg";
970 })
971 (fetchpatch {
972 name = "ixset-typed-template-haskell-2.22.patch";
973 url = "https://github.com/well-typed/ixset-typed/commit/0d699386eab5c4f6aa53e4de41defb460acbbd99.patch";
974 sha256 = "04lbfvaww05czhnld674c9hm952f94xpicf08hby8xpksfj7rs41";
975 })
976 ]
977 (
978 overrideCabal {
979 editedCabalFile = null;
980 revision = null;
981 } super.ixset-typed
982 );
983
984 # https://github.com/eli-frey/cmdtheline/issues/28
985 cmdtheline = dontCheck super.cmdtheline;
986
987 # https://github.com/bos/snappy/issues/1
988 # https://github.com/bos/snappy/pull/10
989 snappy = dontCheck super.snappy;
990
991 # https://github.com/vincenthz/hs-crypto-pubkey/issues/20
992 crypto-pubkey = dontCheck super.crypto-pubkey;
993
994 # https://github.com/joeyadams/haskell-stm-delay/issues/3
995 stm-delay = dontCheck super.stm-delay;
996
997 # Skip test that checks a race condition between stm and stm-queue
998 stm-queue = overrideCabal (drv: {
999 testFlags = drv.testFlags or [ ] ++ [
1000 "--skip"
1001 "/Data.Queue/behaves faster than TQueue in its worst case/"
1002 ];
1003 }) super.stm-queue;
1004
1005 # https://github.com/pixbi/duplo/issues/25
1006 duplo = doJailbreak super.duplo;
1007
1008 # https://github.com/evanrinehart/mikmod/issues/1
1009 mikmod = addExtraLibrary pkgs.libmikmod super.mikmod;
1010
1011 # Missing module.
1012 rematch = dontCheck super.rematch; # https://github.com/tcrayford/rematch/issues/5
1013 rematch-text = dontCheck super.rematch-text; # https://github.com/tcrayford/rematch/issues/6
1014
1015 # Package exists only to be example of documentation, yet it has restrictive
1016 # "base" dependency.
1017 haddock-cheatsheet = doJailbreak super.haddock-cheatsheet;
1018
1019 # no haddock since this is an umbrella package.
1020 cloud-haskell = dontHaddock super.cloud-haskell;
1021
1022 # This packages compiles 4+ hours on a fast machine. That's just unreasonable.
1023 CHXHtml = dontDistribute super.CHXHtml;
1024
1025 # https://github.com/NixOS/nixpkgs/issues/6350
1026 paypal-adaptive-hoops = overrideCabal (drv: {
1027 testTargets = [ "local" ];
1028 }) super.paypal-adaptive-hoops;
1029
1030 # Avoid "QuickCheck >=2.3 && <2.10" dependency we cannot fulfill in lts-11.x.
1031 test-framework = dontCheck super.test-framework;
1032
1033 # Depends on broken test-framework-quickcheck.
1034 apiary = dontCheck super.apiary;
1035 apiary-authenticate = dontCheck super.apiary-authenticate;
1036 apiary-clientsession = dontCheck super.apiary-clientsession;
1037 apiary-cookie = dontCheck super.apiary-cookie;
1038 apiary-eventsource = dontCheck super.apiary-eventsource;
1039 apiary-logger = dontCheck super.apiary-logger;
1040 apiary-memcached = dontCheck super.apiary-memcached;
1041 apiary-mongoDB = dontCheck super.apiary-mongoDB;
1042 apiary-persistent = dontCheck super.apiary-persistent;
1043 apiary-purescript = dontCheck super.apiary-purescript;
1044 apiary-session = dontCheck super.apiary-session;
1045 apiary-websockets = dontCheck super.apiary-websockets;
1046
1047 # https://github.com/junjihashimoto/test-sandbox-compose/issues/2
1048 test-sandbox-compose = dontCheck super.test-sandbox-compose;
1049
1050 # Test suite won't compile against tasty-hunit 0.10.x.
1051 binary-parsers = dontCheck super.binary-parsers;
1052
1053 # https://github.com/ndmitchell/shake/issues/804
1054 shake = dontCheck super.shake;
1055
1056 # https://github.com/nushio3/doctest-prop/issues/1
1057 doctest-prop = dontCheck super.doctest-prop;
1058
1059 # Missing file in source distribution:
1060 # - https://github.com/karun012/doctest-discover/issues/22
1061 # - https://github.com/karun012/doctest-discover/issues/23
1062 #
1063 # When these are fixed the following needs to be enabled again:
1064 #
1065 # # Depends on itself for testing
1066 # doctest-discover = addBuildTool super.doctest-discover
1067 # (if pkgs.stdenv.buildPlatform != pkgs.stdenv.hostPlatform
1068 # then self.buildHaskellPackages.doctest-discover
1069 # else dontCheck super.doctest-discover);
1070 doctest-discover = dontCheck super.doctest-discover;
1071
1072 # 2025-02-10: Too strict bounds on doctest < 0.22
1073 tasty-checklist = doJailbreak super.tasty-checklist;
1074
1075 # 2025-02-10: Too strict bounds on hedgehog < 1.5
1076 tasty-sugar = doJailbreak super.tasty-sugar;
1077
1078 # Known issue with nondeterministic test suite failure
1079 # https://github.com/nomeata/tasty-expected-failure/issues/21
1080 tasty-expected-failure = dontCheck super.tasty-expected-failure;
1081
1082 # https://github.com/yaccz/saturnin/issues/3
1083 Saturnin = dontCheck super.Saturnin;
1084
1085 # https://github.com/kkardzis/curlhs/issues/6
1086 curlhs = dontCheck super.curlhs;
1087
1088 # curl 7.87.0 introduces a preprocessor typechecker of sorts which fails on
1089 # incorrect usages of curl_easy_getopt and similar functions. Presumably
1090 # because the wrappers in curlc.c don't use static values for the different
1091 # arguments to curl_easy_getinfo, it complains and needs to be disabled.
1092 # https://github.com/GaloisInc/curl/issues/28
1093 curl = appendConfigureFlags [
1094 "--ghc-option=-DCURL_DISABLE_TYPECHECK"
1095 ] super.curl;
1096
1097 # https://github.com/alphaHeavy/lzma-enumerator/issues/3
1098 lzma-enumerator = dontCheck super.lzma-enumerator;
1099
1100 # FPCO's fork of Cabal won't succeed its test suite.
1101 Cabal-ide-backend = dontCheck super.Cabal-ide-backend;
1102
1103 # This package can't be built on non-Windows systems.
1104 Win32 = overrideCabal (drv: { broken = !pkgs.stdenv.hostPlatform.isCygwin; }) super.Win32;
1105 inline-c-win32 = dontDistribute super.inline-c-win32;
1106 Southpaw = dontDistribute super.Southpaw;
1107
1108 # https://ghc.haskell.org/trac/ghc/ticket/9825
1109 vimus = overrideCabal (drv: {
1110 broken = pkgs.stdenv.hostPlatform.isLinux && pkgs.stdenv.hostPlatform.isi686;
1111 }) super.vimus;
1112
1113 # https://github.com/kazu-yamamoto/logger/issues/42
1114 logger = dontCheck super.logger;
1115
1116 # Byte-compile elisp code for Emacs.
1117 ghc-mod = overrideCabal (drv: {
1118 preCheck = "export HOME=$TMPDIR";
1119 testToolDepends = drv.testToolDepends or [ ] ++ [ self.cabal-install ];
1120 doCheck = false; # https://github.com/kazu-yamamoto/ghc-mod/issues/335
1121 executableToolDepends = drv.executableToolDepends or [ ] ++ [ pkgs.buildPackages.emacs ];
1122 postInstall = ''
1123 local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/*/${drv.pname}-${drv.version}/elisp" )
1124 make -C $lispdir
1125 mkdir -p $data/share/emacs/site-lisp
1126 ln -s "$lispdir/"*.el{,c} $data/share/emacs/site-lisp/
1127 '';
1128 }) super.ghc-mod;
1129
1130 # 2022-03-19: Testsuite is failing: https://github.com/puffnfresh/haskell-jwt/issues/2
1131 jwt = dontCheck super.jwt;
1132
1133 # Build Selda with the latest git version.
1134 # See https://github.com/valderman/selda/issues/187
1135 inherit
1136 (
1137 let
1138 mkSeldaPackage =
1139 name:
1140 overrideCabal (drv: {
1141 version = "2024-05-05-unstable";
1142 src =
1143 pkgs.fetchFromGitHub {
1144 owner = "valderman";
1145 repo = "selda";
1146 rev = "50c3ba5c5da72bb758a4112363ba2fe1c0e968ea";
1147 hash = "sha256-LEAJsSsDL0mmVHntnI16fH8m5DmePfcU0hFw9ErqTgQ=";
1148 }
1149 + "/${name}";
1150 # 2025-04-09: jailbreak to allow bytestring >= 0.12, text >= 2.1
1151 # Note: jailbreak ignores constraints under an if(flag)
1152 postPatch = ''
1153 check_sed() {
1154 if ! test -s "$1"; then
1155 echo "sed: pattern '$2' doesn't match anything" >&2
1156 exit 1
1157 fi
1158 }
1159 sed -i ${name}.cabal \
1160 -e 's/\(bytestring\) .*/\1/w c1' \
1161 -e 's/\(text\) .*/\1/w c2' \
1162 -e 's/\(aeson\) .*/\1/w c3'
1163 check_sed c1 'bytestring .*'
1164 check_sed c2 'text .*'
1165 ${lib.optionalString (name == "selda-json") "check_sed c3 'aeson .*'"}
1166 '';
1167 }) super.${name};
1168 in
1169 lib.genAttrs [ "selda" "selda-sqlite" "selda-json" ] mkSeldaPackage
1170 )
1171 selda
1172 selda-sqlite
1173 selda-json
1174 ;
1175
1176 # 2024-03-10: Getting the test suite to run requires a correctly crafted GHC_ENVIRONMENT variable.
1177 graphql-client = dontCheck super.graphql-client;
1178
1179 # Build the latest git version instead of the official release. This isn't
1180 # ideal, but Chris doesn't seem to make official releases any more.
1181 structured-haskell-mode = overrideCabal (drv: {
1182 src = pkgs.fetchFromGitHub {
1183 owner = "projectional-haskell";
1184 repo = "structured-haskell-mode";
1185 rev = "7f9df73f45d107017c18ce4835bbc190dfe6782e";
1186 sha256 = "1jcc30048j369jgsbbmkb63whs4wb37bq21jrm3r6ry22izndsqa";
1187 };
1188 version = "20170205-git";
1189 editedCabalFile = null;
1190 # Make elisp files available at a location where people expect it. We
1191 # cannot easily byte-compile these files, unfortunately, because they
1192 # depend on a new version of haskell-mode that we don't have yet.
1193 postInstall = ''
1194 local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/"*"/${drv.pname}-"*"/elisp" )
1195 mkdir -p $data/share/emacs
1196 ln -s $lispdir $data/share/emacs/site-lisp
1197 '';
1198 }) super.structured-haskell-mode;
1199
1200 # Make elisp files available at a location where people expect it.
1201 hindent = (
1202 overrideCabal (drv: {
1203 # We cannot easily byte-compile these files, unfortunately, because they
1204 # depend on a new version of haskell-mode that we don't have yet.
1205 postInstall = ''
1206 local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/"*"/${drv.pname}-"*"/elisp" )
1207 mkdir -p $data/share/emacs
1208 ln -s $lispdir $data/share/emacs/site-lisp
1209 '';
1210 }) super.hindent
1211 );
1212
1213 # https://github.com/basvandijk/concurrent-extra/issues/12
1214 concurrent-extra = dontCheck super.concurrent-extra;
1215
1216 # https://github.com/pxqr/base32-bytestring/issues/4
1217 base32-bytestring = dontCheck super.base32-bytestring;
1218
1219 # Too strict bounds on bytestring (<0.12) on the test suite
1220 # https://github.com/emilypi/Base32/issues/24
1221 base32 = doJailbreak super.base32;
1222
1223 # Djinn's last release was 2014, incompatible with Semigroup-Monoid Proposal
1224 # https://github.com/augustss/djinn/pull/8
1225 djinn = overrideSrc {
1226 version = "unstable-2023-11-20";
1227 src = pkgs.fetchFromGitHub {
1228 owner = "augustss";
1229 repo = "djinn";
1230 rev = "69b3fbad9f42f0b1b2c49977976b8588c967d76e";
1231 hash = "sha256-ibxn6DXk4pqsOsWhi8KcrlH/THnuMWvIu5ENOn3H3So=";
1232 };
1233 } super.djinn;
1234
1235 # https://github.com/Philonous/hs-stun/pull/1
1236 # Remove if a version > 0.1.0.1 ever gets released.
1237 stunclient = overrideCabal (drv: {
1238 postPatch = (drv.postPatch or "") + ''
1239 substituteInPlace source/Network/Stun/MappedAddress.hs --replace "import Network.Endian" ""
1240 '';
1241 }) super.stunclient;
1242
1243 d-bus =
1244 let
1245 # The latest release on hackage is missing necessary patches for recent compilers
1246 # https://github.com/Philonous/d-bus/issues/24
1247 newer = overrideSrc {
1248 version = "unstable-2021-01-08";
1249 src = pkgs.fetchFromGitHub {
1250 owner = "Philonous";
1251 repo = "d-bus";
1252 rev = "fb8a948a3b9d51db618454328dbe18fb1f313c70";
1253 hash = "sha256-R7/+okb6t9DAkPVUV70QdYJW8vRcvBdz4zKJT13jb3A=";
1254 };
1255 } super.d-bus;
1256 # Add now required extension on recent compilers.
1257 # https://github.com/Philonous/d-bus/pull/23
1258 in
1259 appendPatch (fetchpatch {
1260 url = "https://github.com/Philonous/d-bus/commit/e5f37900a3a301c41d98bdaa134754894c705681.patch";
1261 sha256 = "6rQ7H9t483sJe1x95yLPAZ0BKTaRjgqQvvrQv7HkJRE=";
1262 }) newer;
1263
1264 # * The standard libraries are compiled separately.
1265 # * We need a few patches from master to fix compilation with
1266 # updated dependencies which can be
1267 # removed when the next idris release comes around.
1268 idris = lib.pipe super.idris [
1269 dontCheck
1270 doJailbreak
1271 (appendPatch (fetchpatch {
1272 name = "idris-bumps.patch";
1273 url = "https://github.com/idris-lang/Idris-dev/compare/c99bc9e4af4ea32d2172f873152b76122ee4ee14...cf78f0fb337d50f4f0dba235b6bbe67030f1ff47.patch";
1274 hash = "sha256-RCMIRHIAK1PCm4B7v+5gXNd2buHXIqyAxei4bU8+eCk=";
1275 }))
1276 (self.generateOptparseApplicativeCompletions [ "idris" ])
1277 ];
1278
1279 # https://hydra.nixos.org/build/42769611/nixlog/1/raw
1280 # note: the library is unmaintained, no upstream issue
1281 dataenc = doJailbreak super.dataenc;
1282
1283 # Test suite occasionally runs for 1+ days on Hydra.
1284 distributed-process-tests = dontCheck super.distributed-process-tests;
1285
1286 # https://github.com/mulby/diff-parse/issues/9
1287 diff-parse = doJailbreak super.diff-parse;
1288
1289 # No upstream issue tracker
1290 hspec-expectations-pretty-diff = dontCheck super.hspec-expectations-pretty-diff;
1291
1292 # The tests spuriously fail
1293 libmpd = dontCheck super.libmpd;
1294
1295 # https://github.com/xu-hao/namespace/issues/1
1296 namespace = doJailbreak super.namespace;
1297
1298 # https://github.com/danidiaz/streaming-eversion/issues/1
1299 streaming-eversion = dontCheck super.streaming-eversion;
1300
1301 # https://github.com/danidiaz/tailfile-hinotify/issues/2
1302 tailfile-hinotify = doJailbreak (dontCheck super.tailfile-hinotify);
1303
1304 # Test suite fails: https://github.com/lymar/hastache/issues/46.
1305 # Don't install internal mkReadme tool.
1306 hastache = overrideCabal (drv: {
1307 doCheck = false;
1308 postInstall = "rm $out/bin/mkReadme && rmdir $out/bin";
1309 }) super.hastache;
1310
1311 # 2025-02-10: Too strict bounds on text < 2.1
1312 digestive-functors-blaze = doJailbreak super.digestive-functors-blaze;
1313
1314 # Wrap the generated binaries to include their run-time dependencies in
1315 # $PATH. Also, cryptol needs a version of sbl that's newer than what we have
1316 # in LTS-13.x.
1317 cryptol = overrideCabal (drv: {
1318 buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
1319 postInstall = drv.postInstall or "" + ''
1320 for b in $out/bin/cryptol $out/bin/cryptol-html; do
1321 wrapProgram $b --prefix 'PATH' ':' "${lib.getBin pkgs.z3}/bin"
1322 done
1323 '';
1324 }) super.cryptol;
1325
1326 # Z3 removed aliases for boolean types in 4.12
1327 inherit
1328 (
1329 let
1330 fixZ3 = appendConfigureFlags [
1331 "--hsc2hs-option=-DZ3_Bool=bool"
1332 "--hsc2hs-option=-DZ3_TRUE=true"
1333 "--hsc2hs-option=-DZ3_FALSE=false"
1334 ];
1335 in
1336 {
1337 z3 = fixZ3 super.z3;
1338 hz3 = fixZ3 super.hz3;
1339 }
1340 )
1341 z3
1342 hz3
1343 ;
1344
1345 # test suite requires git and does a bunch of git operations
1346 restless-git = dontCheck super.restless-git;
1347
1348 # Work around https://github.com/haskell/c2hs/issues/192.
1349 c2hs = dontCheck super.c2hs;
1350
1351 # Needs pginit to function and pgrep to verify.
1352 tmp-postgres = overrideCabal (drv: {
1353 # Flaky tests: https://github.com/jfischoff/tmp-postgres/issues/274
1354 doCheck = false;
1355
1356 preCheck = ''
1357 export HOME="$TMPDIR"
1358 ''
1359 + (drv.preCheck or "");
1360 libraryToolDepends = drv.libraryToolDepends or [ ] ++ [ pkgs.buildPackages.postgresql ];
1361 testToolDepends = drv.testToolDepends or [ ] ++ [ pkgs.procps ];
1362 }) super.tmp-postgres;
1363
1364 # Needs QuickCheck <2.10, which we don't have.
1365 edit-distance = doJailbreak super.edit-distance;
1366
1367 # With ghc-8.2.x haddock would time out for unknown reason
1368 # See https://github.com/haskell/haddock/issues/679
1369 language-puppet = dontHaddock super.language-puppet;
1370
1371 # https://github.com/alphaHeavy/protobuf/issues/34
1372 protobuf = dontCheck super.protobuf;
1373
1374 # The test suite does not know how to find the 'alex' binary.
1375 alex = overrideCabal (drv: {
1376 testSystemDepends = (drv.testSystemDepends or [ ]) ++ [ pkgs.which ];
1377 preCheck = ''export PATH="$PWD/dist/build/alex:$PATH"'';
1378 }) super.alex;
1379
1380 # Compiles some C or C++ source which requires these headers
1381 VulkanMemoryAllocator = addExtraLibrary pkgs.vulkan-headers super.VulkanMemoryAllocator;
1382 vulkan-utils = addExtraLibrary pkgs.vulkan-headers super.vulkan-utils;
1383
1384 # Support for vulkan-headers 1.4.313.0
1385 # https://github.com/YoshikuniJujo/gpu-vulkan-middle/issues/10
1386 gpu-vulkan-middle = overrideCabal (drv: {
1387 version =
1388 let
1389 fixed = "0.1.0.76";
1390 in
1391 lib.warnIf (lib.versionAtLeast drv.version fixed)
1392 "haskellPackages.gpu-vulkan-middle: default version ${drv.version} >= ${fixed}, consider dropping override"
1393 fixed;
1394 sha256 = "sha256-VQAVo/84qPBFkQSmY3pT4WXOK9zrFMpK7WN9/UdED6E=";
1395 revision = null;
1396 editedCabalFile = null;
1397 }) super.gpu-vulkan-middle;
1398
1399 # Generate cli completions for dhall.
1400 dhall = self.generateOptparseApplicativeCompletions [ "dhall" ] super.dhall;
1401 # 2025-01-27: allow aeson >= 2.2, 9.8 versions of text and bytestring
1402 dhall-json = self.generateOptparseApplicativeCompletions [ "dhall-to-json" "dhall-to-yaml" ] (
1403 doJailbreak super.dhall-json
1404 );
1405 dhall-nix = self.generateOptparseApplicativeCompletions [ "dhall-to-nix" ] super.dhall-nix;
1406 # 2025-02-10: jailbreak due to aeson < 2.2, hnix < 0.17, transformers < 0.6, turtle < 1.6
1407 dhall-nixpkgs = self.generateOptparseApplicativeCompletions [ "dhall-to-nixpkgs" ] (
1408 doJailbreak super.dhall-nixpkgs
1409 );
1410 dhall-yaml = self.generateOptparseApplicativeCompletions [ "dhall-to-yaml-ng" "yaml-to-dhall" ] (
1411 doJailbreak super.dhall-yaml
1412 ); # bytestring <0.12, text<2.1
1413 # 2025-02-14: see also https://github.com/dhall-lang/dhall-haskell/issues/2638
1414 dhall-bash = doJailbreak super.dhall-bash; # bytestring <0.12, text <2.1
1415
1416 # musl fixes
1417 # dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test
1418 unix-time = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.unix-time else super.unix-time;
1419
1420 # Workaround for https://github.com/sol/hpack/issues/528
1421 # The hpack test suite can't deal with the CRLF line endings hackage revisions insert
1422 hpack = overrideCabal (drv: {
1423 postPatch = drv.postPatch or "" + ''
1424 "${lib.getBin pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
1425 '';
1426 }) super.hpack;
1427
1428 # hslua has tests that break when using musl.
1429 # https://github.com/hslua/hslua/issues/106
1430 hslua-core =
1431 if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.hslua-core else super.hslua-core;
1432
1433 # The test suite runs for 20+ minutes on a very fast machine, which feels kinda disproportionate.
1434 prettyprinter = dontCheck super.prettyprinter;
1435
1436 # Fix with Cabal 2.2, https://github.com/guillaume-nargeot/hpc-coveralls/pull/73
1437 hpc-coveralls = appendPatch (fetchpatch {
1438 url = "https://github.com/guillaume-nargeot/hpc-coveralls/pull/73/commits/344217f513b7adfb9037f73026f5d928be98d07f.patch";
1439 sha256 = "056rk58v9h114mjx62f41x971xn9p3nhsazcf9zrcyxh1ymrdm8j";
1440 }) super.hpc-coveralls;
1441
1442 # sexpr is old, broken and has no issue-tracker. Let's fix it the best we can.
1443 sexpr = appendPatch ./patches/sexpr-0.2.1.patch (
1444 overrideCabal (drv: {
1445 isExecutable = false;
1446 libraryHaskellDepends = drv.libraryHaskellDepends ++ [ self.QuickCheck ];
1447 }) super.sexpr
1448 );
1449
1450 # https://github.com/haskell/hoopl/issues/50
1451 hoopl = dontCheck super.hoopl;
1452
1453 # TODO(Profpatsch): factor out local nix store setup from
1454 # lib/tests/release.nix and use that for the tests of libnix
1455 # libnix = overrideCabal (old: {
1456 # testToolDepends = old.testToolDepends or [] ++ [ pkgs.nix ];
1457 # }) super.libnix;
1458 libnix = dontCheck super.libnix;
1459
1460 # dontCheck: The test suite tries to mess with ALSA, which doesn't work in the build sandbox.
1461 xmobar = dontCheck super.xmobar;
1462
1463 # 2025-02-10: Too strict bounds on aeson < 1.5
1464 json-alt = doJailbreak super.json-alt;
1465
1466 # https://github.com/mgajda/json-autotype/issues/25
1467 json-autotype = dontCheck super.json-autotype;
1468
1469 postgresql-simple-migration = overrideCabal (drv: {
1470 preCheck = ''
1471 PGUSER=test
1472 PGDATABASE=test
1473 '';
1474 testToolDepends = drv.testToolDepends or [ ] ++ [
1475 pkgs.postgresql
1476 pkgs.postgresqlTestHook
1477 ];
1478 }) (doJailbreak super.postgresql-simple-migration);
1479
1480 postgresql-simple = addTestToolDepends [
1481 pkgs.postgresql
1482 pkgs.postgresqlTestHook
1483 ] super.postgresql-simple;
1484
1485 beam-postgres = lib.pipe super.beam-postgres [
1486 # Requires pg_ctl command during tests
1487 (addTestToolDepends [ pkgs.postgresql ])
1488 (dontCheckIf (!pkgs.postgresql.doInstallCheck || !self.testcontainers.doCheck))
1489 ];
1490
1491 users-postgresql-simple = addTestToolDepends [
1492 pkgs.postgresql
1493 pkgs.postgresqlTestHook
1494 ] super.users-postgresql-simple;
1495
1496 gargoyle-postgresql-nix = addBuildTool [ pkgs.postgresql ] super.gargoyle-postgresql-nix;
1497
1498 # PortMidi needs an environment variable to have ALSA find its plugins:
1499 # https://github.com/NixOS/nixpkgs/issues/6860
1500 PortMidi = overrideCabal (drv: {
1501 patches = (drv.patches or [ ]) ++ [ ./patches/portmidi-alsa-plugins.patch ];
1502 postPatch = (drv.postPatch or "") + ''
1503 substituteInPlace portmidi/pm_linux/pmlinuxalsa.c \
1504 --replace @alsa_plugin_dir@ "${pkgs.alsa-plugins}/lib/alsa-lib"
1505 '';
1506 }) super.PortMidi;
1507
1508 scat = overrideCabal (drv: {
1509 patches = [
1510 # Fix build with base >= 4.11 (https://github.com/redelmann/scat/pull/6)
1511 (fetchpatch {
1512 url = "https://github.com/redelmann/scat/commit/429f22944b7634b8789cb3805292bcc2b23e3e9f.diff";
1513 hash = "sha256-FLr1KfBaSYzI6MiZIBY1CkgAb5sThvvgjrSAN8EV0h4=";
1514 })
1515 # Fix build with vector >= 0.13, mtl >= 2.3 (https://github.com/redelmann/scat/pull/8)
1516 (fetchpatch {
1517 url = "https://github.com/redelmann/scat/compare/e8e064f7e6a152fe25a6ccd743573a16974239d0..c6a3636548d628f32d8edc73a333188ce24141a7.patch";
1518 hash = "sha256-BU4MUn/TnZHpZBlX1vDHE7QZva5yhlLTb8zwpx7UScI";
1519 })
1520 ];
1521 }) super.scat;
1522
1523 # Fix build with attr-2.4.48 (see #53716)
1524 xattr = appendPatch ./patches/xattr-fix-build.patch super.xattr;
1525
1526 esqueleto =
1527 overrideCabal
1528 (drv: {
1529 postPatch = drv.postPatch or "" + ''
1530 # patch out TCP usage: https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook-tcp
1531 sed -i test/PostgreSQL/Test.hs \
1532 -e s^host=localhost^^
1533 '';
1534 # Match the test suite defaults (or hardcoded values?)
1535 preCheck = drv.preCheck or "" + ''
1536 PGUSER=esqutest
1537 PGDATABASE=esqutest
1538 '';
1539 testFlags = drv.testFlags or [ ] ++ [
1540 # We don't have a MySQL test hook yet
1541 "--skip=/Esqueleto/MySQL"
1542 ];
1543 testToolDepends = drv.testToolDepends or [ ] ++ [
1544 pkgs.postgresql
1545 pkgs.postgresqlTestHook
1546 ];
1547 })
1548 # https://github.com/NixOS/nixpkgs/issues/198495
1549 (dontCheckIf (pkgs.postgresqlTestHook.meta.broken) super.esqueleto);
1550
1551 # Requires API keys to run tests
1552 algolia = dontCheck super.algolia;
1553 openai-hs = dontCheck super.openai-hs;
1554
1555 # antiope-s3's latest stackage version has a hspec < 2.6 requirement, but
1556 # hspec which isn't in stackage is already past that
1557 antiope-s3 = doJailbreak super.antiope-s3;
1558
1559 # Has tasty < 1.2 requirement, but works just fine with 1.2
1560 temporary-resourcet = doJailbreak super.temporary-resourcet;
1561
1562 # Test suite doesn't work with current QuickCheck
1563 # https://github.com/pruvisto/heap/issues/11
1564 heap = dontCheck super.heap;
1565
1566 # Test suite won't link for no apparent reason.
1567 constraints-deriving = dontCheck super.constraints-deriving;
1568
1569 # https://github.com/erikd/hjsmin/issues/32
1570 hjsmin = dontCheck super.hjsmin;
1571
1572 # Remove for hail > 0.2.0.0
1573 hail = doJailbreak super.hail;
1574
1575 # https://github.com/kazu-yamamoto/dns/issues/150
1576 dns = dontCheck super.dns;
1577
1578 # https://github.com/haskell-servant/servant-ekg/issues/15
1579 servant-ekg = doJailbreak super.servant-ekg;
1580
1581 # Fixes bug in an Ord instance that was causing the test suite to fail
1582 # https://github.com/fpringle/servant-routes/issues/33
1583 servant-routes = appendPatches [
1584 (pkgs.fetchpatch {
1585 name = "servant-routes-fix-ord.patch";
1586 url = "https://github.com/fpringle/servant-routes/commit/d1ef071f11c6a0810637beb8ea0b08f8e524b48a.patch";
1587 sha256 = "1c2xpi7sz0621fj9r1010587d1l39j6mm8l4vqmz9pldccmcb0f2";
1588 })
1589 ] super.servant-routes;
1590
1591 # Fix test suite with text >= 2.1.2
1592 servant-client =
1593 appendPatches
1594 [
1595 (pkgs.fetchpatch {
1596 name = "servant-client-text-2.1.2.patch";
1597 url = "https://github.com/haskell-servant/servant/commit/9cda0cfb356a01ad402ee949e0b0d5c0494eace2.patch";
1598 sha256 = "19vpn7h108wra9b84r642zxg0mii66rq4vjbqhi7ackkdb0mx9yn";
1599 relative = "servant-client";
1600 # patch to servant-client.cabal doesn't apply on 0.20.2
1601 includes = [ "README.md" ];
1602 })
1603 ]
1604 (
1605 overrideCabal (drv: {
1606 postPatch = super.postPatch or "" + ''
1607 # Restore the symlink (to the file we patch) which becomes a regular file
1608 # in the hackage tarball
1609 ln -sf README.md README.lhs
1610 '';
1611 }) super.servant-client
1612 );
1613
1614 # it wants to build a statically linked binary by default
1615 hledger-flow = overrideCabal (drv: {
1616 postPatch = (drv.postPatch or "") + ''
1617 substituteInPlace hledger-flow.cabal --replace "-static" ""
1618 '';
1619 }) super.hledger-flow;
1620
1621 # Chart-tests needs and compiles some modules from Chart itself
1622 Chart-tests = overrideCabal (old: {
1623 # 2025-02-13: Too strict bounds on lens < 5.3 and vector < 0.13
1624 jailbreak = true;
1625 preCheck = old.preCheck or "" + ''
1626 tar --one-top-level=../chart --strip-components=1 -xf ${self.Chart.src}
1627 '';
1628 }) (addExtraLibrary self.QuickCheck super.Chart-tests);
1629
1630 # This breaks because of version bounds, but compiles and runs fine.
1631 # Last commit is 5 years ago, so we likely won't get upstream fixed soon.
1632 # https://bitbucket.org/rvlm/hakyll-contrib-hyphenation/src/master/
1633 # Therefore we jailbreak it.
1634 hakyll-contrib-hyphenation = doJailbreak super.hakyll-contrib-hyphenation;
1635
1636 # The test suite depends on an impure cabal-install installation in
1637 # $HOME, which we don't have in our build sandbox.
1638 cabal-install-parsers = dontCheck super.cabal-install-parsers;
1639
1640 # Test suite requires database
1641 persistent-mysql = dontCheck super.persistent-mysql;
1642 persistent-postgresql =
1643 # TODO: move this override to configuration-nix.nix
1644 overrideCabal
1645 (drv: {
1646 postPatch = drv.postPath or "" + ''
1647 # patch out TCP usage: https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook-tcp
1648 # NOTE: upstream host variable takes only two values...
1649 sed -i test/PgInit.hs \
1650 -e s^'host=" <> host <> "'^^
1651 '';
1652 preCheck = drv.preCheck or "" + ''
1653 PGDATABASE=test
1654 PGUSER=test
1655 '';
1656 testToolDepends = drv.testToolDepends or [ ] ++ [
1657 pkgs.postgresql
1658 pkgs.postgresqlTestHook
1659 ];
1660 })
1661 # https://github.com/NixOS/nixpkgs/issues/198495
1662 (dontCheckIf (pkgs.postgresqlTestHook.meta.broken) super.persistent-postgresql);
1663
1664 # Downgrade persistent-test to a version that's compatible with
1665 # persistent < 2.16 (which Stackage prescribed). Unfortunately, the
1666 # bad version of persistent-test slipped into Stackage LTS because
1667 # PVP allows it and LTS doesn't continuously run test suites (contrary
1668 # to nightly).
1669 # See also https://github.com/yesodweb/persistent/pull/1584#issuecomment-2939756529
1670 # https://github.com/commercialhaskell/stackage/issues/7768
1671 persistent-test_2_13_1_4 = dontDistribute super.persistent-test;
1672 persistent-test = doDistribute self.persistent-test_2_13_1_3;
1673
1674 # Needs matching lsp-types
1675 # Allow lens >= 5.3
1676 lsp_2_4_0_0 = doDistribute (
1677 doJailbreak (
1678 super.lsp_2_4_0_0.override {
1679 lsp-types = self.lsp-types_2_1_1_0;
1680 }
1681 )
1682 );
1683
1684 # Needs matching lsp-types;
1685 # Lift bound on sorted-list <0.2.2
1686 lsp_2_1_0_0 = doDistribute (
1687 doJailbreak (
1688 super.lsp_2_1_0_0.override {
1689 lsp-types = self.lsp-types_2_1_1_0;
1690 }
1691 )
1692 );
1693 # Lift bound on lens <5.3
1694 lsp-types_2_1_1_0 = doDistribute (doJailbreak super.lsp-types_2_1_1_0);
1695
1696 # 2025-03-03: dhall-lsp-server-1.1.4 requires lsp-2.1.0.0
1697 dhall-lsp-server = super.dhall-lsp-server.override {
1698 lsp = self.lsp_2_1_0_0;
1699 };
1700
1701 # Tests disabled and broken override needed because of missing lib chrome-test-utils: https://github.com/reflex-frp/reflex-dom/issues/392
1702 reflex-dom-core = lib.pipe super.reflex-dom-core [
1703 doDistribute
1704 dontCheck
1705 unmarkBroken
1706 ];
1707
1708 # https://github.com/ghcjs/jsaddle/issues/151
1709 jsaddle-webkit2gtk =
1710 overrideCabal
1711 (drv: {
1712 postPatch = drv.postPatch or "" + ''
1713 substituteInPlace jsaddle-webkit2gtk.cabal --replace-fail gi-gtk gi-gtk3
1714 substituteInPlace jsaddle-webkit2gtk.cabal --replace-fail gi-javascriptcore gi-javascriptcore4
1715 '';
1716 })
1717 (
1718 super.jsaddle-webkit2gtk.override {
1719 gi-gtk = self.gi-gtk3;
1720 gi-javascriptcore = self.gi-javascriptcore4;
1721 }
1722 );
1723
1724 # 2020-06-24: Jailbreaking because of restrictive test dep bounds
1725 # Upstream issue: https://github.com/kowainik/trial/issues/62
1726 trial = doJailbreak super.trial;
1727
1728 # 2024-03-19: Fix for mtl >= 2.3
1729 pattern-arrows = lib.pipe super.pattern-arrows [
1730 doJailbreak
1731 (appendPatches [ ./patches/pattern-arrows-add-fix-import.patch ])
1732 ];
1733
1734 # 2024-03-19: Fix for mtl >= 2.3
1735 cheapskate = lib.pipe super.cheapskate [
1736 doJailbreak
1737 (appendPatches [ ./patches/cheapskate-mtl-2-3-support.patch ])
1738 ];
1739
1740 # 2020-06-24: Tests are broken in hackage distribution.
1741 # See: https://github.com/robstewart57/rdf4h/issues/39
1742 rdf4h = dontCheck super.rdf4h;
1743
1744 # Fixed upstream but not released to Hackage yet:
1745 # https://github.com/k0001/hs-libsodium/issues/2
1746 libsodium = overrideCabal (drv: {
1747 libraryToolDepends = (drv.libraryToolDepends or [ ]) ++ [ self.buildHaskellPackages.c2hs ];
1748 }) super.libsodium;
1749
1750 svgcairo = overrideCabal (drv: {
1751 patches = drv.patches or [ ] ++ [
1752 # Remove when https://github.com/gtk2hs/svgcairo/pull/12 goes in.
1753 (fetchpatch {
1754 url = "https://github.com/gtk2hs/svgcairo/commit/348c60b99c284557a522baaf47db69322a0a8b67.patch";
1755 sha256 = "0akhq6klmykvqd5wsbdfnnl309f80ds19zgq06sh1mmggi54dnf3";
1756 })
1757 # Remove when https://github.com/gtk2hs/svgcairo/pull/13 goes in.
1758 (fetchpatch {
1759 url = "https://github.com/dalpd/svgcairo/commit/d1e0d7ae04c1edca83d5b782e464524cdda6ae85.patch";
1760 sha256 = "1pq9ld9z67zsxj8vqjf82qwckcp69lvvnrjb7wsyb5jc6jaj3q0a";
1761 })
1762 ];
1763 editedCabalFile = null;
1764 revision = null;
1765 }) super.svgcairo;
1766
1767 # Too strict upper bound on tasty-hedgehog (<1.5)
1768 # https://github.com/typeclasses/ascii-predicates/pull/1
1769 ascii-predicates = doJailbreak super.ascii-predicates;
1770 ascii-numbers = doJailbreak super.ascii-numbers;
1771
1772 # Upstream PR: https://github.com/jkff/splot/pull/9
1773 splot = appendPatch (fetchpatch {
1774 url = "https://github.com/jkff/splot/commit/a6710b05470d25cb5373481cf1cfc1febd686407.patch";
1775 sha256 = "1c5ck2ibag2gcyag6rjivmlwdlp5k0dmr8nhk7wlkzq2vh7zgw63";
1776 }) super.splot;
1777
1778 # Support ansi-terminal 1.1: https://github.com/facebookincubator/retrie/pull/73
1779 retrie = appendPatch (fetchpatch {
1780 url = "https://github.com/facebookincubator/retrie/commit/b0df07178133b5b049e3e7764acba0e5e3fa57af.patch";
1781 sha256 = "sha256-Ea/u6PctSxy4h8VySjOwD2xW3TbwY1qE49dG9Av1SbQ=";
1782 }) super.retrie;
1783
1784 # Fails with encoding problems, likely needs locale data.
1785 # Test can be executed by adding which to testToolDepends and
1786 # $PWD/dist/build/haskeline-examples-Test to $PATH.
1787 haskeline_0_8_3_0 = doDistribute (dontCheck super.haskeline_0_8_3_0);
1788
1789 # Test suite fails to compile https://github.com/agrafix/Spock/issues/177
1790 Spock = dontCheck super.Spock;
1791
1792 Spock-core = appendPatches [
1793 (fetchpatch {
1794 url = "https://github.com/agrafix/Spock/commit/d0b51fa60a83bfa5c1b5fc8fced18001e7321701.patch";
1795 sha256 = "sha256-l9voiczOOdYVBP/BNEUvqARb21t0Rp2kpsNbRFUWSLg=";
1796 stripLen = 1;
1797 })
1798 ] (doJailbreak super.Spock-core);
1799
1800 hcoord = overrideCabal (drv: {
1801 # Remove when https://github.com/danfran/hcoord/pull/8 is merged.
1802 patches = [
1803 (fetchpatch {
1804 url = "https://github.com/danfran/hcoord/pull/8/commits/762738b9e4284139f5c21f553667a9975bad688e.patch";
1805 sha256 = "03r4jg9a6xh7w3jz3g4bs7ff35wa4rrmjgcggq51y0jc1sjqvhyz";
1806 })
1807 ];
1808 # Remove when https://github.com/danfran/hcoord/issues/9 is closed.
1809 doCheck = false;
1810 }) super.hcoord;
1811
1812 # Break infinite recursion via tasty
1813 temporary = dontCheck super.temporary;
1814
1815 # Break infinite recursion via doctest-lib
1816 utility-ht = dontCheck super.utility-ht;
1817
1818 # Break infinite recursion via optparse-applicative (alternatively, dontCheck syb)
1819 prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal;
1820
1821 # Tests rely on `Int` being 64-bit: https://github.com/hspec/hspec/issues/431.
1822 # Also, we need QuickCheck-2.14.x to build the test suite, which isn't easy in LTS-16.x.
1823 # So let's not go there and just disable the tests altogether.
1824 hspec-core = dontCheck super.hspec-core;
1825
1826 update-nix-fetchgit =
1827 let
1828 # Deps are required during the build for testing and also during execution,
1829 # so add them to build input and also wrap the resulting binary so they're in
1830 # PATH.
1831 deps = [
1832 pkgs.git
1833 pkgs.nix
1834 pkgs.nix-prefetch-git
1835 ];
1836 in
1837 lib.pipe super.update-nix-fetchgit [
1838 # 2023-06-26: Test failure: https://hydra.nixos.org/build/225081865
1839 dontCheck
1840 (self.generateOptparseApplicativeCompletions [ "update-nix-fetchgit" ])
1841 (overrideCabal (drv: {
1842 buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
1843 postInstall = drv.postInstall or "" + ''
1844 wrapProgram "$out/bin/update-nix-fetchgit" --prefix 'PATH' ':' "${lib.makeBinPath deps}"
1845 '';
1846 }))
1847 (addTestToolDepends deps)
1848 # Patch for hnix compat.
1849 (appendPatches [
1850 (fetchpatch {
1851 url = "https://github.com/expipiplus1/update-nix-fetchgit/commit/dfa34f9823e282aa8c5a1b8bc95ad8def0e8d455.patch";
1852 sha256 = "sha256-yBjn1gVihVTlLewKgJc2I9gEj8ViNBAmw0bcsb5rh1A=";
1853 excludes = [ "cabal.project" ];
1854 })
1855 # Fix for GHC >= 9.8
1856 (fetchpatch {
1857 name = "update-nix-fetchgit-base-4.19.patch";
1858 url = "https://github.com/expipiplus1/update-nix-fetchgit/commit/384d2e259738abf94f5a20717b12648996cf24e2.patch";
1859 sha256 = "11489rpxrrz98f7d3j9mz6npgfg0zp005pghxv9c86rkyg5b10d5";
1860 })
1861 ])
1862 ];
1863
1864 # Raise version bounds: https://github.com/idontgetoutmuch/binary-low-level/pull/16
1865 binary-strict = appendPatches [
1866 (fetchpatch {
1867 url = "https://github.com/idontgetoutmuch/binary-low-level/pull/16/commits/c16d06a1f274559be0dea0b1f7497753e1b1a8ae.patch";
1868 sha256 = "sha256-deSbudy+2je1SWapirWZ1IVWtJ0sJVR5O/fnaAaib2g=";
1869 })
1870 ] super.binary-strict;
1871
1872 # The tests for semver-range need to be updated for the MonadFail change in
1873 # ghc-8.8:
1874 # https://github.com/adnelson/semver-range/issues/15
1875 semver-range = dontCheck super.semver-range;
1876
1877 # 2024-03-02: vty <5.39 - https://github.com/reflex-frp/reflex-ghci/pull/33
1878 reflex-ghci = warnAfterVersion "0.2.0.1" (doJailbreak super.reflex-ghci);
1879
1880 # 2024-09-18: transformers <0.5 https://github.com/reflex-frp/reflex-gloss/issues/6
1881 reflex-gloss = warnAfterVersion "0.2" (doJailbreak super.reflex-gloss);
1882
1883 # 2024-09-18: primitive <0.8 https://gitlab.com/Kritzefitz/reflex-gi-gtk/-/merge_requests/20
1884 reflex-gi-gtk = warnAfterVersion "0.2.0.1" (doJailbreak super.reflex-gi-gtk);
1885
1886 # Due to tests restricting base in 0.8.0.0 release
1887 http-media = doJailbreak super.http-media;
1888
1889 # 2022-03-19: strict upper bounds https://github.com/poscat0x04/hinit/issues/2
1890 hinit = doJailbreak (self.generateOptparseApplicativeCompletions [ "hi" ] super.hinit);
1891
1892 # 2020-11-23: https://github.com/Rufflewind/blas-hs/issues/8
1893 blas-hs = dontCheck super.blas-hs;
1894
1895 # Strange doctest problems
1896 # https://github.com/biocad/servant-openapi3/issues/30
1897 servant-openapi3 = dontCheck super.servant-openapi3;
1898
1899 # Point hspec 2.7.10 to correct dependencies
1900 hspec_2_7_10 = super.hspec_2_7_10.override {
1901 hspec-discover = self.hspec-discover_2_7_10;
1902 hspec-core = self.hspec-core_2_7_10;
1903 };
1904 hspec-discover_2_7_10 = super.hspec-discover_2_7_10.override {
1905 hspec-meta = self.hspec-meta_2_7_8;
1906 };
1907 hspec-core_2_7_10 = doJailbreak (dontCheck super.hspec-core_2_7_10);
1908
1909 # Disable test cases that were broken by insignificant changes in icu 76
1910 # https://github.com/haskell/text-icu/issues/108
1911 text-icu = overrideCabal (drv: {
1912 testFlags = drv.testFlags or [ ] ++ [
1913 "-t"
1914 "!Test cases"
1915 ];
1916 }) super.text-icu;
1917
1918 hercules-ci-agent = self.generateOptparseApplicativeCompletions [
1919 "hercules-ci-agent"
1920 ] super.hercules-ci-agent;
1921
1922 hercules-ci-cli = lib.pipe super.hercules-ci-cli [
1923 unmarkBroken
1924 (overrideCabal (drv: {
1925 hydraPlatforms = super.hercules-ci-cli.meta.platforms;
1926 }))
1927 # See hercules-ci-optparse-applicative in non-hackage-packages.nix.
1928 (addBuildDepend super.hercules-ci-optparse-applicative)
1929 (self.generateOptparseApplicativeCompletions [ "hci" ])
1930 ];
1931
1932 # https://github.com/k0001/pipes-aeson/pull/21
1933 pipes-aeson = appendPatch (fetchpatch {
1934 url = "https://github.com/k0001/pipes-aeson/commit/08c25865ef557b41d7e4a783f52e655d2a193e18.patch";
1935 relative = "pipes-aeson";
1936 sha256 = "sha256-kFV6CcwKdMq+qSgyc+eIApnaycq5A++pEEVr2A9xvts=";
1937 }) super.pipes-aeson;
1938
1939 moto-postgresql = appendPatches [
1940 # https://gitlab.com/k0001/moto/-/merge_requests/3
1941 (fetchpatch {
1942 name = "moto-postgresql-monadfail.patch";
1943 url = "https://gitlab.com/k0001/moto/-/commit/09cc1c11d703c25f6e81325be6482dc7ec6cbf58.patch";
1944 relative = "moto-postgresql";
1945 sha256 = "sha256-f2JVX9VveShCeV+T41RQgacpUoh1izfyHlE6VlErkZM=";
1946 })
1947 ] super.moto-postgresql;
1948
1949 moto = appendPatches [
1950 # https://gitlab.com/k0001/moto/-/merge_requests/3
1951 (fetchpatch {
1952 name = "moto-ghc-9.0.patch";
1953 url = "https://gitlab.com/k0001/moto/-/commit/5b6f015a1271765005f03762f1f1aaed3a3198ed.patch";
1954 relative = "moto";
1955 sha256 = "sha256-RMa9tk+2ip3Ks73UFv9Ea9GEnElRtzIjdpld1Fx+dno=";
1956 })
1957 ] super.moto;
1958
1959 # Readline uses Distribution.Simple from Cabal 2, in a way that is not
1960 # compatible with Cabal 3. No upstream repository found so far
1961 readline = appendPatch ./patches/readline-fix-for-cabal-3.patch super.readline;
1962
1963 # DerivingVia is not allowed in safe Haskell
1964 # https://github.com/strake/util.hs/issues/1
1965 util = appendConfigureFlags [
1966 "--ghc-option=-fno-safe-haskell"
1967 "--haddock-option=--optghc=-fno-safe-haskell"
1968 ] super.util;
1969 category = appendConfigureFlags [
1970 "--ghc-option=-fno-safe-haskell"
1971 "--haddock-option=--optghc=-fno-safe-haskell"
1972 ] super.category;
1973 alg = appendConfigureFlags [
1974 "--ghc-option=-fno-safe-haskell"
1975 "--haddock-option=--optghc=-fno-safe-haskell"
1976 ] super.alg;
1977
1978 # 2025-02-11: Too strict bounds on hedgehog < 1.5
1979 nothunks = doJailbreak super.nothunks;
1980
1981 # Test suite fails, upstream not reachable for simple fix (not responsive on github)
1982 vivid-supercollider = dontCheck super.vivid-supercollider;
1983
1984 # Test suite does not compile.
1985 feed = dontCheck super.feed;
1986
1987 spacecookie = overrideCabal (old: {
1988 buildTools = (old.buildTools or [ ]) ++ [ pkgs.buildPackages.installShellFiles ];
1989 # let testsuite discover the resulting binary
1990 preCheck = ''
1991 export SPACECOOKIE_TEST_BIN=./dist/build/spacecookie/spacecookie
1992 ''
1993 + (old.preCheck or "");
1994 # install man pages shipped in the sdist
1995 postInstall = ''
1996 installManPage docs/man/*
1997 ''
1998 + (old.postInstall or "");
1999 }) super.spacecookie;
2000
2001 # Patch and jailbreak can be removed at next release, chatter > 0.9.1.0
2002 # * Remove dependency on regex-tdfa-text
2003 # * Jailbreak as bounds on cereal are too strict
2004 # * Disable test suite which doesn't compile
2005 # https://github.com/creswick/chatter/issues/38
2006 chatter = appendPatch (fetchpatch {
2007 url = "https://github.com/creswick/chatter/commit/e8c15a848130d7d27b8eb5e73e8a0db1366b2e62.patch";
2008 sha256 = "1dzak8d12h54vss5fxnrclygz0fz9ygbqvxd5aifz5n3vrwwpj3g";
2009 }) (dontCheck (doJailbreak (super.chatter.override { regex-tdfa-text = null; })));
2010
2011 # test suite doesn't compile anymore due to changed hunit/tasty APIs
2012 fullstop = dontCheck super.fullstop;
2013
2014 # * doctests don't work without cabal
2015 # https://github.com/noinia/hgeometry/issues/132
2016 # * Too strict version bound on vector-builder
2017 # https://github.com/noinia/hgeometry/commit/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a#commitcomment-49282301
2018 hgeometry-combinatorial = dontCheck (doJailbreak super.hgeometry-combinatorial);
2019
2020 # Too strict bounds on containers
2021 # https://github.com/jswebtools/language-ecmascript-analysis/issues/1
2022 language-ecmascript-analysis = doJailbreak super.language-ecmascript-analysis;
2023
2024 cli-git = addBuildTool pkgs.git super.cli-git;
2025
2026 cli-nix = addBuildTools [
2027 pkgs.nix
2028 pkgs.nix-prefetch-git
2029 ] super.cli-nix;
2030
2031 # list `modbus` in librarySystemDepends, correct to `libmodbus`
2032 libmodbus = doJailbreak (addExtraLibrary pkgs.libmodbus super.libmodbus);
2033
2034 # Too strict version bounds on ghc-events
2035 # https://github.com/mpickering/hs-speedscope/issues/16
2036 hs-speedscope = doJailbreak super.hs-speedscope;
2037
2038 # Missing test files in sdist tarball:
2039 # https://gitlab.com/dpwiz/geomancy-layout/-/issues/1
2040 geomancy-layout = dontCheck super.geomancy-layout;
2041
2042 # 2025-02-11: Too strict bounds on base < 4.19, bytestring < 0.12, tasty < 1.5, tasty-quickcheck < 0.11
2043 blake2 = doJailbreak super.blake2;
2044
2045 # Test suite doesn't support base16-bytestring >= 1.0
2046 # https://github.com/serokell/haskell-crypto/issues/25
2047 crypto-sodium = dontCheck super.crypto-sodium;
2048
2049 # Polyfill for GHCs from the integer-simple days that don't bundle ghc-bignum
2050 ghc-bignum = super.ghc-bignum or self.mkDerivation {
2051 pname = "ghc-bignum";
2052 version = "1.0";
2053 sha256 = "0xl848q8z6qx2bi6xil0d35lra7wshwvysyfblki659d7272b1im";
2054 description = "GHC BigNum library";
2055 license = lib.licenses.bsd3;
2056 # ghc-bignum is not buildable if none of the three backends
2057 # is explicitly enabled. We enable Native for now as it doesn't
2058 # depend on anything else as opposed to GMP and FFI.
2059 # Apply patch which fixes a compilation failure we encountered.
2060 # Will need to be kept until we can drop ghc-bignum entirely,
2061 # i. e. if GHC 8.10.* and 8.8.* have been removed.
2062 configureFlags = [
2063 "-f"
2064 "Native"
2065 ];
2066 patches = [
2067 (fetchpatch {
2068 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/08d1588bf38d83140a86817a7a615db486357d4f.patch";
2069 sha256 = "sha256-Y9WW0KDQ/qY2L9ObPvh1i/6lxXIlprbxzdSBDfiaMtE=";
2070 relative = "libraries/ghc-bignum";
2071 })
2072 ];
2073 };
2074
2075 # 2021-04-09: too strict time bound
2076 # PR pending https://github.com/zohl/cereal-time/pull/2
2077 cereal-time = doJailbreak super.cereal-time;
2078
2079 # 2021-04-16: too strict bounds on QuickCheck and tasty
2080 # https://github.com/hasufell/lzma-static/issues/1
2081 lzma-static = doJailbreak super.lzma-static;
2082
2083 # Too strict version bounds on base:
2084 # https://github.com/obsidiansystems/database-id/issues/1
2085 database-id-class = doJailbreak super.database-id-class;
2086
2087 cabal2nix-unstable = overrideCabal {
2088 passthru = {
2089 updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-unstable.sh;
2090
2091 # This is used by regenerate-hackage-packages.nix to supply the configuration
2092 # values we can easily generate automatically without checking them in.
2093 compilerConfig =
2094 pkgs.runCommand "hackage2nix-${self.ghc.haskellCompilerName}-config.yaml"
2095 {
2096 nativeBuildInputs = [
2097 self.ghc
2098 ];
2099 }
2100 ''
2101 cat > "$out" << EOF
2102 # generated by haskellPackages.cabal2nix-unstable.compilerConfig
2103 compiler: ${self.ghc.haskellCompilerName}
2104
2105 core-packages:
2106 EOF
2107
2108 ghc-pkg list \
2109 | tail -n '+2' \
2110 | sed -e 's/[()]//g' -e 's/\s\+/ - /' \
2111 >> "$out"
2112 '';
2113 };
2114 } super.cabal2nix-unstable;
2115
2116 # Too strict version bounds on base
2117 # https://github.com/gibiansky/IHaskell/issues/1217
2118 ihaskell-display = doJailbreak super.ihaskell-display;
2119 ihaskell-basic = doJailbreak super.ihaskell-basic;
2120
2121 # Tests need to lookup target triple x86_64-unknown-linux
2122 # https://github.com/llvm-hs/llvm-hs/issues/334
2123 llvm-hs = dontCheckIf (pkgs.stdenv.targetPlatform.system != "x86_64-linux") super.llvm-hs;
2124
2125 # Fix build with bytestring >= 0.11 (GHC 9.2)
2126 # https://github.com/llvm-hs/llvm-hs/pull/389
2127 llvm-hs-pure =
2128 appendPatches
2129 [
2130 (fetchpatch {
2131 name = "llvm-hs-pure-bytestring-0.11.patch";
2132 url = "https://github.com/llvm-hs/llvm-hs/commit/fe8fd556e8d2cc028f61d4d7b4b6bf18c456d090.patch";
2133 sha256 = "sha256-1d4wQg6JEJL3GwmXQpvbW7VOY5DwjUPmIsLEEur0Kps=";
2134 relative = "llvm-hs-pure";
2135 excludes = [ "**/Triple.hs" ]; # doesn't exist in 9.0.0
2136 })
2137 ]
2138 (
2139 overrideCabal {
2140 # Hackage Revision prevents patch from applying. Revision 1 does not allow
2141 # bytestring-0.11.4 which is bundled with 9.2.6.
2142 editedCabalFile = null;
2143 revision = null;
2144 } super.llvm-hs-pure
2145 );
2146
2147 # 2025-02-11: Too strict bounds on tasty-quickcheck < 0.11
2148 exact-pi = doJailbreak super.exact-pi;
2149
2150 # Too strict bounds on dimensional
2151 # https://github.com/enomsg/science-constants-dimensional/pull/1
2152 science-constants-dimensional = doJailbreak super.science-constants-dimensional;
2153
2154 # Tests are flaky on busy machines, upstream doesn't intend to fix
2155 # https://github.com/merijn/paramtree/issues/4
2156 paramtree = dontCheck super.paramtree;
2157
2158 # Flaky test suites
2159 ticker = dontCheck super.ticker;
2160 powerqueue-distributed = dontCheck super.powerqueue-distributed;
2161 job = dontCheck super.job;
2162 scheduler = dontCheck super.scheduler;
2163
2164 # 2024-09-18: Make compatible with haskell-gi 0.26.10
2165 # https://github.com/owickstrom/gi-gtk-declarative/pull/118
2166 gi-gtk-declarative = warnAfterVersion "0.7.1" (
2167 overrideCabal (drv: {
2168 jailbreak = true;
2169 postPatch = ''
2170 sed -i '1 i {-# LANGUAGE FlexibleContexts #-}' \
2171 src/GI/Gtk/Declarative/Widget/Conversions.hs
2172 '';
2173 }) super.gi-gtk-declarative
2174 );
2175 gi-gtk-declarative-app-simple = doJailbreak super.gi-gtk-declarative-app-simple;
2176
2177 # FIXME: These should be removed as gi-gtk4/gi-gdk4 become the standard
2178 gi-gtk_4 = self.gi-gtk_4_0_12;
2179 gi-gdk_4 = self.gi-gdk_4_0_10;
2180
2181 # 2023-04-09: haskell-ci needs Cabal-syntax 3.10
2182 # 2024-03-21: pins specific version of ShellCheck
2183 # 2025-03-10: jailbreak, https://github.com/haskell-CI/haskell-ci/issues/771
2184 haskell-ci = doJailbreak (
2185 super.haskell-ci.overrideScope (
2186 self: super: {
2187 Cabal-syntax = self.Cabal-syntax_3_10_3_0;
2188 ShellCheck = self.ShellCheck_0_9_0;
2189 }
2190 )
2191 );
2192
2193 stack = super.stack.overrideScope (
2194 self: super: {
2195 # stack needs to be built with the same hpack version that the upstream releases use.
2196 # https://github.com/NixOS/nixpkgs/issues/223390
2197 hpack = self.hpack_0_38_0;
2198 }
2199 );
2200
2201 # ShellCheck < 0.10.0 needs to be adjusted for changes in fgl >= 5.8
2202 # https://github.com/koalaman/shellcheck/issues/2677
2203 ShellCheck_0_9_0 = doJailbreak (
2204 appendPatches [
2205 (fetchpatch {
2206 name = "shellcheck-fgl-5.8.1.1.patch";
2207 url = "https://github.com/koalaman/shellcheck/commit/c05380d518056189412e12128a8906b8ca6f6717.patch";
2208 sha256 = "0gbx46x1a2sh5mvgpqxlx9xkqcw4wblpbgqdkqccxdzf7vy50xhm";
2209 })
2210 ] super.ShellCheck_0_9_0
2211 );
2212
2213 # Too strict bound on hspec (<2.11)
2214 utf8-light = doJailbreak super.utf8-light;
2215
2216 # BSON defaults to requiring network instead of network-bsd which is
2217 # required nowadays: https://github.com/mongodb-haskell/bson/issues/26
2218 bson = appendConfigureFlag "-f-_old_network" (
2219 super.bson.override {
2220 network = self.network-bsd;
2221 }
2222 );
2223
2224 # Disable flaky tests
2225 # https://github.com/DavidEichmann/alpaca-netcode/issues/2
2226 alpaca-netcode = overrideCabal {
2227 testFlags = [
2228 "--pattern"
2229 "!/[NOCI]/"
2230 ];
2231 } super.alpaca-netcode;
2232
2233 # 2021-05-22: Tests fail sometimes (even consistently on hydra)
2234 # when running a fs-related test with >= 12 jobs. To work around
2235 # this, run tests with only a single job.
2236 # https://github.com/vmchale/libarchive/issues/20
2237 libarchive = overrideCabal {
2238 testFlags = [ "-j1" ];
2239 } super.libarchive;
2240
2241 # https://github.com/plow-technologies/hspec-golden-aeson/issues/17
2242 hspec-golden-aeson = dontCheck super.hspec-golden-aeson;
2243
2244 # To strict bound on hspec
2245 # https://github.com/dagit/zenc/issues/5
2246 zenc = doJailbreak super.zenc;
2247
2248 # https://github.com/ajscholl/basic-cpuid/pull/1
2249 basic-cpuid = appendPatch (fetchpatch {
2250 url = "https://github.com/ajscholl/basic-cpuid/commit/2f2bd7a7b53103fb0cf26883f094db9d7659887c.patch";
2251 sha256 = "0l15ccfdys100jf50s9rr4p0d0ikn53bkh7a9qlk9i0y0z5jc6x1";
2252 }) super.basic-cpuid;
2253
2254 # Allow building with language-docker >= 13 (!); waiting for 2.13 release.
2255 hadolint = doJailbreak (
2256 appendPatches [
2257 (pkgs.fetchpatch {
2258 name = "hadolint-language-docker-12.patch";
2259 url = "https://github.com/hadolint/hadolint/commit/593ccde5af13c9b960b3ea815c47ce028a2e8adc.patch";
2260 sha256 = "07v5c1k8if72j04m017jpsf7gvc5kwyi1q3a532n0zhxqc7w1zjn";
2261 includes = [
2262 "**/DL3011.hs"
2263 "**/DL3011Spec.hs"
2264 ];
2265 })
2266 ] super.hadolint
2267 );
2268
2269 # Too strict lower bounds on (test) deps
2270 # https://github.com/phadej/puresat/issues/6
2271 puresat = doJailbreak super.puresat;
2272
2273 # test suite requires stack to run, https://github.com/dino-/photoname/issues/24
2274 photoname = dontCheck super.photoname;
2275
2276 # Upgrade of unordered-containers in Stackage causes ordering-sensitive test to fail
2277 # https://github.com/commercialhaskell/stackage/issues/6366
2278 # https://github.com/kapralVV/Unique/issues/9
2279 # Too strict bounds on hashable
2280 # https://github.com/kapralVV/Unique/pull/10
2281 Unique = warnAfterVersion "0.4.7.9" (
2282 overrideCabal (drv: {
2283 testFlags = [
2284 "--skip"
2285 "/Data.List.UniqueUnsorted.removeDuplicates/removeDuplicates: simple test/"
2286 "--skip"
2287 "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/unique: simple test/"
2288 "--skip"
2289 "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/repeatedBy: simple test/"
2290 ]
2291 ++ drv.testFlags or [ ];
2292 }) super.Unique
2293 );
2294
2295 # https://github.com/AndrewRademacher/aeson-casing/issues/8
2296 aeson-casing = warnAfterVersion "0.2.0.0" (
2297 overrideCabal (drv: {
2298 testFlags = [
2299 "-p"
2300 "! /encode train/"
2301 ]
2302 ++ drv.testFlags or [ ];
2303 }) super.aeson-casing
2304 );
2305
2306 # https://github.com/emc2/HUnit-Plus/issues/26
2307 HUnit-Plus = dontCheck super.HUnit-Plus;
2308 # https://github.com/ewestern/haskell-postgis/issues/7
2309 haskell-postgis = overrideCabal (drv: {
2310 testFlags = [
2311 "--skip"
2312 "/Geo/Hexable/Encodes a linestring/"
2313 ]
2314 ++ drv.testFlags or [ ];
2315 }) super.haskell-postgis;
2316 # https://github.com/ChrisPenner/json-to-haskell/issues/5
2317 json-to-haskell = overrideCabal (drv: {
2318 testFlags = [
2319 "--match"
2320 "/should sanitize weird field and record names/"
2321 ]
2322 ++ drv.testFlags or [ ];
2323 }) super.json-to-haskell;
2324 # https://github.com/fieldstrength/aeson-deriving/issues/5
2325 aeson-deriving = dontCheck super.aeson-deriving;
2326
2327 # 2025-02-11: Too strict bounds on tasty < 1.5, all of the below.
2328 morpheus-graphql-app = doJailbreak super.morpheus-graphql-app;
2329 morpheus-graphql-client = doJailbreak super.morpheus-graphql-client;
2330 morpheus-graphql-core = doJailbreak super.morpheus-graphql-core;
2331 morpheus-graphql-server = doJailbreak super.morpheus-graphql-server;
2332 morpheus-graphql-tests = doJailbreak super.morpheus-graphql-tests;
2333 morpheus-graphql = doJailbreak super.morpheus-graphql;
2334
2335 drunken-bishop = doJailbreak super.drunken-bishop;
2336 # https://github.com/SupercedeTech/dropbox-client/issues/1
2337 dropbox = overrideCabal (drv: {
2338 testFlags = [
2339 "--skip"
2340 "/Dropbox/Dropbox aeson aeson/encodes list folder correctly/"
2341 ]
2342 ++ drv.testFlags or [ ];
2343 }) super.dropbox;
2344 # https://github.com/alonsodomin/haskell-schema/issues/11
2345 hschema-aeson = overrideCabal (drv: {
2346 testFlags = [
2347 "--skip"
2348 "/toJsonSerializer/should generate valid JSON/"
2349 ]
2350 ++ drv.testFlags or [ ];
2351 }) super.hschema-aeson;
2352 # https://github.com/minio/minio-hs/issues/165
2353 # https://github.com/minio/minio-hs/pull/191 Use crypton-connection instead of unmaintained connection
2354 minio-hs = overrideCabal (drv: {
2355 testFlags = [
2356 "-p"
2357 "!/Test mkSelectRequest/"
2358 ]
2359 ++ drv.testFlags or [ ];
2360 patches = drv.patches or [ ] ++ [
2361 (pkgs.fetchpatch {
2362 name = "use-crypton-connection.patch";
2363 url = "https://github.com/minio/minio-hs/commit/786cf1881f0b62b7539e63547e76afc3c1ade36a.patch";
2364 sha256 = "sha256-zw0/jhKzShpqV1sUyxWTl73sQOzm6kA/yQOZ9n0L1Ag";
2365 })
2366 (pkgs.fetchpatch {
2367 name = "compatibility-with-crypton-connection-0-4-0.patch";
2368 url = "https://github.com/minio/minio-hs/commit/e2169892a5fea444aaf9e551243da811003d3188.patch";
2369 sha256 = "sha256-hWphiArv7gZWiDewLHDeU4RASGOE9Z1liahTmAGQIgQ=";
2370 })
2371 ];
2372 }) (super.minio-hs.override { connection = self.crypton-connection; });
2373
2374 # Invalid CPP in test suite: https://github.com/cdornan/memory-cd/issues/1
2375 memory-cd = dontCheck super.memory-cd;
2376
2377 fgl-arbitrary = doJailbreak super.fgl-arbitrary;
2378
2379 # raaz-0.3 onwards uses backpack and it does not play nicely with
2380 # parallel builds using -j
2381 #
2382 # See: https://gitlab.haskell.org/ghc/ghc/-/issues/17188
2383 #
2384 # Overwrite the build cores
2385 raaz = disableParallelBuilding super.raaz;
2386
2387 # Test suite uses SHA as a point of comparison which doesn't
2388 # succeeds its own test suite on 32bit:
2389 # https://github.com/GaloisInc/SHA/issues/16
2390 cryptohash-sha256 =
2391 if pkgs.stdenv.hostPlatform.is32bit then
2392 dontCheck super.cryptohash-sha256
2393 else
2394 super.cryptohash-sha256;
2395
2396 # https://github.com/andreymulik/sdp/issues/3
2397 sdp = disableLibraryProfiling super.sdp;
2398 sdp-binary = disableLibraryProfiling super.sdp-binary;
2399 sdp-deepseq = disableLibraryProfiling super.sdp-deepseq;
2400 sdp-hashable = disableLibraryProfiling super.sdp-hashable;
2401 sdp-io = disableLibraryProfiling super.sdp-io;
2402 sdp-quickcheck = disableLibraryProfiling super.sdp-quickcheck;
2403 sdp4bytestring = disableLibraryProfiling super.sdp4bytestring;
2404 sdp4text = disableLibraryProfiling super.sdp4text;
2405 sdp4unordered = disableLibraryProfiling super.sdp4unordered;
2406 sdp4vector = disableLibraryProfiling super.sdp4vector;
2407
2408 # Fixes compilation with GHC 9.0 and above
2409 # https://hub.darcs.net/shelarcy/regex-compat-tdfa/issue/3
2410 regex-compat-tdfa =
2411 appendPatches
2412 [
2413 ./patches/regex-compat-tdfa-ghc-9.0.patch
2414 ]
2415 (
2416 overrideCabal {
2417 # Revision introduces bound base < 4.15
2418 revision = null;
2419 editedCabalFile = null;
2420 } super.regex-compat-tdfa
2421 );
2422
2423 # 2025-02-11: Too strict bounds on hedgehog < 1.5, hspec-hedgehog < 0.2
2424 validation-selective = doJailbreak super.validation-selective;
2425
2426 # Test suite isn't supposed to succeed yet, apparently…
2427 # https://github.com/andrewufrank/uniform-error/blob/f40629ad119e90f8dae85e65e93d7eb149bddd53/test/Uniform/Error_test.hs#L124
2428 # https://github.com/andrewufrank/uniform-error/issues/2
2429 uniform-error = dontCheck super.uniform-error;
2430 # https://github.com/andrewufrank/uniform-fileio/issues/2
2431 uniform-fileio = dontCheck super.uniform-fileio;
2432
2433 # The shipped Setup.hs file is broken.
2434 csv = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.hs"; }) super.csv;
2435 # Build-type is simple, but ships a broken Setup.hs
2436 digits = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.lhs"; }) super.digits;
2437
2438 cabal-fmt = doJailbreak (
2439 super.cabal-fmt.override {
2440 # Needs newer Cabal-syntax version.
2441 Cabal-syntax = self.Cabal-syntax_3_10_3_0;
2442 }
2443 );
2444
2445 # 2025-02-11: Too strict bounds on base < 4.17
2446 ema = doJailbreak super.ema;
2447
2448 # Too strict bounds on text and tls
2449 # https://github.com/barrucadu/irc-conduit/issues/54
2450 # Use crypton-connection instead of connection
2451 # https://github.com/barrucadu/irc-conduit/pull/60 https://github.com/barrucadu/irc-client/pull/101
2452 irc-conduit =
2453 appendPatch
2454 (pkgs.fetchpatch {
2455 url = "https://github.com/barrucadu/irc-conduit/pull/60/commits/58f6b5ee0c23a0615e43292dbbacf40636dcd7a6.patch";
2456 hash = "sha256-d08tb9iL07mBWdlZ7PCfTLVFJLgcxeGVPzJ+jOej8io=";
2457 })
2458 (
2459 doJailbreak (
2460 super.irc-conduit.override {
2461 connection = self.crypton-connection;
2462 x509-validation = self.crypton-x509-validation;
2463 }
2464 )
2465 );
2466 irc-client =
2467 appendPatch
2468 (pkgs.fetchpatch {
2469 url = "https://github.com/barrucadu/irc-client/pull/101/commits/0440b7e2ce943d960234c50957a55025771f567a.patch";
2470 hash = "sha256-iZyZMrodgViXFCMH9y2wIJZRnjd6WhkqInAdykqTdkY=";
2471 })
2472 (
2473 doJailbreak (
2474 super.irc-client.override {
2475 connection = self.crypton-connection;
2476 x509 = self.crypton-x509;
2477 x509-store = self.crypton-x509-store;
2478 x509-validation = self.crypton-x509-validation;
2479 }
2480 )
2481 );
2482
2483 # 2022-03-16: Upstream stopped updating bounds https://github.com/haskell-hvr/base-noprelude/pull/15
2484 base-noprelude = doJailbreak super.base-noprelude;
2485
2486 # 2025-01-07: unreleased upstream supports hedgehog 1.5 but drifted quite a bit from hackage revisions so hard to patch
2487 hw-hspec-hedgehog = doJailbreak super.hw-hspec-hedgehog;
2488
2489 # Test suite doesn't support hspec 2.8
2490 # https://github.com/zellige/hs-geojson/issues/29
2491 geojson = dontCheck super.geojson;
2492
2493 # Test data missing from sdist
2494 # https://github.com/ngless-toolkit/ngless/issues/152
2495 NGLess = dontCheck super.NGLess;
2496
2497 # Too strict bound on network (<3.2)
2498 hookup = appendPatches [
2499 (pkgs.fetchpatch {
2500 name = "hookup-network-3.2.patch";
2501 url = "https://github.com/glguy/irc-core/commit/a3ec982e729b0f77b2db336ec32c5e4b7283bed5.patch";
2502 sha256 = "0qc1qszn3l69xlbpfv8vz9ld0q7sghfcbp0wjds81kwcpdpl4jgv";
2503 stripLen = 1;
2504 includes = [ "hookup.cabal" ];
2505 })
2506 ] super.hookup;
2507
2508 # Raise version bounds: https://github.com/kosmikus/records-sop/pull/15
2509 records-sop = appendPatch (fetchpatch {
2510 url = "https://github.com/kosmikus/records-sop/commit/fb149f453a816ff14d0cb20b3ea56b80ff49d9f1.patch";
2511 sha256 = "sha256-iHiF4EWL/GjJFnr/6aR+yMZKLMLAZK+gsgSxG8YaeDI=";
2512 }) super.records-sop;
2513
2514 # Fix build failures for ghc 9 (https://github.com/mokus0/polynomial/pull/20)
2515 polynomial =
2516 appendPatch
2517 (fetchpatch {
2518 name = "haskell-polynomial.20.patch";
2519 url = "https://github.com/mokus0/polynomial/pull/20.diff";
2520 sha256 = "1bwivimpi2hiil3zdnl5qkds1inyn239wgxbn3y8l2pwyppnnfl0";
2521 })
2522 (
2523 overrideCabal (drv: {
2524 revision = null;
2525 editedCabalFile = null;
2526 doCheck = false; # Source dist doesn't include the checks
2527 }) super.polynomial
2528 );
2529
2530 # lucid-htmx has restrictive upper bounds on lucid and servant:
2531 #
2532 # Setup: Encountered missing or private dependencies:
2533 # lucid >=2.9.12.1 && <=2.11, servant >=0.18.3 && <0.19
2534 #
2535 # Can be removed once
2536 #
2537 # > https://github.com/MonadicSystems/lucid-htmx/issues/6
2538 #
2539 # has been resolved.
2540 lucid-htmx = doJailbreak super.lucid-htmx;
2541
2542 clash-prelude = dontCheck super.clash-prelude;
2543
2544 krank = appendPatches [
2545 # Deal with removed exports in base
2546 (pkgs.fetchpatch {
2547 name = "krank-issue-97.patch";
2548 url = "https://github.com/guibou/krank/commit/f6b676774537f8e2357115fd8cd3c93fb68e8a85.patch";
2549 sha256 = "0d85q2x37yhjwp17wmqvblkna7p7vnl7rwdqr3kday46wvdgblgl";
2550 excludes = [ ".envrc" ];
2551 })
2552 # Fix build of tests with http-client >=0.7.16
2553 (pkgs.fetchpatch {
2554 name = "krank-http-client-0.7.16.patch";
2555 url = "https://github.com/guibou/krank/commit/50fd3d08526f3ed6add3352460d3d1ce9dc15f6d.patch";
2556 sha256 = "0h15iir2v4pli2b72gv69amxs277xmmzw3wavrix74h9prbs4pms";
2557 })
2558 ] super.krank;
2559
2560 hermes-json = overrideCabal (drv: {
2561 # 2025-02-11: Upper bounds on hedgehog < 1.5 too strict.
2562 jailbreak = true;
2563
2564 # vendored simdjson breaks with clang-19. apply patches that work with
2565 # a more recent simdjson so we can un-vendor it
2566 patches = drv.patches or [ ] ++ [
2567 (fetchpatch {
2568 url = "https://github.com/velveteer/hermes/commit/6fd9904d93a5c001aadb27c114345a6958904d71.patch";
2569 hash = "sha256-Pv09XP0/VjUiAFp237Adj06PIZU21mQRh7guTlKksvA=";
2570 excludes = [
2571 ".github/*"
2572 "hermes-bench/*"
2573 ];
2574 })
2575 (fetchpatch {
2576 url = "https://github.com/velveteer/hermes/commit/ca8dddbf52f9d7788460a056fefeb241bcd09190.patch";
2577 hash = "sha256-tDDGS0QZ3YWe7+SP09wnxx6lIWL986ce5Zhqr7F2sBk=";
2578 excludes = [
2579 "README.md"
2580 ".github/*"
2581 "hermes-bench/*"
2582 ];
2583 })
2584 ];
2585 postPatch = drv.postPatch or "" + ''
2586 ln -fs ${pkgs.simdjson.src} simdjson
2587 '';
2588 }) super.hermes-json;
2589
2590 # hexstring is not compatible with newer versions of base16-bytestring
2591 # See https://github.com/solatis/haskell-hexstring/issues/3
2592 hexstring = overrideCabal (old: {
2593 # Prevent DOS line endings from Hackage from breaking a patch
2594 prePatch = old.prePatch or "" + ''
2595 ${pkgs.buildPackages.dos2unix}/bin/dos2unix src/Data/HexString.hs
2596 '';
2597 patches = old.patches or [ ] ++ [
2598 (pkgs.fetchpatch {
2599 name = "fix-base16-bytestring-compat";
2600 url = "https://github.com/solatis/haskell-hexstring/commit/4f0a27c64ecb4a767eeea2efebebfd7edba18de0.patch";
2601 hash = "sha256-DHT566Ov1D++1VNjUor9xSeOsuSi2LPiIAGT55gqr8s=";
2602 })
2603 ];
2604 }) super.hexstring;
2605
2606 # Disabling doctests.
2607 regex-tdfa = overrideCabal {
2608 testTargets = [ "regex-tdfa-unittest" ];
2609 } super.regex-tdfa;
2610
2611 # Missing test files https://github.com/kephas/xdg-basedir-compliant/issues/1
2612 xdg-basedir-compliant = dontCheck super.xdg-basedir-compliant;
2613
2614 # Test failure after libxcrypt migration, reported upstream at
2615 # https://github.com/phadej/crypt-sha512/issues/13
2616 crypt-sha512 = dontCheck super.crypt-sha512;
2617
2618 # Latest release depends on crypton-connection ==0.3.2 https://github.com/ndmitchell/hoogle/issues/435
2619 hoogle = overrideSrc {
2620 version = "unstable-2024-07-29";
2621 src = pkgs.fetchFromGitHub {
2622 owner = "ndmitchell";
2623 repo = "hoogle";
2624 rev = "8149c93c40a542bf8f098047e1acbc347fc9f4e6";
2625 hash = "sha256-k3UdmTq8c+iNF8inKM+oWf/NgJqRgUSFS3YwRKVg8Mw=";
2626 };
2627 } super.hoogle;
2628
2629 inherit
2630 (
2631 let
2632 # We need to build purescript with these dependencies and thus also its reverse
2633 # dependencies to avoid version mismatches in their dependency closure.
2634 # TODO: maybe unify with the spago overlay in configuration-nix.nix?
2635 purescriptOverlay = self: super: {
2636 # As of 2021-11-08, the latest release of `language-javascript` is 0.7.1.0,
2637 # but it has a problem with parsing the `async` keyword. It doesn't allow
2638 # `async` to be used as an object key:
2639 # https://github.com/erikd/language-javascript/issues/131
2640 language-javascript = self.language-javascript_0_7_0_0;
2641 };
2642 in
2643 {
2644 purescript = lib.pipe (super.purescript.overrideScope purescriptOverlay) [
2645 # https://github.com/purescript/purescript/pull/4547
2646 (appendPatches [
2647 (pkgs.fetchpatch {
2648 name = "purescript-import-fix";
2649 url = "https://github.com/purescript/purescript/commit/c610ec18391139a67dc9dcf19233f57d2c5413f7.patch";
2650 hash = "sha256-7s/ygzAFJ1ocZIj3OSd3TbsmGki46WViPIZOU1dfQFg=";
2651 })
2652 ])
2653 # PureScript uses nodejs to run tests, so the tests have been disabled
2654 # for now. If someone is interested in figuring out how to get this
2655 # working, it seems like it might be possible.
2656 dontCheck
2657 # The current version of purescript (0.14.5) has version bounds for LTS-17,
2658 # but it compiles cleanly using deps in LTS-18 as well. This jailbreak can
2659 # likely be removed when purescript-0.14.6 is released.
2660 doJailbreak
2661 # Generate shell completions
2662 (self.generateOptparseApplicativeCompletions [ "purs" ])
2663 ];
2664
2665 purenix = lib.pipe (super.purenix.overrideScope purescriptOverlay) [
2666 (appendPatches [
2667 # https://github.com/purenix-org/purenix/pull/63
2668 (pkgs.fetchpatch {
2669 name = "purenix-purescript-0_15_12";
2670 url = "https://github.com/purenix-org/purenix/commit/2dae563f887c7c8daf3dd3e292ee3580cb70d528.patch";
2671 hash = "sha256-EZXf95BJINyqnRb2t/Ao/9C8ttNp3A27rpKiEKJjO6Y=";
2672 })
2673 (pkgs.fetchpatch {
2674 name = "purenix-import-fix";
2675 url = "https://github.com/purenix-org/purenix/commit/f1890690264e7e5ce7f5b0a32d73d910ce2cbd73.patch";
2676 hash = "sha256-MRITcNOiaWmzlTd9l7sIz/LhlnpW8T02CXdcc1qQt3c=";
2677 })
2678 ])
2679 ];
2680 }
2681 )
2682 purescript
2683 purenix
2684 ;
2685
2686 # containers <0.6, semigroupoids <5.3
2687 data-lens = doJailbreak super.data-lens;
2688
2689 # hashable <1.4, mmorph <1.2
2690 composite-aeson = doJailbreak super.composite-aeson;
2691
2692 # Overly strict bounds on tasty-quickcheck (test suite) (< 0.11)
2693 hashable = doJailbreak super.hashable;
2694 cborg = lib.pipe super.cborg [
2695 # Fix build on 32-bit: https://github.com/well-typed/cborg/pull/322
2696 (appendPatches (
2697 lib.optionals pkgs.stdenv.hostPlatform.is32bit [
2698 (pkgs.fetchpatch {
2699 name = "cborg-i686-1.patch";
2700 url = "https://github.com/well-typed/cborg/commit/a4757c46219afe6d235652ae642786f2e2977020.patch";
2701 sha256 = "01n0x2l605x7in9hriz9asmzsfb5f8d6zkwgypckfj1r18qbs2hj";
2702 includes = [ "**/Codec/CBOR/**" ];
2703 stripLen = 1;
2704 })
2705 (pkgs.fetchpatch {
2706 name = "cborg-i686-2.patch";
2707 url = "https://github.com/well-typed/cborg/commit/94a856e4e544a5bc7f927cfb728de385d6260af4.patch";
2708 sha256 = "03iz85gsll38q5bl3m024iv7yb1k5sisly7jvgf66zic8fbvkhcn";
2709 includes = [ "**/Codec/CBOR/**" ];
2710 stripLen = 1;
2711 })
2712 ]
2713 ))
2714 ];
2715 # Doesn't compile with tasty-quickcheck == 0.11 (see issue above)
2716 serialise = dontCheck super.serialise;
2717 # https://github.com/Bodigrim/data-array-byte/issues/1
2718 data-array-byte = doJailbreak super.data-array-byte;
2719 # 2025-02-06: Allow tasty-quickcheck == 0.11.*
2720 # https://github.com/google/ghc-source-gen/issues/120
2721 ghc-source-gen = doJailbreak super.ghc-source-gen;
2722 ghc-source-gen_0_4_5_0 = doJailbreak super.ghc-source-gen_0_4_5_0;
2723 # https://github.com/byteverse/bytebuild/issues/20#issuecomment-2652113837
2724 bytebuild = doJailbreak super.bytebuild;
2725 # https://github.com/haskellari/lattices/issues/132
2726 lattices = doJailbreak super.lattices;
2727
2728 # Too strict bounds on tasty <1.5 and tasty-quickcheck <0.11
2729 # https://github.com/phadej/aeson-extra/issues/62
2730 aeson-extra = doJailbreak super.aeson-extra;
2731
2732 # Support tasty-quickcheck 0.11: https://github.com/Bodigrim/mod/pull/26
2733 mod = appendPatch (fetchpatch {
2734 url = "https://github.com/Bodigrim/mod/commit/30596fb9d85b69ec23ecb05ef9a7c91d67901cfd.patch";
2735 sha256 = "sha256-9XuzIxEbepaw5bRoIOUka8fkiZBfturIybh/9nhGmWQ=";
2736 }) super.mod;
2737
2738 # Fixes build of test suite: not yet released
2739 primitive-unlifted = appendPatch (fetchpatch {
2740 url = "https://github.com/haskell-primitive/primitive-unlifted/commit/26922952ef20c4771d857f3e96c9e710cb3c2df9.patch";
2741 sha256 = "0h9xxrv78spqi93l9206398gmsliaz0w6xy37nrvx3daqr1y4big";
2742 excludes = [ "*.cabal" ];
2743 }) super.primitive-unlifted;
2744
2745 # composite-aeson <0.8, composite-base <0.8
2746 compdoc = doJailbreak super.compdoc;
2747
2748 # composite-aeson <0.8, composite-base <0.8
2749 haskell-coffee = doJailbreak super.haskell-coffee;
2750
2751 # Test suite doesn't compile anymore
2752 twitter-types = dontCheck super.twitter-types;
2753
2754 # Tests open file "data/test_vectors_aserti3-2d_run01.txt" but it doesn't exist
2755 haskoin-core = dontCheck super.haskoin-core;
2756
2757 # unix-compat <0.5
2758 hxt-cache = doJailbreak super.hxt-cache;
2759
2760 # QuickCheck <2.14
2761 term-rewriting = doJailbreak super.term-rewriting;
2762
2763 # tests can't find the test binary anymore - parseargs-example
2764 parseargs = dontCheck super.parseargs;
2765
2766 # base <4.14
2767 decimal-literals = doJailbreak super.decimal-literals;
2768
2769 # Test failure https://gitlab.com/lysxia/ap-normalize/-/issues/2
2770 ap-normalize = dontCheck super.ap-normalize;
2771
2772 heist-extra = doJailbreak super.heist-extra; # base <4.18.0.0.0
2773 unionmount = doJailbreak super.unionmount; # base <4.18
2774 tailwind = doJailbreak super.tailwind; # base <=4.17.0.0
2775 commonmark-wikilink = doJailbreak super.commonmark-wikilink; # base <4.18.0.0.0
2776
2777 # 2024-03-02: Apply unreleased changes necessary for compatibility
2778 # with commonmark-extensions-0.2.5.3.
2779 commonmark-simple = warnAfterVersion "0.1.0.0" (
2780 appendPatches (map
2781 (
2782 { rev, hash }:
2783 fetchpatch {
2784 name = "commonmark-simple-${lib.substring 0 7 rev}.patch";
2785 url = "https://github.com/srid/commonmark-simple/commit/${rev}.patch";
2786 includes = [ "src/Commonmark/Simple.hs" ];
2787 inherit hash;
2788 }
2789 )
2790 [
2791 {
2792 rev = "71f5807ed4cbd8da915bf5ba04cd115b49980bcb";
2793 hash = "sha256-ibDQbyTd2BoA0V+ldMOr4XYurnqk1nWzbJ15tKizHrM=";
2794 }
2795 {
2796 rev = "fc106c94f781f6a35ef66900880edc08cbe3b034";
2797 hash = "sha256-9cpgRNFWhpSuSttAvnwPiLmi1sIoDSYbp0sMwcKWgDQ=";
2798 }
2799 ]
2800 ) (doJailbreak super.commonmark-simple)
2801 );
2802
2803 # Test files missing from sdist
2804 # https://github.com/tweag/webauthn/issues/166
2805 webauthn = dontCheck super.webauthn;
2806
2807 # calls ghc in tests
2808 # https://github.com/brandonchinn178/tasty-autocollect/issues/54
2809 tasty-autocollect = dontCheck super.tasty-autocollect;
2810
2811 postgres-websockets = lib.pipe super.postgres-websockets [
2812 (addTestToolDepends [
2813 pkgs.postgresql
2814 pkgs.postgresqlTestHook
2815 ])
2816 (dontCheckIf pkgs.postgresqlTestHook.meta.broken)
2817 (overrideCabal {
2818 preCheck = ''
2819 export postgresqlEnableTCP=1
2820 export PGDATABASE=postgres_ws_test
2821 '';
2822 })
2823 ];
2824
2825 postgrest =
2826 lib.pipe
2827 (super.postgrest.overrideScope (
2828 self: super: {
2829 # 2025-01-19: Upstream is stuck at hasql < 1.7
2830 # Jailbreaking for newer postgresql-libpq, which seems to work fine
2831 postgresql-binary = dontCheck (doJailbreak super.postgresql-binary_0_13_1_3);
2832 hasql = dontCheck (doJailbreak super.hasql_1_6_4_4);
2833 # Matching dependencies for hasql < 1.6.x
2834 hasql-dynamic-statements = dontCheck super.hasql-dynamic-statements_0_3_1_5;
2835 hasql-implicits = dontCheck super.hasql-implicits_0_1_1_3;
2836 hasql-notifications = dontCheck super.hasql-notifications_0_2_2_2;
2837 hasql-pool = dontCheck super.hasql-pool_1_0_1;
2838 hasql-transaction = dontCheck super.hasql-transaction_1_1_0_1;
2839 }
2840 ))
2841 [
2842 # 2023-12-20: New version needs extra dependencies
2843 (addBuildDepends [
2844 self.cache
2845 self.extra
2846 self.fuzzyset_0_2_4
2847 self.jose-jwt
2848 self.neat-interpolation
2849 self.prometheus-client
2850 self.timeit
2851 ])
2852 # 2022-12-02: Too strict bounds.
2853 doJailbreak
2854 # 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275
2855 (overrideSrc rec {
2856 version = "13.0.4";
2857 src = pkgs.fetchFromGitHub {
2858 owner = "PostgREST";
2859 repo = "postgrest";
2860 rev = "v${version}";
2861 hash = "sha256-Y9Nxfs2w3Iinx61Om7dd+R8TTsK12oWD+3vki3WUz9Y=";
2862 };
2863 })
2864 ];
2865
2866 # Too strict bounds on hspec < 2.11
2867 fuzzyset_0_2_4 = doJailbreak super.fuzzyset_0_2_4;
2868
2869 html-charset = dontCheck super.html-charset;
2870
2871 # bytestring <0.11.0, optparse-applicative <0.13.0
2872 # https://github.com/kseo/sfnt2woff/issues/1
2873 sfnt2woff = doJailbreak super.sfnt2woff;
2874
2875 # libfuse3 fails to mount fuse file systems within the build environment
2876 libfuse3 = dontCheck super.libfuse3;
2877
2878 # Merged upstream, but never released. Allows both intel and aarch64 darwin to build.
2879 # https://github.com/vincenthz/hs-gauge/pull/106
2880 gauge = appendPatch (pkgs.fetchpatch {
2881 name = "darwin-aarch64-fix.patch";
2882 url = "https://github.com/vincenthz/hs-gauge/commit/3d7776f41187c70c4f0b4517e6a7dde10dc02309.patch";
2883 hash = "sha256-4osUMo0cvTvyDTXF8lY9tQbFqLywRwsc3RkHIhqSriQ=";
2884 }) super.gauge;
2885
2886 # The hackage source is somehow missing a file present in the repo (tests/ListStat.hs).
2887 sym = dontCheck super.sym;
2888
2889 # 2024-01-24: https://github.com/haskellari/tree-diff/issues/79
2890 # exprParser fails to parse pretty printed structure correctly when the randomizer uses newlines (?)
2891 tree-diff = overrideCabal (drv: {
2892 testFlags = drv.testFlags or [ ] ++ [
2893 "-p"
2894 "!/parsec-ansi-wl-pprint/"
2895 ];
2896 }) super.tree-diff;
2897
2898 # base <4.19
2899 # https://github.com/well-typed/large-records/issues/168
2900 large-generics = doJailbreak super.large-generics;
2901
2902 # Too strict bound on bytestring < 0.12
2903 # https://github.com/raehik/heystone/issues/2
2904 heystone = doJailbreak super.heystone;
2905
2906 # Too strict bounds on base, ghc-prim, primitive
2907 # https://github.com/kowainik/typerep-map/pull/128
2908 typerep-map = doJailbreak super.typerep-map;
2909
2910 # Too strict bounds on base
2911 kewar = doJailbreak super.kewar;
2912
2913 # Tests rely on (missing) submodule
2914 unleash-client-haskell-core = dontCheck super.unleash-client-haskell-core;
2915
2916 # Workaround for Cabal failing to find nonexistent SDL2 library?!
2917 # https://github.com/NixOS/nixpkgs/issues/260863
2918 sdl2-gfx = overrideCabal { __propagatePkgConfigDepends = false; } super.sdl2-gfx;
2919
2920 # Needs git for compile-time insertion of commit hash into --version string.
2921 kmonad = overrideCabal (drv: {
2922 libraryToolDepends = (drv.libraryToolDepends or [ ]) ++ [ pkgs.buildPackages.git ];
2923 }) super.kmonad;
2924
2925 # 2024-03-17: broken
2926 vaultenv = dontDistribute super.vaultenv;
2927
2928 # 2024-01-24: support optparse-applicative 0.18
2929 niv = appendPatches [
2930 (fetchpatch {
2931 # needed for the following patch to apply
2932 url = "https://github.com/nmattia/niv/commit/7b76374b2b44152bfbf41fcb60162c2ce9182e7a.patch";
2933 includes = [ "src/*" ];
2934 hash = "sha256-3xG+GD6fUCGgi2EgS7WUpjfn6gvc2JurJcIrnyy4ys8=";
2935 })
2936 (fetchpatch {
2937 # Update to optparse-applicative 0.18
2938 url = "https://github.com/nmattia/niv/commit/290965abaa02be33b601032d850c588a6bafb1a5.patch";
2939 hash = "sha256-YxUdv4r/Fx+8YxHhqEuS9uZR1XKzVCPrLmj5+AY5GRA=";
2940 })
2941 ] super.niv;
2942
2943 # 2024-03-25: HSH broken because of the unix-2.8.0.0 breaking change
2944 HSH = appendPatches [ ./patches/HSH-unix-openFd.patch ] super.HSH;
2945
2946 # Support unix < 2.8 to build in older ghc than 9.6
2947 linux-namespaces = appendPatch (fetchpatch {
2948 url = "https://github.com/redneb/hs-linux-namespaces/commit/f4a3546541bb6c7172fdd03e177a961da60e3951.patch";
2949 sha256 = "sha256-6Qv7NWIbzR3ktMGFogw5597bIqPH7Z4hoFvvBQAoquY=";
2950 }) super.linux-namespaces;
2951
2952 # Use recent git version as the hackage version is outdated and not building on recent GHC versions
2953 haskell-to-elm = overrideSrc {
2954 version = "unstable-2023-12-02";
2955 src = pkgs.fetchFromGitHub {
2956 owner = "haskell-to-elm";
2957 repo = "haskell-to-elm";
2958 rev = "52ab086a320a14051aa38d0353d957fb6b2525e9";
2959 hash = "sha256-j6F4WplJy7NyhTAuiDd/tHT+Agk1QdyPjOEkceZSxq8=";
2960 };
2961 } super.haskell-to-elm;
2962
2963 # Overly strict upper bounds on esqueleto
2964 # https://github.com/jonschoning/espial/issues/61
2965 espial = doJailbreak super.espial;
2966
2967 # https://github.com/isovector/type-errors/issues/9
2968 type-errors = dontCheck super.type-errors;
2969
2970 # Too strict bounds on text. Can be removed after https://github.com/alx741/currencies/pull/3 is merged
2971 currencies = doJailbreak super.currencies;
2972
2973 argon2 = appendPatch (fetchpatch {
2974 # https://github.com/haskell-hvr/argon2/pull/20
2975 url = "https://github.com/haskell-hvr/argon2/commit/f7cc92f18e233e6b1dabf1798dd099e17b6a81a1.patch";
2976 hash = "sha256-JxraFWzErJT4EhELa3PWBGHaLT9OLgEPNSnxwpdpHd0=";
2977 }) (doJailbreak super.argon2); # Unmaintained
2978
2979 # 2024-07-09: zinza has bumped their QuickCheck and tasty dependencies beyond stackage lts.
2980 # Can possibly be removed once QuickCheck >= 2.15 and tasty >= 1.5
2981 zinza = dontCheck super.zinza;
2982
2983 pdftotext = overrideCabal (drv: {
2984 postPatch = ''
2985 # Fixes https://todo.sr.ht/~geyaeb/haskell-pdftotext/6
2986 substituteInPlace pdftotext.cabal --replace-quiet c-sources cxx-sources
2987
2988 # Fix cabal ignoring cxx because the cabal format version is too old
2989 substituteInPlace pdftotext.cabal --replace-quiet ">=1.10" 2.2
2990
2991 # Fix wrong license name that breaks recent cabal version
2992 substituteInPlace pdftotext.cabal --replace-quiet BSD3 BSD-3-Clause
2993 ''
2994 + (drv.postPatch or "");
2995 }) (doJailbreak (addExtraLibrary pkgs.pkg-config (addExtraLibrary pkgs.poppler super.pdftotext)));
2996
2997 proto3-wire = appendPatch (fetchpatch {
2998 # https://github.com/awakesecurity/proto3-wire/pull/109
2999 url = "https://github.com/awakesecurity/proto3-wire/commit/b32f3db6f8d36ea0708fb2f371f62d439ea45b42.patch";
3000 hash = "sha256-EGFyk3XawU0+zk299WGwFKB2uW9eJrCDM6NgfIKWgRY=";
3001 }) super.proto3-wire;
3002
3003 # 2024-07-27: building test component requires non-trivial custom build steps
3004 # https://github.com/awakesecurity/proto3-suite/blob/bec9d40e2767143deed5b2d451197191f1d8c7d5/nix/overlays/haskell-packages.nix#L311
3005 proto3-suite = lib.pipe super.proto3-suite [
3006 dontCheck # Hackage release trails a good deal behind master
3007 doJailbreak
3008 ];
3009
3010 # Tests require docker
3011 testcontainers = dontCheck super.testcontainers;
3012
3013 # https://bitbucket.org/echo_rm/hailgun/pull-requests/27
3014 hailgun = appendPatches [
3015 (fetchpatch {
3016 url = "https://bitbucket.org/nh2/hailgun/commits/ac2bc2a3003e4b862625862c4565fece01c0cf57/raw";
3017 sha256 = "sha256-MWeK9nzMVP6cQs2GBFkohABgL8iWcT7YzwF+tLOkIjo=";
3018 })
3019 (fetchpatch {
3020 url = "https://bitbucket.org/nh2/hailgun/commits/583daaf87265a7fa67ce5171fe1077e61be9b39c/raw";
3021 sha256 = "sha256-6WITonLoONxZzzkS7EI79LwmwSdkt6TCgvHA2Hwy148=";
3022 })
3023 (fetchpatch {
3024 url = "https://bitbucket.org/nh2/hailgun/commits/b9680b82f6d58f807828c1bbb57e26c7af394501/raw";
3025 sha256 = "sha256-MnOc51tTNg8+HDu1VS2Ct7Mtu0vuuRd3DjzOAOF+t7Q=";
3026 })
3027 ] super.hailgun;
3028
3029 # opencascade-hs requires the include path configuring relative to the
3030 # opencascade subdirectory in include.
3031 opencascade-hs = appendConfigureFlags [
3032 "--extra-include-dirs=${lib.getDev pkgs.opencascade-occt}/include/opencascade"
3033 ] super.opencascade-hs;
3034
3035 # https://github.com/haskell-grpc-native/http2-client/pull/95
3036 # https://github.com/haskell-grpc-native/http2-client/pull/96
3037 # https://github.com/haskell-grpc-native/http2-client/pull/97
3038 # Apply patch for http2 >= 5.2, allow tls >= 2.1 and network >= 3.2
3039 http2-client = appendPatches [
3040 (fetchpatch {
3041 name = "http2-client-fix-build-with-http2-5.3.patch";
3042 url = "https://github.com/haskell-grpc-native/http2-client/pull/97/commits/95143e4843253913097838ab791ef39ddfd90b33.patch";
3043 sha256 = "09205ziac59axld8v1cyxa9xl42srypaq8d1gf6y3qwpmrx3rgr9";
3044 })
3045 ] (doJailbreak super.http2-client);
3046
3047 # https://github.com/snoyberg/http-client/pull/563
3048 http-client-tls = doJailbreak super.http-client-tls;
3049
3050 bsb-http-chunked = lib.pipe super.bsb-http-chunked [
3051 (warnAfterVersion "0.0.0.4")
3052 # Last released in 2018
3053 # https://github.com/sjakobi/bsb-http-chunked/issues/38
3054 # https://github.com/sjakobi/bsb-http-chunked/issues/45
3055 (overrideSrc {
3056 src = pkgs.fetchFromGitHub {
3057 owner = "sjakobi";
3058 repo = "bsb-http-chunked";
3059 rev = "c0ecd72fe2beb1cf7de9340cc8b4a31045460532";
3060 hash = "sha256-+UDxfywXPjxPuFupcB8veyMYWVQCKha64me9HADtFGg=";
3061 };
3062 })
3063 # https://github.com/sjakobi/bsb-http-chunked/pull/49
3064 (appendPatch (fetchpatch {
3065 url = "https://github.com/sjakobi/bsb-http-chunked/commit/689bf9ce12b8301d0e13a68e4a515c2779b62947.patch";
3066 sha256 = "sha256-ZdCXMhni+RGisRODiElObW5c4hKy2giWQmWnatqeRJo=";
3067 }))
3068 ];
3069
3070 # jailbreak to allow deepseq >= 1.5, https://github.com/jumper149/blucontrol/issues/3
3071 blucontrol = doJailbreak super.blucontrol;
3072
3073 # Needs to match pandoc, see:
3074 # https://github.com/jgm/pandoc/commit/97b36ecb7703b434ed4325cc128402a9eb32418d
3075 commonmark-pandoc = doDistribute self.commonmark-pandoc_0_2_2_3;
3076
3077 pandoc = lib.pipe super.pandoc [
3078 dontCheck # test errors in "jats-writer" possibly fixed in newer release
3079 # Test output changes with newer version of texmath
3080 (appendPatch (fetchpatch {
3081 name = "jats:update-for-texmath";
3082 url = "https://github.com/jgm/pandoc/commit/e2a0cc9ddaf9e7d35cbd3c76f37e39737a79c2bf.patch";
3083 sha256 = "sha256-qA9mfYS/VhWwYbB9yu7wbHwozz3cqequ361PxkbAt08=";
3084 includes = [ "test/*" ];
3085 }))
3086 (appendPatch (fetchpatch {
3087 name = "jats:update-for-mathml";
3088 url = "https://github.com/jgm/pandoc/commit/4ba0bac5c118da4da1d44e3bbb38d7c7aef19e3b.patch";
3089 sha256 = "sha256-ayRKeCqYKgZVA826xgAXxGhttm0Gx4ZrIRJlFlXPKhw=";
3090 }))
3091 (appendPatch (fetchpatch {
3092 name = "jats:use-texmath-0.12.10.1";
3093 url = "https://github.com/jgm/pandoc/commit/d3d5366e5197330e035f9f1700929c9b5a24d532.patch";
3094 sha256 = "sha256-skG7LbKl4ypVnEYA9xMtDbUmHrjuXWfuchV8iMn8Yy0=";
3095 includes = [ "test/*" ];
3096 }))
3097 ];
3098
3099 HList = lib.pipe super.HList [
3100 # Fixes syntax error in tests
3101 (appendPatch (fetchpatch {
3102 url = "https://bitbucket.org/HList/hlist/commits/e688f11d7432c812c2b238464401a86f588f81e1/raw";
3103 sha256 = "sha256-XIBIrR2MFmhKaocZJ4p57CgmAaFmMU5Z5a0rk2CjIcM=";
3104 }))
3105
3106 ];
3107
3108 # 2025-04-09: jailbreak to allow hedgehog >= 1.5
3109 hw-int = warnAfterVersion "0.0.2.0" (doJailbreak super.hw-int);
3110
3111 # 2025-04-09: jailbreak to allow tasty-quickcheck >= 0.11
3112 chimera = warnAfterVersion "0.4.1.0" (doJailbreak super.chimera);
3113
3114 # 2025-04-09: jailbreak to allow tasty-quickcheck >= 0.11
3115 bzlib = warnAfterVersion "0.5.2.0" (doJailbreak super.bzlib);
3116
3117 inherit
3118 (lib.mapAttrs (
3119 _: pkg:
3120 lib.pipe pkg [
3121 (addTestToolDepends (
3122 with pkgs;
3123 [
3124 cvc4
3125 cvc5
3126 z3
3127 ]
3128 ))
3129 # 2025-04-09: FIXME: template_tests still failing with:
3130 # fd:9: hPutBuf: resource vanished (Broken pipe)
3131 dontCheck
3132
3133 doDistribute
3134 ]
3135 ) super)
3136 what4
3137 what4_1_7
3138 ;
3139
3140 copilot-theorem = lib.pipe super.copilot-theorem [
3141 (addTestToolDepends (with pkgs; [ z3 ]))
3142 ];
3143
3144 # 2025-04-09: jailbreak to allow mtl >= 2.3, template-haskell >= 2.17, text >= 1.3
3145 egison-pattern-src-th-mode = warnAfterVersion "0.2.1.2" (
3146 doJailbreak super.egison-pattern-src-th-mode
3147 );
3148
3149 # 2025-04-09: jailbreak to allow base >= 4.17, hasql >= 1.6, hasql-transaction-io >= 0.2
3150 hasql-streams-core = warnAfterVersion "0.1.0.0" (doJailbreak super.hasql-streams-core);
3151
3152 # 2025-04-09: jailbreak to allow bytestring >= 0.12, text >= 2.1
3153 pipes-text = warnAfterVersion "1.0.1" (doJailbreak super.pipes-text);
3154
3155 # 2025-04-09: jailbreak to allow bytestring >= 0.12
3156 array-builder = warnAfterVersion "0.1.4.1" (doJailbreak super.array-builder);
3157
3158 # 2025-04-09: missing dependency - somehow it's not listed on hackage
3159 broadcast-chan = addExtraLibrary self.conduit super.broadcast-chan;
3160
3161 # 2025-04-09: jailbreak to allow template-haskell >= 2.21, th-abstraction >= 0.7
3162 kind-generics-th = warnAfterVersion "0.2.3.3" (doJailbreak super.kind-generics-th);
3163
3164 # 2025-04-09: jailbreak to allow tasty >= 1.5
3165 cvss = warnAfterVersion "0.1" (doJailbreak super.cvss);
3166
3167 # 2025-04-09: jailbreak to allow aeson >= 2.2, base >= 4.19, text >= 2.1
3168 ebird-api = warnAfterVersion "0.2.0.0" (doJailbreak super.ebird-api);
3169
3170 # 2025-04-13: jailbreak to allow bytestring >= 0.12
3171 strings = warnAfterVersion "1.1" (doJailbreak super.strings);
3172
3173 # 2025-04-13: jailbreak to allow bytestring >= 0.12
3174 twain = warnAfterVersion "2.2.0.1" (doJailbreak super.twain);
3175
3176 # 2025-04-13: jailbreak to allow hedgehog >= 1.5
3177 hw-bits = warnAfterVersion "0.7.2.2" (doJailbreak super.hw-bits);
3178
3179 # 2025-04-23: jailbreak to allow bytestring >= 0.12
3180 brillo-rendering = warnAfterVersion "1.13.3" (doJailbreak super.brillo-rendering);
3181 brillo-examples = warnAfterVersion "1.13.3" (doJailbreak super.brillo-examples);
3182 brillo-juicy = warnAfterVersion "0.2.4" (doJailbreak super.brillo-juicy);
3183 brillo = warnAfterVersion "1.13.3" (doJailbreak super.brillo);
3184
3185 # Floating point precision issues. Test suite is only checked on x86_64.
3186 # https://github.com/tweag/monad-bayes/issues/368
3187 monad-bayes = dontCheckIf (
3188 let
3189 inherit (pkgs.stdenv) hostPlatform;
3190 in
3191 !hostPlatform.isx86_64
3192 # Presumably because we emulate x86_64-darwin via Rosetta, x86_64-darwin
3193 # also fails on Hydra
3194 || hostPlatform.isDarwin
3195 ) super.monad-bayes;
3196
3197 # 2025-04-13: jailbreak to allow th-abstraction >= 0.7
3198 crucible = warnAfterVersion "0.7.2" (
3199 doJailbreak (
3200 super.crucible.override {
3201 what4 = self.what4_1_7;
3202 }
3203 )
3204 );
3205
3206 crucible-llvm = super.crucible-llvm.override {
3207 what4 = self.what4_1_7;
3208 };
3209
3210 # Test suite invokes cabal-install in a way incompatible with our generic builder
3211 # (i.e. tries to re-use the ghc package db / environment from dist-newstyle).
3212 sensei = dontCheck super.sensei;
3213
3214 crux = super.crux.override {
3215 simple-get-opt = self.simple-get-opt_0_4;
3216 };
3217
3218 # 2025-04-23: jailbreak to allow megaparsec >= 9.7
3219 # 2025-04-23: test data missing from tarball
3220 crucible-syntax = doJailbreak (dontCheck super.crucible-syntax);
3221 # 2025-04-23: missing test data
3222 crucible-debug = overrideCabal (drv: {
3223 testFlags = drv.testFlags or [ ] ++ [
3224 "-p"
3225 (lib.concatStringsSep "&&" [
3226 "!/backtrace.txt/"
3227 "!/block.txt/"
3228 "!/call-basic.txt/"
3229 "!/clear.txt/"
3230 "!/frame.txt/"
3231 "!/load-empty.txt/"
3232 "!/obligation-false.txt/"
3233 "!/prove-false.txt/"
3234 "!/prove-true.txt/"
3235 "!/test-data\\/.break.txt/"
3236 "!/test-data\\/.reg.txt/"
3237 "!/test-data\\/.reg.txt/"
3238 "!/test-data\\/.trace.txt/"
3239 "!/test-data\\/complete\\/.break.txt/"
3240 ])
3241 ];
3242 }) super.crucible-debug;
3243 # 2025-04-23: missing test data
3244 llvm-pretty-bc-parser = dontCheck super.llvm-pretty-bc-parser;
3245
3246 # 2025-04-23: Allow bytestring >= 0.12
3247 # https://github.com/mrkkrp/wave/issues/48
3248 wave = doJailbreak super.wave;
3249
3250 # 2025-04-23: disable bounds microlens <0.5, QuickCheck < 2.16
3251 # https://github.com/debug-ito/wild-bind/issues/7
3252 wild-bind = doJailbreak super.wild-bind;
3253
3254 # Test suite no longer compiles with hspec-hedgehog >= 0.3
3255 finitary = dontCheck super.finitary;
3256
3257 # 2025-04-13: jailbreak to allow bytestring >= 0.12, text >= 2.1
3258 ktx-codec = warnAfterVersion "0.0.2.1" (doJailbreak super.ktx-codec);
3259
3260 # 2025-04-13: jailbreak to allow template-haskell >= 2.17
3261 sr-extra = warnAfterVersion "1.88" (
3262 overrideCabal (drv: {
3263 version = "1.88-unstable-2025-03-30";
3264 # includes https://github.com/seereason/sr-extra/pull/7
3265 src = pkgs.fetchFromGitHub {
3266 owner = "seereason";
3267 repo = "sr-extra";
3268 rev = "2b18ced8d07aa8832168971842b20ea49369e4f0";
3269 hash = "sha256-jInfHA1xkLjx5PfsgQVzeQIN3OjTUpEz7dpVNOGNo3g=";
3270 };
3271 editedCabalFile = null;
3272 revision = null;
3273 }) super.sr-extra
3274 );
3275
3276 # Too strict bounds on base <4.19 and tasty <1.5
3277 # https://github.com/maoe/ghc-prof/issues/25
3278 ghc-prof = doJailbreak super.ghc-prof;
3279 # aeson <2.2, bytestring <0.12, text <2.1
3280 # https://github.com/jaspervdj/profiteur/issues/43
3281 profiteur = doJailbreak super.profiteur;
3282
3283 # 2025-04-19: Tests randomly fail 6 out of 10 times
3284 coinor-clp = dontCheck super.coinor-clp;
3285
3286 # 2025-04-19: Tests randomly fail 5 out of 10 times
3287 fft = dontCheck super.fft;
3288
3289 # 2025-5-15: Too strict bounds on base <4.19, see: https://github.com/zachjs/sv2v/issues/317
3290 sv2v = doJailbreak super.sv2v;
3291
3292 # 2025-06-25: Upper bounds of transformers and bytestring too strict,
3293 # as haskore 0.2.0.8 was released in 2016 and is quite outdated.
3294 # Tests fail with:
3295 # ### Error in: 11:comparison with MIDI files generated by former Haskore versions:23:Ssf:1
3296 # src/Test/MIDI/Ssf.mid: openBinaryFile: does not exist (No such file or directory)
3297 # Necessary files aren't listed in extra-source-files in the cabal file
3298 # and therefore aren't uploaded to hackage
3299 # Needs to be fixed upstream
3300 haskore = dontCheck (doJailbreak super.haskore);
3301}
3302// import ./configuration-tensorflow.nix { inherit pkgs haskellLib; } self super
3303
3304# Amazonka Packages
3305# 2025-01-24: use latest source files from github, as the hackage release is outdated, https://github.com/brendanhay/amazonka/issues/1001
3306// (
3307 let
3308 amazonkaSrc = pkgs.fetchFromGitHub {
3309 owner = "brendanhay";
3310 repo = "amazonka";
3311 rev = "f3a7fca02fdbb832cc348e991983b1465225d50c";
3312 sha256 = "sha256-u+R+4WeCd16X8H2dkDHzD3nOLsvsTB0lLNUsbRT23aE=";
3313 };
3314 setAmazonkaSourceRoot =
3315 dir: drv:
3316 (overrideSrc {
3317 version = "2.0";
3318 src = amazonkaSrc + "/${dir}";
3319 })
3320 drv;
3321 isAmazonkaService =
3322 name: lib.hasPrefix "amazonka-" name && name != "amazonka-test" && name != "amazonka-s3-streaming";
3323 amazonkaServices = lib.filter isAmazonkaService (lib.attrNames super);
3324 amazonkaServiceOverrides = (
3325 lib.genAttrs amazonkaServices (
3326 name:
3327 lib.pipe super.${name} [
3328 (setAmazonkaSourceRoot "lib/services/${name}")
3329 (x: x)
3330 ]
3331 )
3332 );
3333 in
3334 amazonkaServiceOverrides
3335 // {
3336 amazonka-core = lib.pipe super.amazonka-core [
3337 (warnAfterVersion "2.0")
3338 (setAmazonkaSourceRoot "lib/amazonka-core")
3339 (addBuildDepends [
3340 self.microlens
3341 self.microlens-contra
3342 self.microlens-pro
3343 ])
3344 ];
3345 amazonka = warnAfterVersion "2.0" (
3346 setAmazonkaSourceRoot "lib/amazonka" (doJailbreak super.amazonka)
3347 );
3348 }
3349)