Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / haskell-modules / configuration-common.nix
blob7fe56b3f13d012227382f4ab6fac2cb60e809917
1 # COMMON OVERRIDES FOR THE HASKELL PACKAGE SET IN NIXPKGS
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.
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
10 # See comment at the top of configuration-nix.nix for more information about this
11 # distinction.
12 { pkgs, haskellLib }:
14 let
15   inherit (pkgs) fetchpatch fetchpatch2 lib;
16   inherit (lib) throwIfNot versionOlder versions;
19 with haskellLib;
21 self: super: {
22   # Make sure that Cabal 3.10.* can be built as-is
23   Cabal_3_10_2_1 = doDistribute (super.Cabal_3_10_2_1.override ({
24     Cabal-syntax = self.Cabal-syntax_3_10_2_0;
25   } // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.2.5") {
26     # Use process core package when possible
27     process = self.process_1_6_18_0;
28   }));
30   # cabal-install needs most recent versions of Cabal and Cabal-syntax,
31   # so we need to put some extra work for non-latest GHCs
32   inherit (
33     let
34       # !!! Use cself/csuper inside for the actual overrides
35       cabalInstallOverlay = cself: csuper:
36         {
37           # Needs to be upgraded compared to Stackage LTS 21
38           cabal-install-solver = cself.cabal-install-solver_3_10_2_1;
39           # Needs to be downgraded compared to Stackage LTS 21
40           resolv = cself.resolv_0_1_2_0;
41         } // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.6") {
42           Cabal = cself.Cabal_3_10_2_1;
43           Cabal-syntax = cself.Cabal-syntax_3_10_2_0;
44         } // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.4") {
45           # We need at least directory >= 1.3.7.0. Using the latest version
46           # 1.3.8.* is not an option since it causes very annoying dependencies
47           # on newer versions of unix and filepath than GHC 9.2 ships
48           directory = cself.directory_1_3_7_1;
49           # GHC 9.2.5 starts shipping 1.6.16.0 which is required by
50           # cabal-install, but we need to recompile process even if the correct
51           # version is available to prevent inconsistent dependencies:
52           # process depends on directory.
53           process = cself.process_1_6_18_0;
55           # hspec < 2.10 depends on ghc (the library) directly which in turn
56           # depends on directory, causing a dependency conflict which is practically
57           # not solvable short of recompiling GHC. Instead of adding
58           # allowInconsistentDependencies for all reverse dependencies of hspec-core,
59           # just upgrade to an hspec version without the offending dependency.
60           hspec-core = cself.hspec-core_2_11_7;
61           hspec-discover = cself.hspec-discover_2_11_7;
62           hspec = cself.hspec_2_11_7;
64           # hspec-discover and hspec-core depend on hspec-meta for testing which
65           # we need to avoid since it depends on ghc as well. Since hspec*_2_11*
66           # are overridden to take the versioned attributes as inputs, we need
67           # to make sure to override the versioned attribute with this fix.
68           hspec-discover_2_11_7 = dontCheck csuper.hspec-discover_2_11_7;
70           # Prevent dependency on doctest which causes an inconsistent dependency
71           # due to depending on ghc which depends on directory etc.
72           vector = dontCheck csuper.vector;
73         };
74     in
75     {
76       cabal-install = super.cabal-install.overrideScope cabalInstallOverlay;
77       cabal-install-solver = super.cabal-install-solver.overrideScope cabalInstallOverlay;
79       # Needs cabal-install >= 3.8 /as well as/ matching Cabal
80       guardian =
81         lib.pipe
82           (super.guardian.overrideScope cabalInstallOverlay)
83           [
84             # Tests need internet access (run stack)
85             dontCheck
86             # May as well…
87             (self.generateOptparseApplicativeCompletions [ "guardian" ])
88           ];
89     }
90   ) cabal-install
91     cabal-install-solver
92     guardian
93   ;
95   #######################################
96   ### HASKELL-LANGUAGE-SERVER SECTION ###
97   #######################################
99   haskell-language-server = dontCheck (super.haskell-language-server.overrideScope (lself: lsuper: {
100     # For most ghc versions, we overrideScope Cabal in the configuration-ghc-???.nix,
101     # because some packages, like ormolu, need a newer Cabal version.
102     # ghc-paths is special because it depends on Cabal for building
103     # its Setup.hs, and therefor declares a Cabal dependency, but does
104     # not actually use it as a build dependency.
105     # That means ghc-paths can just use the ghc included Cabal version,
106     # without causing package-db incoherence and we should do that because
107     # otherwise we have different versions of ghc-paths
108     # around which have the same abi-hash, which can lead to confusions and conflicts.
109     ghc-paths = lsuper.ghc-paths.override { Cabal = null; };
110   }));
112   # hasn't bumped upper bounds
113   # test fails: "floskell-test: styles/base.md: openBinaryFile: does not exist (No such file or directory)"
114   # https://github.com/ennocramer/floskell/issues/48
115   floskell = dontCheck (doJailbreak super.floskell);
117   # 2023-04-03: https://github.com/haskell/haskell-language-server/issues/3546#issuecomment-1494139751
118   # There will probably be a new revision soon.
119   hls-brittany-plugin = assert super.hls-brittany-plugin.version == "1.1.0.0"; doJailbreak super.hls-brittany-plugin;
121   # For -f-auto see cabal.project in haskell-language-server.
122   ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (disableCabalFlag "auto" super.ghc-lib-parser-ex);
124   hiedb =
125     lib.pipe
126       super.hiedb
127       [
128         # hiedb-0.4.3.0 does not yet support algebraic-graphs-0.7.  This patch works
129         # around the issue.
130         # https://github.com/wz1000/HieDb/pull/44
131         (appendPatch
132           (pkgs.fetchpatch {
133             name = "hiedb-algebraic-graphs-0.7.patch";
134             url = "https://github.com/wz1000/HieDB/commit/4ac8e6735321872b9d5d15a9cac492add5555234.patch";
135             hash = "sha256-Iu+M8r+DrpoxUCG6yekgbW+GffoNjjRksnwUJ6jojhE=";
136           }))
137         # Patch does not actually bump the bound in the .cabal file.
138         doJailbreak
139       ];
141   ###########################################
142   ### END HASKELL-LANGUAGE-SERVER SECTION ###
143   ###########################################
145   # Test ldap server test/ldap.js is missing from sdist
146   # https://github.com/supki/ldap-client/issues/18
147   ldap-client-og = dontCheck super.ldap-client-og;
149   vector = overrideCabal (old: {
150     # Too strict bounds on doctest which isn't used, but is part of the configuration
151     jailbreak = true;
152     # vector-doctest seems to be broken when executed via ./Setup test
153     testTarget = lib.concatStringsSep " " [
154       "vector-tests-O0"
155       "vector-tests-O2"
156     ];
157   }) super.vector;
159   # Almost guaranteed failure due to floating point imprecision with QuickCheck-2.14.3
160   # https://github.com/haskell/math-functions/issues/73
161   math-functions = overrideCabal (drv: {
162     testFlags = drv.testFlags or [] ++ [ "-p" "! /Kahan.t_sum_shifted/" ];
163   }) super.math-functions;
165   # Too strict bounds on base
166   # https://github.com/lspitzner/butcher/issues/7#issuecomment-1681394943
167   butcher = doJailbreak super.butcher;
168   # https://github.com/lspitzner/data-tree-print/issues/4
169   data-tree-print = doJailbreak super.data-tree-print;
170   # … and template-haskell.
171   # https://github.com/lspitzner/czipwith/issues/5
172   czipwith = doJailbreak super.czipwith;
174   # Deal with infinite and NaN values generated by QuickCheck-2.14.3
175   aeson = overrideCabal {
176     # aeson's test suite includes some tests with big numbers that fail on 32bit
177     # https://github.com/haskell/aeson/issues/1060
178     doCheck = !pkgs.stdenv.hostPlatform.is32bit;
179   } (appendPatches [
180     (pkgs.fetchpatch {
181       name = "aeson-quickcheck-2.14.3-double-workaround.patch";
182       url = "https://github.com/haskell/aeson/commit/58766a1916b4980792763bab74f0c86e2a7ebf20.patch";
183       sha256 = "1jk2xyi9g6dfjsi6hvpvkpmag3ivimipwy1izpbidf3wvc9cixs3";
184     })
185   ] super.aeson);
187   # 2023-06-28: Test error: https://hydra.nixos.org/build/225565149
188   orbits = dontCheck super.orbits;
190   # Allow aeson == 2.1.*
191   # https://github.com/hdgarrood/aeson-better-errors/issues/23
192   aeson-better-errors = doJailbreak super.aeson-better-errors;
194   # 2023-08-09: Jailbreak because of vector < 0.13
195   # 2023-11-09: don't check because of https://github.com/tweag/monad-bayes/pull/326
196   monad-bayes = dontCheck (doJailbreak (super.monad-bayes.override {
197     hspec = self.hspec_2_11_7;
198   }));
200   # Disable tests failing on odd floating point numbers generated by QuickCheck 2.14.3
201   # https://github.com/haskell/statistics/issues/205
202   statistics = overrideCabal (drv: {
203     testFlags = [
204       "-p" "! (/Pearson correlation/ || /t_qr/ || /Tests for: FDistribution.1-CDF is correct/)"
205     ];
206   }) super.statistics;
208   # There are numerical tests on random data, that may fail occasionally
209   lapack = dontCheck super.lapack;
211   # fix tests failure for base≥4.15 (https://github.com/kim/leveldb-haskell/pull/41)
212   leveldb-haskell = appendPatch (fetchpatch {
213     url = "https://github.com/kim/leveldb-haskell/commit/f5249081f589233890ddb1945ec548ca9fb717cf.patch";
214     sha256 = "14gllipl28lqry73c5dnclsskzk1bsrrgazibl4lkl8z98j2csjb";
215   }) super.leveldb-haskell;
217   # Arion's test suite needs a Nixpkgs, which is cumbersome to do from Nixpkgs
218   # itself. For instance, pkgs.path has dirty sources and puts a huge .git in the
219   # store. Testing is done upstream.
220   arion-compose = dontCheck super.arion-compose;
222   # 2023-07-17: Outdated base bound https://github.com/srid/lvar/issues/5
223   lvar = doJailbreak super.lvar;
225   # This used to be a core package provided by GHC, but then the compiler
226   # dropped it. We define the name here to make sure that old packages which
227   # depend on this library still evaluate (even though they won't compile
228   # successfully with recent versions of the compiler).
229   bin-package-db = null;
231   # Unnecessarily requires alex >= 3.3
232   # https://github.com/glguy/config-value/commit/c5558c8258598fab686c259bff510cc1b19a0c50#commitcomment-119514821
233   config-value = doJailbreak super.config-value;
235   # path-io bound is adjusted in 0.6.1 release
236   # https://github.com/tek/hix/commit/019426f6a3db256e4c96558ffe6fa2114e2f19a0
237   hix = doJailbreak super.hix;
239   # waiting for release: https://github.com/jwiegley/c2hsc/issues/41
240   c2hsc = appendPatch (fetchpatch {
241     url = "https://github.com/jwiegley/c2hsc/commit/490ecab202e0de7fc995eedf744ad3cb408b53cc.patch";
242     sha256 = "1c7knpvxr7p8c159jkyk6w29653z5yzgjjqj11130bbb8mk9qhq7";
243   }) super.c2hsc;
245   # Some Hackage packages reference this attribute, which exists only in the
246   # GHCJS package set. We provide a dummy version here to fix potential
247   # evaluation errors.
248   ghcjs-base = null;
249   ghcjs-prim = null;
251   # 2023-04-17: https://gitlab.haskell.org/ghc/ghc-debug/-/issues/20
252   ghc-debug-brick = doJailbreak super.ghc-debug-brick;
254   # Needs older QuickCheck version
255   attoparsec-varword = dontCheck super.attoparsec-varword;
257   # These packages (and their reverse deps) cannot be built with profiling enabled.
258   ghc-heap-view = disableLibraryProfiling super.ghc-heap-view;
259   ghc-datasize = disableLibraryProfiling super.ghc-datasize;
260   ghc-vis = disableLibraryProfiling super.ghc-vis;
262   # Fixes compilation for basement on i686 for GHC >= 9.4
263   # https://github.com/haskell-foundation/foundation/pull/573
264   # Patch would not work for GHC >= 9.2 where it breaks compilation on x86_64
265   # https://github.com/haskell-foundation/foundation/pull/573#issuecomment-1669468867
266   # TODO(@sternenseemann): make unconditional
267   basement = appendPatches (lib.optionals pkgs.stdenv.hostPlatform.is32bit [
268     (fetchpatch {
269       name = "basement-i686-ghc-9.4.patch";
270       url = "https://github.com/haskell-foundation/foundation/pull/573/commits/38be2c93acb6f459d24ed6c626981c35ccf44095.patch";
271       sha256 = "17kz8glfim29vyhj8idw8bdh3id5sl9zaq18zzih3schfvyjppj7";
272       stripLen = 1;
273     })
274   ]) super.basement;
276   # Fixes compilation of memory with GHC >= 9.4 on 32bit platforms
277   # https://github.com/vincenthz/hs-memory/pull/99
278   memory = appendPatches (lib.optionals pkgs.stdenv.hostPlatform.is32bit [
279     (fetchpatch {
280       name = "memory-i686-ghc-9.4.patch";
281       url = "https://github.com/vincenthz/hs-memory/pull/99/commits/2738929ce15b4c8704bbbac24a08539b5d4bf30e.patch";
282       sha256 = "196rj83iq2k249132xsyhbbl81qi1j23h9pa6mmk6zvxpcf63yfw";
283     })
284   ]) super.memory;
286   # Waiting for the commit being fetched as a patch to get a release.
287   espial = appendPatch (fetchpatch {
288     url = "https://github.com/jonschoning/espial/commit/70375db7e245207b3572779288eade3252c4d9e3.patch";
289     sha256 = "sha256-fto8fdFbZkzn7dwCCsGw+j+5HSvEvyvU5VzYDn4F2G8=";
290     excludes = ["*.yaml" "*.lock" "*.json"];
291   }) super.espial;
293   # 2023-06-10: Too strict version bound on https://github.com/haskell/ThreadScope/issues/118
294   threadscope = doJailbreak super.threadscope;
296   # Overriding the version pandoc dependency uses as the latest release has version bounds
297   # defined as >= 3.1  && < 3.2, can be removed once pandoc gets bumped by Stackage.
298   patat = super.patat.override { pandoc = self.pandoc_3_1_9; };
300   # http2 also overridden in all-packages.nix for mailctl.
301   # twain is currently only used by mailctl, so the .overrideScope shouldn't
302   # negatively affect any other packages, at least currently...
303   twain = super.twain.overrideScope (self: _: { http2 = self.http2_3_0_3; });
305   # The latest release on hackage has an upper bound on containers which
306   # breaks the build, though it works with the version of containers present
307   # and the upper bound doesn't exist in code anymore:
308   # > https://github.com/roelvandijk/numerals
309   numerals = doJailbreak (dontCheck super.numerals);
311   # This test keeps being aborted because it runs too quietly for too long
312   Lazy-Pbkdf2 = if pkgs.stdenv.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2;
314   # check requires mysql server
315   mysql-simple = dontCheck super.mysql-simple;
316   mysql-haskell = dontCheck super.mysql-haskell;
318   # Test data missing
319   # https://github.com/FPtje/GLuaFixer/issues/165
320   glualint = dontCheck super.glualint;
322   # The Hackage tarball is purposefully broken, because it's not intended to be, like, useful.
323   # https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
324   git-annex = overrideCabal (drv: {
325     src = pkgs.fetchgit {
326       name = "git-annex-${super.git-annex.version}-src";
327       url = "git://git-annex.branchable.com/";
328       rev = "refs/tags/" + super.git-annex.version;
329       sha256 = "14x7avdvf0fjqncwxydlrv32lbyfiqrm346nvypzg27gq46fvkcg";
330       # delete android and Android directories which cause issues on
331       # darwin (case insensitive directory). Since we don't need them
332       # during the build process, we can delete it to prevent a hash
333       # mismatch on darwin.
334       postFetch = ''
335         rm -r $out/doc/?ndroid*
336       '';
337     };
339     # Git annex provides a restricted login shell. Setting
340     # passthru.shellPath here allows a user's login shell to be set to
341     # `git-annex-shell` by making `shell = haskellPackages.git-annex`.
342     # https://git-annex.branchable.com/git-annex-shell/
343     passthru.shellPath = "/bin/git-annex-shell";
344   }) (super.git-annex.overrideScope (self: _: {
345     # https://github.com/haskell-pkg-janitors/unix-compat/issues/3
346     unix-compat = self.unix-compat_0_6;
347   }));
349   # Too strict bounds on servant
350   # Pending a hackage revision: https://github.com/berberman/arch-web/commit/5d08afee5b25e644f9e2e2b95380a5d4f4aa81ea#commitcomment-89230555
351   arch-web = doJailbreak super.arch-web;
353   # Too strict upper bound on hedgehog
354   # https://github.com/circuithub/rel8/issues/248
355   rel8 = doJailbreak super.rel8;
357   # Fix test trying to access /home directory
358   shell-conduit = overrideCabal (drv: {
359     postPatch = "sed -i s/home/tmp/ test/Spec.hs";
360   }) super.shell-conduit;
362   # https://github.com/serokell/nixfmt/issues/130
363   nixfmt = doJailbreak super.nixfmt;
365   # Too strict upper bounds on turtle and text
366   # https://github.com/awakesecurity/nix-deploy/issues/35
367   nix-deploy = doJailbreak super.nix-deploy;
369   # Too strict upper bound on algebraic-graphs
370   # https://github.com/awakesecurity/nix-graph/issues/5
371   nix-graph = doJailbreak super.nix-graph;
373   cachix = self.generateOptparseApplicativeCompletions [ "cachix" ] super.cachix;
375   # https://github.com/froozen/kademlia/issues/2
376   kademlia = dontCheck super.kademlia;
378   # Tests require older versions of tasty.
379   hzk = dontCheck super.hzk;
380   resolv_0_1_2_0 = doJailbreak super.resolv_0_1_2_0;
382   # Too strict bounds on base{,-orphans}, template-haskell
383   # https://github.com/sebastiaanvisser/fclabels/issues/44
384   fclabels = doJailbreak super.fclabels;
386   # Tests require a Kafka broker running locally
387   haskakafka = dontCheck super.haskakafka;
389   bindings-levmar = addExtraLibrary pkgs.blas super.bindings-levmar;
391   # Requires wrapQtAppsHook
392   qtah-cpp-qt5 = overrideCabal (drv: {
393     buildDepends = [ pkgs.qt5.wrapQtAppsHook ];
394   }) super.qtah-cpp-qt5;
396   # The Haddock phase fails for one reason or another.
397   deepseq-magic = dontHaddock super.deepseq-magic;
398   feldspar-signal = dontHaddock super.feldspar-signal; # https://github.com/markus-git/feldspar-signal/issues/1
399   hoodle-core = dontHaddock super.hoodle-core;
400   hsc3-db = dontHaddock super.hsc3-db;
402   # Fix build with time >= 1.10 while retaining compat with time < 1.9
403   mbox = appendPatch ./patches/mbox-time-1.10.patch
404     (overrideCabal { editedCabalFile = null; revision = null; } super.mbox);
406   # https://github.com/techtangents/ablist/issues/1
407   ABList = dontCheck super.ABList;
409   inline-c-cpp = overrideCabal (drv: {
410     postPatch = (drv.postPatch or "") + ''
411       substituteInPlace inline-c-cpp.cabal --replace "-optc-std=c++11" ""
412     '';
413   }) super.inline-c-cpp;
415   inline-java = addBuildDepend pkgs.jdk super.inline-java;
417   # Upstream notified by e-mail.
418   permutation = dontCheck super.permutation;
420   # https://github.com/jputcu/serialport/issues/25
421   serialport = dontCheck super.serialport;
423   # Test suite depends on source code being available
424   simple-affine-space = dontCheck super.simple-affine-space;
426   # Fails no apparent reason. Upstream has been notified by e-mail.
427   assertions = dontCheck super.assertions;
429   # 2023-01-29: Restrictive base bound already loosened on master but not released: https://github.com/sebastiaanvisser/clay/commit/4483bdf7a452903f177220958f1610030ab7f28a
430   clay = throwIfNot (super.clay.version == "0.14.0") "Remove clay jailbreak in configuration-common.nix when you see this eval error." (doJailbreak super.clay);
432   # These packages try to execute non-existent external programs.
433   cmaes = dontCheck super.cmaes;                        # http://hydra.cryp.to/build/498725/log/raw
434   dbmigrations = dontCheck super.dbmigrations;
435   filestore = dontCheck super.filestore;
436   graceful = dontCheck super.graceful;
437   HList = dontCheck super.HList;
438   ide-backend = dontCheck super.ide-backend;
439   marquise = dontCheck super.marquise;                  # https://github.com/anchor/marquise/issues/69
440   memcached-binary = dontCheck super.memcached-binary;
441   msgpack-rpc = dontCheck super.msgpack-rpc;
442   persistent-zookeeper = dontCheck super.persistent-zookeeper;
443   pocket-dns = dontCheck super.pocket-dns;
444   postgresql-simple = dontCheck super.postgresql-simple;
445   squeal-postgresql = dontCheck super.squeal-postgresql;
446   postgrest-ws = dontCheck super.postgrest-ws;
447   snowball = dontCheck super.snowball;
448   sophia = dontCheck super.sophia;
449   test-sandbox = dontCheck super.test-sandbox;
450   texrunner = dontCheck super.texrunner;
451   users-postgresql-simple = dontCheck super.users-postgresql-simple;
452   wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
453   xkbcommon = dontCheck super.xkbcommon;
454   xmlgen = dontCheck super.xmlgen;
455   HerbiePlugin = dontCheck super.HerbiePlugin;
456   wai-cors = dontCheck super.wai-cors;
458   # 2022-01-29: Tests fail: https://github.com/psibi/streamly-bytestring/issues/27
459   # 2022-02-14: Strict upper bound: https://github.com/psibi/streamly-bytestring/issues/30
460   streamly-bytestring = dontCheck (doJailbreak super.streamly-bytestring);
462   # base bound
463   digit = doJailbreak super.digit;
465   # 2022-01-29: Tests require package to be in ghc-db.
466   aeson-schemas = dontCheck super.aeson-schemas;
468   # 2023-04-20: Restrictive bytestring bound in tests.
469   storablevector = doJailbreak super.storablevector;
471   # 2023-04-20: Pretends to need brick 1.6 but the commit history here
472   # https://github.com/matterhorn-chat/matterhorn/commits/master/matterhorn.cabal
473   # makes very clear that 1.4 is equally fine.
474   # Generally a slightly packaging hostile bound practice.
475   matterhorn = doJailbreak super.matterhorn;
477   # 2020-06-05: HACK: does not pass own build suite - `dontCheck`
478   # 2022-11-24: jailbreak as it has too strict bounds on a bunch of things
479   # 2023-07-26: Cherry-pick GHC 9.4 changes from hnix master branch
480   hnix = appendPatches [
481     ./patches/hnix-compat-for-ghc-9.4.patch
482   ] (dontCheck (doJailbreak super.hnix));
484   # Too strict bounds on algebraic-graphs and bytestring
485   # https://github.com/haskell-nix/hnix-store/issues/180
486   hnix-store-core = doJailbreak super.hnix-store-core;
487   hnix-store-core_0_6_1_0 = doDistribute (doJailbreak super.hnix-store-core_0_6_1_0);
489   # Fails for non-obvious reasons while attempting to use doctest.
490   focuslist = dontCheck super.focuslist;
491   search = dontCheck super.search;
493   # see https://github.com/LumiGuide/haskell-opencv/commit/cd613e200aa20887ded83256cf67d6903c207a60
494   opencv = dontCheck (appendPatch ./patches/opencv-fix-116.patch super.opencv);
495   opencv-extra = dontCheck (appendPatch ./patches/opencv-fix-116.patch super.opencv-extra);
497   # https://github.com/ekmett/structures/issues/3
498   structures = dontCheck super.structures;
500   # Requires alex >= 3.4
501   jacinda = super.jacinda.override { alex = self.alex_3_4_0_1; };
503   # Disable test suites to fix the build.
504   acme-year = dontCheck super.acme-year;                # http://hydra.cryp.to/build/497858/log/raw
505   aeson-lens = dontCheck super.aeson-lens;              # http://hydra.cryp.to/build/496769/log/raw
506   aeson-schema = dontCheck super.aeson-schema;          # https://github.com/timjb/aeson-schema/issues/9
507   angel = dontCheck super.angel;
508   apache-md5 = dontCheck super.apache-md5;              # http://hydra.cryp.to/build/498709/nixlog/1/raw
509   app-settings = dontCheck super.app-settings;          # http://hydra.cryp.to/build/497327/log/raw
510   aws-kinesis = dontCheck super.aws-kinesis;            # needs aws credentials for testing
511   binary-protocol = dontCheck super.binary-protocol;    # http://hydra.cryp.to/build/499749/log/raw
512   binary-search = dontCheck super.binary-search;
513   bloodhound = dontCheck super.bloodhound;              # https://github.com/plow-technologies/quickcheck-arbitrary-template/issues/10
514   buildwrapper = dontCheck super.buildwrapper;
515   burst-detection = dontCheck super.burst-detection;    # http://hydra.cryp.to/build/496948/log/raw
516   cabal-meta = dontCheck super.cabal-meta;              # http://hydra.cryp.to/build/497892/log/raw
517   camfort = dontCheck super.camfort;
518   cjk = dontCheck super.cjk;
519   CLI = dontCheck super.CLI;                            # Upstream has no issue tracker.
520   command-qq = dontCheck super.command-qq;              # http://hydra.cryp.to/build/499042/log/raw
521   conduit-connection = dontCheck super.conduit-connection;
522   craftwerk = dontCheck super.craftwerk;
523   crc = dontCheck super.crc;                            # https://github.com/MichaelXavier/crc/issues/2
524   css-text = dontCheck super.css-text;
525   damnpacket = dontCheck super.damnpacket;              # http://hydra.cryp.to/build/496923/log
526   data-hash = dontCheck super.data-hash;
527   Deadpan-DDP = dontCheck super.Deadpan-DDP;            # http://hydra.cryp.to/build/496418/log/raw
528   DigitalOcean = dontCheck super.DigitalOcean;
529   direct-sqlite = dontCheck super.direct-sqlite;
530   directory-layout = dontCheck super.directory-layout;
531   dlist = dontCheck super.dlist;
532   docopt = dontCheck super.docopt;                      # http://hydra.cryp.to/build/499172/log/raw
533   dom-selector = dontCheck super.dom-selector;          # http://hydra.cryp.to/build/497670/log/raw
534   dotenv = dontCheck super.dotenv;                      # Tests fail because of missing test file on version 0.8.0.2 fixed on version 0.8.0.4
535   dotfs = dontCheck super.dotfs;                        # http://hydra.cryp.to/build/498599/log/raw
536   DRBG = dontCheck super.DRBG;                          # http://hydra.cryp.to/build/498245/nixlog/1/raw
537   ed25519 = dontCheck super.ed25519;
538   etcd = dontCheck super.etcd;
539   fb = dontCheck super.fb;                              # needs credentials for Facebook
540   fptest = dontCheck super.fptest;                      # http://hydra.cryp.to/build/499124/log/raw
541   friday-juicypixels = dontCheck super.friday-juicypixels; #tarball missing test/rgba8.png
542   ghc-events-parallel = dontCheck super.ghc-events-parallel;    # http://hydra.cryp.to/build/496828/log/raw
543   ghc-imported-from = dontCheck super.ghc-imported-from;
544   ghc-parmake = dontCheck super.ghc-parmake;
545   git-vogue = dontCheck super.git-vogue;
546   github-rest = dontCheck super.github-rest;  # test suite needs the network
547   gitlib-cmdline = dontCheck super.gitlib-cmdline;
548   GLFW-b = dontCheck super.GLFW-b;                      # https://github.com/bsl/GLFW-b/issues/50
549   hackport = dontCheck super.hackport;
550   hadoop-formats = dontCheck super.hadoop-formats;
551   haeredes = dontCheck super.haeredes;
552   hashed-storage = dontCheck super.hashed-storage;
553   hashring = dontCheck super.hashring;
554   hath = dontCheck super.hath;
555   haxl = dontCheck super.haxl;                          # non-deterministic failure https://github.com/facebook/Haxl/issues/85
556   haxl-facebook = dontCheck super.haxl-facebook;        # needs facebook credentials for testing
557   hdbi-postgresql = dontCheck super.hdbi-postgresql;
558   hedis = dontCheck super.hedis;
559   hedis-pile = dontCheck super.hedis-pile;
560   hedis-tags = dontCheck super.hedis-tags;
561   hedn = dontCheck super.hedn;
562   hgdbmi = dontCheck super.hgdbmi;
563   hi = dontCheck super.hi;
564   hierarchical-clustering = dontCheck super.hierarchical-clustering;
565   hlibgit2 = disableHardening [ "format" ] super.hlibgit2;
566   hmatrix-tests = dontCheck super.hmatrix-tests;
567   hquery = dontCheck super.hquery;
568   hs2048 = dontCheck super.hs2048;
569   hsbencher = dontCheck super.hsbencher;
570   hsexif = dontCheck super.hsexif;
571   hspec-server = dontCheck super.hspec-server;
572   HTF = overrideCabal (orig: {
573     # The scripts in scripts/ are needed to build the test suite.
574     preBuild = "patchShebangs --build scripts";
575     # test suite doesn't compile with aeson >= 2.0
576     # https://github.com/skogsbaer/HTF/issues/114
577     doCheck = false;
578   }) super.HTF;
579   htsn = dontCheck super.htsn;
580   htsn-import = dontCheck super.htsn-import;
581   http-link-header = dontCheck super.http-link-header; # non deterministic failure https://hydra.nixos.org/build/75041105
582   influxdb = dontCheck super.influxdb;
583   integer-roots = dontCheck super.integer-roots; # requires an old version of smallcheck, will be fixed in > 1.0
584   itanium-abi = dontCheck super.itanium-abi;
585   katt = dontCheck super.katt;
586   language-slice = dontCheck super.language-slice;
588   # Group of libraries by same upstream maintainer for interacting with
589   # Telegram messenger. Bit-rotted a bit since 2020.
590   tdlib = appendPatch (fetchpatch {
591     # https://github.com/poscat0x04/tdlib/pull/3
592     url = "https://github.com/poscat0x04/tdlib/commit/8eb9ecbc98c65a715469fdb8b67793ab375eda31.patch";
593     hash = "sha256-vEI7fTsiafNGBBl4VUXVCClW6xKLi+iK53fjcubgkpc=";
594   }) (doJailbreak super.tdlib) ;
595   tdlib-types = doJailbreak super.tdlib-types;
596   tdlib-gen = doJailbreak super.tdlib-gen;
597   # https://github.com/poscat0x04/language-tl/pull/1
598   language-tl = doJailbreak super.language-tl;
600   ldap-client = dontCheck super.ldap-client;
601   lensref = dontCheck super.lensref;
602   lvmrun = disableHardening ["format"] (dontCheck super.lvmrun);
603   matplotlib = dontCheck super.matplotlib;
604   memcache = dontCheck super.memcache;
605   metrics = dontCheck super.metrics;
606   milena = dontCheck super.milena;
607   modular-arithmetic = dontCheck super.modular-arithmetic; # tests require a very old Glob (0.7.*)
608   nats-queue = dontCheck super.nats-queue;
609   netpbm = dontCheck super.netpbm;
610   network = dontCheck super.network;
611   network_2_6_3_1 = dontCheck super.network_2_6_3_1; # package is missing files for test
612   network-dbus = dontCheck super.network-dbus;
613   notcpp = dontCheck super.notcpp;
614   ntp-control = dontCheck super.ntp-control;
615   odpic-raw = dontCheck super.odpic-raw; # needs a running oracle database server
616   opaleye = dontCheck super.opaleye;
617   openpgp = dontCheck super.openpgp;
618   optional = dontCheck super.optional;
619   orgmode-parse = dontCheck super.orgmode-parse;
620   os-release = dontCheck super.os-release;
621   parameterized = dontCheck super.parameterized; # https://github.com/louispan/parameterized/issues/2
622   persistent-redis = dontCheck super.persistent-redis;
623   pipes-extra = dontCheck super.pipes-extra;
624   pipes-websockets = dontCheck super.pipes-websockets;
625   posix-pty = dontCheck super.posix-pty; # https://github.com/merijn/posix-pty/issues/12
626   postgresql-binary = dontCheck super.postgresql-binary; # needs a running postgresql server
627   postgresql-simple-migration = dontCheck super.postgresql-simple-migration;
628   powerdns = dontCheck super.powerdns; # Tests require networking and external services
629   process-streaming = dontCheck super.process-streaming;
630   punycode = dontCheck super.punycode;
631   pwstore-cli = dontCheck super.pwstore-cli;
632   quantities = dontCheck super.quantities;
633   redis-io = dontCheck super.redis-io;
634   rethinkdb = dontCheck super.rethinkdb;
635   Rlang-QQ = dontCheck super.Rlang-QQ;
636   safecopy = dontCheck super.safecopy;
637   sai-shape-syb = dontCheck super.sai-shape-syb;
638   saltine = dontCheck super.saltine; # https://github.com/tel/saltine/pull/56
639   scp-streams = dontCheck super.scp-streams;
640   sdl2 = dontCheck super.sdl2; # the test suite needs an x server
641   separated = dontCheck super.separated;
642   shadowsocks = dontCheck super.shadowsocks;
643   shake-language-c = dontCheck super.shake-language-c;
644   snap-core = doJailbreak (dontCheck super.snap-core); # attoparsec bound is too strict. This has been fixed on master
645   snap-server = doJailbreak super.snap-server; # attoparsec bound is too strict
646   sourcemap = dontCheck super.sourcemap;
647   static-resources = dontCheck super.static-resources;
648   strive = dontCheck super.strive;                      # fails its own hlint test with tons of warnings
649   svndump = dontCheck super.svndump;
650   tar = dontCheck super.tar; #https://hydra.nixos.org/build/25088435/nixlog/2 (fails only on 32-bit)
651   th-printf = dontCheck super.th-printf;
652   thumbnail-plus = dontCheck super.thumbnail-plus;
653   tickle = dontCheck super.tickle;
654   tpdb = dontCheck super.tpdb;
655   translatable-intset = dontCheck super.translatable-intset;
656   ua-parser = dontCheck super.ua-parser;
657   unagi-chan = dontCheck super.unagi-chan;
658   wai-logger = dontCheck super.wai-logger;
659   WebBits = dontCheck super.WebBits;                    # http://hydra.cryp.to/build/499604/log/raw
660   webdriver = dontCheck super.webdriver;
661   webdriver-angular = dontCheck super.webdriver-angular;
662   xsd = dontCheck super.xsd;
663   zip-archive = dontCheck super.zip-archive;  # https://github.com/jgm/zip-archive/issues/57
665   # 2023-06-26: Test failure: https://hydra.nixos.org/build/224869905
666   comfort-blas = dontCheck super.comfort-blas;
668   # 2022-06-26: Too strict lower bound on semialign.
669   trie-simple = doJailbreak super.trie-simple;
671   # These test suites run for ages, even on a fast machine. This is nuts.
672   Random123 = dontCheck super.Random123;
673   systemd = dontCheck super.systemd;
675   # https://github.com/eli-frey/cmdtheline/issues/28
676   cmdtheline = dontCheck super.cmdtheline;
678   # https://github.com/bos/snappy/issues/1
679   # https://github.com/bos/snappy/pull/10
680   snappy = appendPatches [
681     (pkgs.fetchpatch {
682       url = "https://github.com/bos/snappy/commit/8687802c0b85ed7fbbb1b1945a75f14fb9a9c886.patch";
683       sha256 = "sha256-p6rMzkjPAZVljsC1Ubj16/mNr4mq5JpxfP5xwT+Gt5M=";
684     })
685     (pkgs.fetchpatch {
686       url = "https://github.com/bos/snappy/commit/21c3250c1f3d273cdcf597e2b7909a22aeaa710f.patch";
687       sha256 = "sha256-qHEQ8FFagXGxvtblBvo7xivRARzXlaMLw8nt0068nt0=";
688     })
689   ] (dontCheck super.snappy);
691   # https://github.com/vincenthz/hs-crypto-pubkey/issues/20
692   crypto-pubkey = dontCheck super.crypto-pubkey;
694   # https://github.com/Philonous/xml-picklers/issues/5
695   xml-picklers = dontCheck super.xml-picklers;
697   # https://github.com/joeyadams/haskell-stm-delay/issues/3
698   stm-delay = dontCheck super.stm-delay;
700   # https://github.com/pixbi/duplo/issues/25
701   duplo = doJailbreak super.duplo;
703   # https://github.com/evanrinehart/mikmod/issues/1
704   mikmod = addExtraLibrary pkgs.libmikmod super.mikmod;
706   # Missing module.
707   rematch = dontCheck super.rematch;            # https://github.com/tcrayford/rematch/issues/5
708   rematch-text = dontCheck super.rematch-text;  # https://github.com/tcrayford/rematch/issues/6
710   # Package exists only to be example of documentation, yet it has restrictive
711   # "base" dependency.
712   haddock-cheatsheet = doJailbreak super.haddock-cheatsheet;
714   # no haddock since this is an umbrella package.
715   cloud-haskell = dontHaddock super.cloud-haskell;
717   # This packages compiles 4+ hours on a fast machine. That's just unreasonable.
718   CHXHtml = dontDistribute super.CHXHtml;
720   # https://github.com/NixOS/nixpkgs/issues/6350
721   paypal-adaptive-hoops = overrideCabal (drv: { testTarget = "local"; }) super.paypal-adaptive-hoops;
723   # Avoid "QuickCheck >=2.3 && <2.10" dependency we cannot fulfill in lts-11.x.
724   test-framework = dontCheck super.test-framework;
726   # Depends on broken test-framework-quickcheck.
727   apiary = dontCheck super.apiary;
728   apiary-authenticate = dontCheck super.apiary-authenticate;
729   apiary-clientsession = dontCheck super.apiary-clientsession;
730   apiary-cookie = dontCheck super.apiary-cookie;
731   apiary-eventsource = dontCheck super.apiary-eventsource;
732   apiary-logger = dontCheck super.apiary-logger;
733   apiary-memcached = dontCheck super.apiary-memcached;
734   apiary-mongoDB = dontCheck super.apiary-mongoDB;
735   apiary-persistent = dontCheck super.apiary-persistent;
736   apiary-purescript = dontCheck super.apiary-purescript;
737   apiary-session = dontCheck super.apiary-session;
738   apiary-websockets = dontCheck super.apiary-websockets;
740   # https://github.com/junjihashimoto/test-sandbox-compose/issues/2
741   test-sandbox-compose = dontCheck super.test-sandbox-compose;
743   # Test suite won't compile against tasty-hunit 0.10.x.
744   binary-parsers = dontCheck super.binary-parsers;
746   # https://github.com/ndmitchell/shake/issues/804
747   shake = dontCheck super.shake;
749   # https://github.com/nushio3/doctest-prop/issues/1
750   doctest-prop = dontCheck super.doctest-prop;
752   # Missing file in source distribution:
753   # - https://github.com/karun012/doctest-discover/issues/22
754   # - https://github.com/karun012/doctest-discover/issues/23
755   #
756   # When these are fixed the following needs to be enabled again:
757   #
758   # # Depends on itself for testing
759   # doctest-discover = addBuildTool super.doctest-discover
760   #   (if pkgs.stdenv.buildPlatform != pkgs.stdenv.hostPlatform
761   #    then self.buildHaskellPackages.doctest-discover
762   #    else dontCheck super.doctest-discover);
763   doctest-discover = dontCheck super.doctest-discover;
765   # Too strict lower bound on tasty-hedgehog
766   # https://github.com/qfpl/tasty-hedgehog/issues/70
767   tasty-sugar = doJailbreak super.tasty-sugar;
769   # Too strict lower bound on aeson
770   # https://github.com/input-output-hk/hedgehog-extras/issues/39
771   hedgehog-extras = doJailbreak super.hedgehog-extras;
773   # Known issue with nondeterministic test suite failure
774   # https://github.com/nomeata/tasty-expected-failure/issues/21
775   tasty-expected-failure = dontCheck super.tasty-expected-failure;
777   # Waiting on https://github.com/RaphaelJ/friday/pull/36
778   friday = doJailbreak super.friday;
780   # Won't compile with recent versions of QuickCheck.
781   inilist = dontCheck super.inilist;
783   # https://github.com/yaccz/saturnin/issues/3
784   Saturnin = dontCheck super.Saturnin;
786   # https://github.com/kkardzis/curlhs/issues/6
787   curlhs = dontCheck super.curlhs;
789   # curl 7.87.0 introduces a preprocessor typechecker of sorts which fails on
790   # incorrect usages of curl_easy_getopt and similar functions. Presumably
791   # because the wrappers in curlc.c don't use static values for the different
792   # arguments to curl_easy_getinfo, it complains and needs to be disabled.
793   # https://github.com/GaloisInc/curl/issues/28
794   curl = appendConfigureFlags [
795     "--ghc-option=-DCURL_DISABLE_TYPECHECK"
796   ] super.curl;
798   # https://github.com/hvr/token-bucket/issues/3
799   token-bucket = dontCheck super.token-bucket;
801   # https://github.com/alphaHeavy/lzma-enumerator/issues/3
802   lzma-enumerator = dontCheck super.lzma-enumerator;
804   # FPCO's fork of Cabal won't succeed its test suite.
805   Cabal-ide-backend = dontCheck super.Cabal-ide-backend;
807   # This package can't be built on non-Windows systems.
808   Win32 = overrideCabal (drv: { broken = !pkgs.stdenv.isCygwin; }) super.Win32;
809   inline-c-win32 = dontDistribute super.inline-c-win32;
810   Southpaw = dontDistribute super.Southpaw;
812   # https://ghc.haskell.org/trac/ghc/ticket/9825
813   vimus = overrideCabal (drv: { broken = pkgs.stdenv.isLinux && pkgs.stdenv.isi686; }) super.vimus;
815   # https://github.com/kazu-yamamoto/logger/issues/42
816   logger = dontCheck super.logger;
818   # vector dependency < 0.12
819   imagemagick = doJailbreak super.imagemagick;
821   # Elm is no longer actively maintained on Hackage: https://github.com/NixOS/nixpkgs/pull/9233.
822   Elm = markBroken super.Elm;
823   elm-build-lib = markBroken super.elm-build-lib;
824   elm-compiler = markBroken super.elm-compiler;
825   elm-get = markBroken super.elm-get;
826   elm-make = markBroken super.elm-make;
827   elm-package = markBroken super.elm-package;
828   elm-reactor = markBroken super.elm-reactor;
829   elm-repl = markBroken super.elm-repl;
830   elm-server = markBroken super.elm-server;
831   elm-yesod = markBroken super.elm-yesod;
833   # https://github.com/Euterpea/Euterpea2/issues/40
834   Euterpea = doJailbreak super.Euterpea;
836   # Install icons, metadata and cli program.
837   bustle = appendPatches [
838     # Fix build with libpcap 1.10.2
839     # https://gitlab.freedesktop.org/bustle/bustle/-/merge_requests/21
840     (pkgs.fetchpatch {
841       url = "https://gitlab.freedesktop.org/bustle/bustle/-/commit/77e2de892cd359f779c84739682431a66eb8cf31.patch";
842       hash = "sha256-sPb6/Z/ANids53aL9VsMHa/v5y+TA1ZY3jwAXlEH3Ec=";
843     })
844   ] (overrideCabal (drv: {
845     buildDepends = [ pkgs.libpcap ];
846     buildTools = with pkgs.buildPackages; [ gettext perl help2man ];
847     postInstall = ''
848       make install PREFIX=$out
849     '';
850   }) super.bustle);
852   # Byte-compile elisp code for Emacs.
853   ghc-mod = overrideCabal (drv: {
854     preCheck = "export HOME=$TMPDIR";
855     testToolDepends = drv.testToolDepends or [] ++ [self.cabal-install];
856     doCheck = false;            # https://github.com/kazu-yamamoto/ghc-mod/issues/335
857     executableToolDepends = drv.executableToolDepends or [] ++ [pkgs.buildPackages.emacs];
858     postInstall = ''
859       local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/*/${drv.pname}-${drv.version}/elisp" )
860       make -C $lispdir
861       mkdir -p $data/share/emacs/site-lisp
862       ln -s "$lispdir/"*.el{,c} $data/share/emacs/site-lisp/
863     '';
864   }) super.ghc-mod;
866   # Apply compatibility patches until a new release arrives
867   # https://github.com/phadej/spdx/issues/33
868   spdx = appendPatches [
869     (fetchpatch {
870       name = "spdx-ghc-9.4.patch";
871       url = "https://github.com/phadej/spdx/pull/30/commits/545dc69f433225c837375fba4cbbdb7f9cc7b09b.patch";
872       sha256 = "0p2h8dxkjy2v0dx7h6v62clmx5n5j3c4zh4myh926fijympi1glz";
873     })
874     (fetchpatch {
875       name = "spdx-ghc-9.6.patch";
876       url = "https://github.com/phadej/spdx/pull/32/commits/b51f665e9960614274ff6a9ac658802c1a785687.patch";
877       sha256 = "01vf1h0djr84yxsjfhym715ncx0w5q4l02k3dkbmg40pnc62ql4h";
878       excludes = [ ".github/**" ];
879     })
880   ] super.spdx;
882   # 2022-03-19: Testsuite is failing: https://github.com/puffnfresh/haskell-jwt/issues/2
883   jwt = dontCheck super.jwt;
885   # Build the latest git version instead of the official release. This isn't
886   # ideal, but Chris doesn't seem to make official releases any more.
887   structured-haskell-mode = overrideCabal (drv: {
888     src = pkgs.fetchFromGitHub {
889       owner = "projectional-haskell";
890       repo = "structured-haskell-mode";
891       rev = "7f9df73f45d107017c18ce4835bbc190dfe6782e";
892       sha256 = "1jcc30048j369jgsbbmkb63whs4wb37bq21jrm3r6ry22izndsqa";
893     };
894     version = "20170205-git";
895     editedCabalFile = null;
896     # Make elisp files available at a location where people expect it. We
897     # cannot easily byte-compile these files, unfortunately, because they
898     # depend on a new version of haskell-mode that we don't have yet.
899     postInstall = ''
900       local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/"*"/${drv.pname}-"*"/elisp" )
901       mkdir -p $data/share/emacs
902       ln -s $lispdir $data/share/emacs/site-lisp
903     '';
904   }) super.structured-haskell-mode;
906   # Make elisp files available at a location where people expect it.
907   hindent = (overrideCabal (drv: {
908     # We cannot easily byte-compile these files, unfortunately, because they
909     # depend on a new version of haskell-mode that we don't have yet.
910     postInstall = ''
911       local lispdir=( "$data/share/${self.ghc.targetPrefix}${self.ghc.haskellCompilerName}/"*"/${drv.pname}-"*"/elisp" )
912       mkdir -p $data/share/emacs
913       ln -s $lispdir $data/share/emacs/site-lisp
914     '';
915     doCheck = false; # https://github.com/chrisdone/hindent/issues/299
916   }) super.hindent);
918   # https://github.com/basvandijk/concurrent-extra/issues/12
919   concurrent-extra = dontCheck super.concurrent-extra;
921   # https://github.com/pxqr/base32-bytestring/issues/4
922   base32-bytestring = dontCheck super.base32-bytestring;
924   # Djinn's last release was 2014, incompatible with Semigroup-Monoid Proposal
925   # https://github.com/augustss/djinn/pull/8
926   djinn = appendPatch (fetchpatch {
927     url = "https://github.com/augustss/djinn/commit/6cb9433a137fb6b5194afe41d616bd8b62b95630.patch";
928     sha256 = "0s021y5nzrh74gfp8xpxpxm11ivzfs3jwg6mkrlyry3iy584xqil";
929   }) super.djinn;
931   # We cannot build this package w/o the C library from <http://www.phash.org/>.
932   phash = markBroken super.phash;
934   # https://github.com/Philonous/hs-stun/pull/1
935   # Remove if a version > 0.1.0.1 ever gets released.
936   stunclient = overrideCabal (drv: {
937     postPatch = (drv.postPatch or "") + ''
938       substituteInPlace source/Network/Stun/MappedAddress.hs --replace "import Network.Endian" ""
939     '';
940   }) super.stunclient;
942   d-bus = let
943     # The latest release on hackage is missing necessary patches for recent compilers
944     # https://github.com/Philonous/d-bus/issues/24
945     newer = overrideSrc {
946       version = "unstable-2021-01-08";
947       src = pkgs.fetchFromGitHub {
948         owner = "Philonous";
949         repo = "d-bus";
950         rev = "fb8a948a3b9d51db618454328dbe18fb1f313c70";
951         hash = "sha256-R7/+okb6t9DAkPVUV70QdYJW8vRcvBdz4zKJT13jb3A=";
952       };
953     } super.d-bus;
954   # Add now required extension on recent compilers.
955   # https://github.com/Philonous/d-bus/pull/23
956   in appendPatch (fetchpatch {
957     url = "https://github.com/Philonous/d-bus/commit/e5f37900a3a301c41d98bdaa134754894c705681.patch";
958     sha256 = "6rQ7H9t483sJe1x95yLPAZ0BKTaRjgqQvvrQv7HkJRE=";
959   }) newer;
961   # * The standard libraries are compiled separately.
962   # * We need a patch from master to fix compilation with
963   #   updated dependencies (haskeline and megaparsec) which can be
964   #   removed when the next idris release comes around.
965   idris = self.generateOptparseApplicativeCompletions [ "idris" ]
966     (appendPatch (fetchpatch {
967       name = "idris-libffi-0.2.patch";
968       url = "https://github.com/idris-lang/Idris-dev/commit/6d6017f906c5aa95594dba0fd75e7a512f87883a.patch";
969       hash = "sha256-wyLjqCyLh5quHMOwLM5/XjlhylVC7UuahAM79D8+uls=";
970     }) (doJailbreak (dontCheck super.idris)));
972   # Too strict bound on hspec
973   # https://github.com/lspitzner/multistate/issues/9#issuecomment-1367853016
974   multistate = doJailbreak super.multistate;
976   # https://github.com/pontarius/pontarius-xmpp/issues/105
977   pontarius-xmpp = dontCheck super.pontarius-xmpp;
979   # fails with sandbox
980   yi-keymap-vim = dontCheck super.yi-keymap-vim;
982   # https://github.com/bmillwood/applicative-quoters/issues/6
983   applicative-quoters = doJailbreak super.applicative-quoters;
985   # https://hydra.nixos.org/build/42769611/nixlog/1/raw
986   # note: the library is unmaintained, no upstream issue
987   dataenc = doJailbreak super.dataenc;
989   # horribly outdated (X11 interface changed a lot)
990   sindre = markBroken super.sindre;
992   # Test suite occasionally runs for 1+ days on Hydra.
993   distributed-process-tests = dontCheck super.distributed-process-tests;
995   # https://github.com/mulby/diff-parse/issues/9
996   diff-parse = doJailbreak super.diff-parse;
998   # No upstream issue tracker
999   hspec-expectations-pretty-diff = dontCheck super.hspec-expectations-pretty-diff;
1001   # Don't depend on chell-quickcheck, which doesn't compile due to restricting
1002   # QuickCheck to versions ">=2.3 && <2.9".
1003   system-filepath = dontCheck super.system-filepath;
1005   # The tests spuriously fail
1006   libmpd = dontCheck super.libmpd;
1008   # https://github.com/xu-hao/namespace/issues/1
1009   namespace = doJailbreak super.namespace;
1011   # https://github.com/danidiaz/streaming-eversion/issues/1
1012   streaming-eversion = dontCheck super.streaming-eversion;
1014   # https://github.com/danidiaz/tailfile-hinotify/issues/2
1015   tailfile-hinotify = doJailbreak (dontCheck super.tailfile-hinotify);
1017   # Test suite fails: https://github.com/lymar/hastache/issues/46.
1018   # Don't install internal mkReadme tool.
1019   hastache = overrideCabal (drv: {
1020     doCheck = false;
1021     postInstall = "rm $out/bin/mkReadme && rmdir $out/bin";
1022   }) super.hastache;
1024   # Has a dependency on outdated versions of directory.
1025   cautious-file = doJailbreak (dontCheck super.cautious-file);
1027   # missing dependencies: blaze-html >=0.5 && <0.9, blaze-markup >=0.5 && <0.8
1028   digestive-functors-blaze = doJailbreak super.digestive-functors-blaze;
1029   digestive-functors = doJailbreak super.digestive-functors;
1031   # Wrap the generated binaries to include their run-time dependencies in
1032   # $PATH. Also, cryptol needs a version of sbl that's newer than what we have
1033   # in LTS-13.x.
1034   cryptol = overrideCabal (drv: {
1035     buildTools = drv.buildTools or [] ++ [ pkgs.buildPackages.makeWrapper ];
1036     postInstall = drv.postInstall or "" + ''
1037       for b in $out/bin/cryptol $out/bin/cryptol-html; do
1038         wrapProgram $b --prefix 'PATH' ':' "${lib.getBin pkgs.z3}/bin"
1039       done
1040     '';
1041   }) super.cryptol;
1043   # Tests try to invoke external process and process == 1.4
1044   grakn = dontCheck (doJailbreak super.grakn);
1046   # test suite requires git and does a bunch of git operations
1047   restless-git = dontCheck super.restless-git;
1049   # patch out a flaky test that depends on output from hspec >= v2.11.7.
1050   # https://github.com/hspec/sensei/issues/125
1051   sensei = appendPatch (fetchpatch {
1052     url = "https://github.com/hspec/sensei/commit/5c11026fa48e13ea1c351ab882765eb0966f2e97.patch";
1053     hash = "sha256-eUCDvypj2bxTRnHLzrcembLMKHg5c3W3quNfclBDsso=";
1054   }) (overrideCabal (drv: {
1055     # sensei passes `-package hspec-meta` to GHC in the tests, but doesn't
1056     # depend on it itself.
1057     testHaskellDepends = drv.testHaskellDepends or [] ++ [ self.hspec-meta ];
1058     # requires git at test-time *and* runtime, but we'll just rely on users to
1059     # bring their own git at runtime.
1060     testToolDepends = drv.testToolDepends or [] ++ [ pkgs.git ];
1061   }) super.sensei);
1063   # Depends on broken fluid.
1064   fluid-idl-http-client = markBroken super.fluid-idl-http-client;
1065   fluid-idl-scotty = markBroken super.fluid-idl-scotty;
1067   # Work around https://github.com/haskell/c2hs/issues/192.
1068   c2hs = dontCheck super.c2hs;
1070   # Needs pginit to function and pgrep to verify.
1071   tmp-postgres = overrideCabal (drv: {
1072     # Flaky tests: https://github.com/jfischoff/tmp-postgres/issues/274
1073     doCheck = false;
1075     preCheck = ''
1076       export HOME="$TMPDIR"
1077     '' + (drv.preCheck or "");
1078     libraryToolDepends = drv.libraryToolDepends or [] ++ [pkgs.buildPackages.postgresql];
1079     testToolDepends = drv.testToolDepends or [] ++ [pkgs.procps];
1080   }) super.tmp-postgres;
1082   # Needs QuickCheck <2.10, which we don't have.
1083   edit-distance = doJailbreak super.edit-distance;
1084   int-cast = doJailbreak super.int-cast;
1086   # Needs QuickCheck <2.10, HUnit <1.6 and base <4.10
1087   pointfree = doJailbreak super.pointfree;
1089   # Needs tasty-quickcheck ==0.8.*, which we don't have.
1090   gitHUD = dontCheck super.gitHUD;
1091   githud = dontCheck super.githud;
1093   # Test suite fails due to trying to create directories
1094   path-io = dontCheck super.path-io;
1096   # Duplicate instance with smallcheck.
1097   store = dontCheck super.store;
1099   # With ghc-8.2.x haddock would time out for unknown reason
1100   # See https://github.com/haskell/haddock/issues/679
1101   language-puppet = dontHaddock super.language-puppet;
1103   # https://github.com/alphaHeavy/protobuf/issues/34
1104   protobuf = dontCheck super.protobuf;
1106   # jailbreak tasty < 1.2 until servant-docs > 0.11.3 is on hackage.
1107   snap-templates = doJailbreak super.snap-templates; # https://github.com/snapframework/snap-templates/issues/22
1109   # The test suite does not know how to find the 'alex' binary.
1110   alex = overrideCabal (drv: {
1111     testSystemDepends = (drv.testSystemDepends or []) ++ [pkgs.which];
1112     preCheck = ''export PATH="$PWD/dist/build/alex:$PATH"'';
1113   }) super.alex;
1115   # 2023-07-14: Restrictive upper bounds: https://github.com/luke-clifton/shh/issues/76
1116   shh = doJailbreak super.shh;
1117   shh-extras = doJailbreak super.shh-extras;
1119   # This package refers to the wrong library (itself in fact!)
1120   vulkan = super.vulkan.override { vulkan = pkgs.vulkan-loader; };
1122   # Compiles some C or C++ source which requires these headers
1123   VulkanMemoryAllocator = addExtraLibrary pkgs.vulkan-headers super.VulkanMemoryAllocator;
1124   # dontCheck can be removed on the next package set bump
1125   vulkan-utils = dontCheck (addExtraLibrary pkgs.vulkan-headers super.vulkan-utils);
1127   # https://github.com/dmwit/encoding/pull/3
1128   encoding = doJailbreak (appendPatch ./patches/encoding-Cabal-2.0.patch super.encoding);
1130   # Work around overspecified constraint on github ==0.18.
1131   github-backup = doJailbreak super.github-backup;
1133   # dontCheck: https://github.com/haskell-servant/servant-auth/issues/113
1134   servant-auth-client = dontCheck super.servant-auth-client;
1135   # Allow lens-aeson >= 1.2 https://github.com/haskell-servant/servant/issues/1703
1136   servant-auth-server = doJailbreak super.servant-auth-server;
1137   # Allow hspec >= 2.10 https://github.com/haskell-servant/servant/issues/1704
1138   servant-foreign = doJailbreak super.servant-foreign;
1140   # Generate cli completions for dhall.
1141   dhall = self.generateOptparseApplicativeCompletions [ "dhall" ] super.dhall;
1142   # For reasons that are not quire clear 'dhall-json' won't compile without 'tasty 1.4' due to its tests
1143   # https://github.com/commercialhaskell/stackage/issues/5795
1144   # This issue can be mitigated with 'dontCheck' which skips the tests and their compilation.
1145   dhall-json = self.generateOptparseApplicativeCompletions ["dhall-to-json" "dhall-to-yaml"] (dontCheck super.dhall-json);
1146   dhall-nix = self.generateOptparseApplicativeCompletions [ "dhall-to-nix" ]
1147     (overrideCabal (drv: {
1148       patches = [
1149         # Compatibility with hnix 0.16, waiting for release
1150         # https://github.com/dhall-lang/dhall-haskell/pull/2474
1151         (pkgs.fetchpatch {
1152           name = "dhall-nix-hnix-0.16.patch";
1153           url = "https://github.com/dhall-lang/dhall-haskell/commit/49b9b3e3ce1718a89773c2b1bfa3c2af1a6e8752.patch";
1154           sha256 = "12sh5md81nlhyzzkmf7jrll3w1rvg2j48m57hfyvjn8has9c4gw6";
1155           stripLen = 1;
1156           includes = [ "dhall-nix.cabal" "src/Dhall/Nix.hs" ];
1157         })
1158       ] ++ drv.patches or [];
1159       prePatch = drv.prePatch or "" + ''
1160         ${pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
1161       '';
1162     }) super.dhall-nix);
1163   dhall-yaml = self.generateOptparseApplicativeCompletions ["dhall-to-yaml-ng" "yaml-to-dhall"] super.dhall-yaml;
1164   dhall-nixpkgs = self.generateOptparseApplicativeCompletions [ "dhall-to-nixpkgs" ]
1165     (overrideCabal (drv: {
1166       # Allow hnix 0.16, needs unreleased bounds change
1167       # https://github.com/dhall-lang/dhall-haskell/pull/2474
1168       jailbreak = assert drv.version == "1.0.9" && drv.revision == "1"; true;
1169     }) super.dhall-nixpkgs);
1171   crypton-connection = super.crypton-connection.override {
1172     # requires tls >= 1.7
1173     tls = self.tls_1_9_0;
1174   };
1176   stack =
1177     lib.pipe
1178       super.stack
1179       [
1180         (self.generateOptparseApplicativeCompletions [ "stack" ])
1182         # stack-2.13.1 requires a bunch of the latest packages.
1183         (drv: drv.overrideScope (hfinal: hprev: {
1184           ansi-terminal = hprev.ansi-terminal_1_0; # needs ansi-terminal >= 1.0
1185           crypton = hprev.crypton_0_34; # needs crypton >= 0.33
1186           hedgehog = doJailbreak hprev.hedgehog; # has too strict version bound for ansi-terminal
1187           hpack = hprev.hpack_0_36_0; # needs hpack == 0.36.0
1188           http-client-tls = hprev.http-client-tls_0_3_6_3; # needs http-client-tls >= 0.3.6.2
1189           http-download = dontCheck hprev.http-download_0_2_1_0; # needs http-download >= 0.2.1.0, tests access network
1190           optparse-applicative = hprev.optparse-applicative_0_18_1_0; # needs optparse-applicative >= 0.18.1.0
1191           pantry = dontCheck hprev.pantry_0_9_2; # needs pantry >= 0.9.2, tests access network
1192           syb = dontCheck hprev.syb; # cyclic dependencies
1193           tar-conduit = hprev.tar-conduit_0_4_0; # pantry needs tar-conduit >= 0.4.0
1194           temporary = dontCheck hprev.temporary; # cyclic dependencies
1195         }))
1196       ];
1198   # musl fixes
1199   # dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test
1200   unix-time = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.unix-time else super.unix-time;
1202   # Workaround for https://github.com/sol/hpack/issues/528
1203   # The hpack test suite can't deal with the CRLF line endings hackage revisions insert
1204   hpack = overrideCabal (drv: {
1205     postPatch = drv.postPatch or "" + ''
1206       "${lib.getBin pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
1207     '';
1208   }) super.hpack;
1210   # hslua has tests that break when using musl.
1211   # https://github.com/hslua/hslua/issues/106
1212   hslua-core = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.hslua-core else super.hslua-core;
1214   # Missing files required by the test suite.
1215   # https://github.com/deemp/flakes/issues/4
1216   lima = dontCheck super.lima;
1218   # The test suite runs for 20+ minutes on a very fast machine, which feels kinda disproportionate.
1219   prettyprinter = dontCheck super.prettyprinter;
1221   # Fix with Cabal 2.2, https://github.com/guillaume-nargeot/hpc-coveralls/pull/73
1222   hpc-coveralls = appendPatch (fetchpatch {
1223     url = "https://github.com/guillaume-nargeot/hpc-coveralls/pull/73/commits/344217f513b7adfb9037f73026f5d928be98d07f.patch";
1224     sha256 = "056rk58v9h114mjx62f41x971xn9p3nhsazcf9zrcyxh1ymrdm8j";
1225   }) super.hpc-coveralls;
1227   # sexpr is old, broken and has no issue-tracker. Let's fix it the best we can.
1228   sexpr = appendPatch ./patches/sexpr-0.2.1.patch
1229     (overrideCabal (drv: {
1230       isExecutable = false;
1231       libraryHaskellDepends = drv.libraryHaskellDepends ++ [self.QuickCheck];
1232     }) super.sexpr);
1234   # https://github.com/haskell/hoopl/issues/50
1235   hoopl = dontCheck super.hoopl;
1237   # Generate shell completion for spago
1238   spago = self.generateOptparseApplicativeCompletions [ "spago" ] super.spago;
1240   # https://github.com/DanielG/cabal-helper/pull/123
1241   cabal-helper = doJailbreak super.cabal-helper;
1243   # TODO(Profpatsch): factor out local nix store setup from
1244   # lib/tests/release.nix and use that for the tests of libnix
1245   # libnix = overrideCabal (old: {
1246   #   testToolDepends = old.testToolDepends or [] ++ [ pkgs.nix ];
1247   # }) super.libnix;
1248   libnix = dontCheck super.libnix;
1250   # dontCheck: The test suite tries to mess with ALSA, which doesn't work in the build sandbox.
1251   xmobar = dontCheck super.xmobar;
1253   # https://github.com/mgajda/json-autotype/issues/25
1254   json-autotype = dontCheck super.json-autotype;
1256   # Requires pg_ctl command during tests
1257   beam-postgres = overrideCabal (drv: {
1258     # https://github.com/NixOS/nixpkgs/issues/198495
1259     doCheck = pkgs.postgresql.doCheck;
1260     testToolDepends = (drv.testToolDepends or []) ++ [pkgs.postgresql];
1261   }) super.beam-postgres;
1263   # Fix for base >= 4.11
1264   scat = overrideCabal (drv: {
1265     patches = [(fetchpatch {
1266       url    = "https://github.com/redelmann/scat/pull/6.diff";
1267       sha256 = "07nj2p0kg05livhgp1hkkdph0j0a6lb216f8x348qjasy0lzbfhl";
1268     })];
1269   }) super.scat;
1271   # Fix build with attr-2.4.48 (see #53716)
1272   xattr = appendPatch ./patches/xattr-fix-build.patch super.xattr;
1274   patch = dontCheck super.patch;
1276   esqueleto =
1277     overrideCabal
1278       (drv: {
1279         postPatch = drv.postPatch or "" + ''
1280           # patch out TCP usage: https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook-tcp
1281           sed -i test/PostgreSQL/Test.hs \
1282             -e s^host=localhost^^
1283         '';
1284         # https://github.com/NixOS/nixpkgs/issues/198495
1285         doCheck = pkgs.postgresql.doCheck;
1286         # Match the test suite defaults (or hardcoded values?)
1287         preCheck = drv.preCheck or "" + ''
1288           PGUSER=esqutest
1289           PGDATABASE=esqutest
1290         '';
1291         testFlags = drv.testFlags or [] ++ [
1292           # We don't have a MySQL test hook yet
1293           "--skip=/Esqueleto/MySQL"
1294         ];
1295         testToolDepends = drv.testToolDepends or [] ++ [
1296           pkgs.postgresql
1297           pkgs.postgresqlTestHook
1298         ];
1299       })
1300       super.esqueleto;
1302   # Requires API keys to run tests
1303   algolia = dontCheck super.algolia;
1304   openai-hs = dontCheck super.openai-hs;
1306   # antiope-s3's latest stackage version has a hspec < 2.6 requirement, but
1307   # hspec which isn't in stackage is already past that
1308   antiope-s3 = doJailbreak super.antiope-s3;
1310   # Has tasty < 1.2 requirement, but works just fine with 1.2
1311   temporary-resourcet = doJailbreak super.temporary-resourcet;
1313   # Test suite doesn't work with current QuickCheck
1314   # https://github.com/pruvisto/heap/issues/11
1315   heap = dontCheck super.heap;
1317   # Test suite won't link for no apparent reason.
1318   constraints-deriving = dontCheck super.constraints-deriving;
1320   # https://github.com/elliottt/hsopenid/issues/15
1321   openid = markBroken super.openid;
1323   # https://github.com/erikd/hjsmin/issues/32
1324   hjsmin = dontCheck super.hjsmin;
1326   # too strict bounds on text in the test suite
1327   # https://github.com/audreyt/string-qq/pull/3
1328   string-qq = doJailbreak super.string-qq;
1330   # Remove for hail > 0.2.0.0
1331   hail = overrideCabal (drv: {
1332     patches = [
1333       (fetchpatch {
1334         # Relax dependency constraints,
1335         # upstream PR: https://github.com/james-preston/hail/pull/13
1336         url = "https://patch-diff.githubusercontent.com/raw/james-preston/hail/pull/13.patch";
1337         sha256 = "039p5mqgicbhld2z44cbvsmam3pz0py3ybaifwrjsn1y69ldsmkx";
1338       })
1339       (fetchpatch {
1340         # Relax dependency constraints,
1341         # upstream PR: https://github.com/james-preston/hail/pull/16
1342         url = "https://patch-diff.githubusercontent.com/raw/james-preston/hail/pull/16.patch";
1343         sha256 = "0dpagpn654zjrlklihsg911lmxjj8msylbm3c68xa5aad1s9gcf7";
1344       })
1345     ];
1346   }) super.hail;
1348   # https://github.com/kazu-yamamoto/dns/issues/150
1349   dns = dontCheck super.dns;
1351   # https://github.com/haskell-servant/servant-ekg/issues/15
1352   servant-ekg = doJailbreak super.servant-ekg;
1354   # the test suite has an overly tight restriction on doctest
1355   # See https://github.com/ekmett/perhaps/pull/5
1356   perhaps = doJailbreak super.perhaps;
1358   # it wants to build a statically linked binary by default
1359   hledger-flow = overrideCabal (drv: {
1360     postPatch = (drv.postPatch or "") + ''
1361       substituteInPlace hledger-flow.cabal --replace "-static" ""
1362     '';
1363   }) super.hledger-flow;
1365   # Chart-tests needs and compiles some modules from Chart itself
1366   Chart-tests = overrideCabal (old: {
1367     # https://github.com/timbod7/haskell-chart/issues/233
1368     jailbreak = true;
1369     preCheck = old.preCheck or "" + ''
1370       tar --one-top-level=../chart --strip-components=1 -xf ${self.Chart.src}
1371     '';
1372   }) (addExtraLibrary self.QuickCheck super.Chart-tests);
1374   # This breaks because of version bounds, but compiles and runs fine.
1375   # Last commit is 5 years ago, so we likely won't get upstream fixed soon.
1376   # https://bitbucket.org/rvlm/hakyll-contrib-hyphenation/src/master/
1377   # Therefore we jailbreak it.
1378   hakyll-contrib-hyphenation = doJailbreak super.hakyll-contrib-hyphenation;
1379   # 2021-10-04: too strict upper bound on Hakyll
1380   hakyll-filestore = doJailbreak super.hakyll-filestore;
1382   # The test suite depends on an impure cabal-install installation in
1383   # $HOME, which we don't have in our build sandbox.
1384   # 2022-08-31: Jailbreak is done to allow aeson 2.0.*:
1385   # https://github.com/haskell-CI/haskell-ci/commit/6ad0d5d701cbe101013335d597acaf5feadd3ab9#r82681900
1386   cabal-install-parsers = doJailbreak (dontCheck (super.cabal-install-parsers.override {
1387     Cabal-syntax = self.Cabal-syntax_3_10_2_0;
1388   }));
1390   # Test suite requires database
1391   persistent-mysql = dontCheck super.persistent-mysql;
1392   persistent-postgresql =
1393     # TODO: move this override to configuration-nix.nix
1394     overrideCabal
1395       (drv: {
1396         postPatch = drv.postPath or "" + ''
1397           # patch out TCP usage: https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook-tcp
1398           # NOTE: upstream host variable takes only two values...
1399           sed -i test/PgInit.hs \
1400             -e s^'host=" <> host <> "'^^
1401         '';
1402         doCheck =
1403           # https://github.com/commercialhaskell/stackage/issues/6884
1404           # persistent-postgresql-2.13.5.1 needs persistent-test >= 2.13.1.3 which
1405           # is incompatible with the stackage version of persistent, so the tests
1406           # are disabled temporarily.
1407           false
1408           # https://github.com/NixOS/nixpkgs/issues/198495
1409           && pkgs.postgresql.doCheck;
1410         preCheck = drv.preCheck or "" + ''
1411           PGDATABASE=test
1412           PGUSER=test
1413         '';
1414         testToolDepends = drv.testToolDepends or [] ++ [
1415           pkgs.postgresql
1416           pkgs.postgresqlTestHook
1417         ];
1418       })
1419       super.persistent-postgresql;
1421   # Test suite requires a later version of persistent-test which depends on persistent 2.14
1422   # https://github.com/commercialhaskell/stackage/issues/6884
1423   persistent-sqlite = dontCheck super.persistent-sqlite;
1425   # 2021-12-26: Too strict bounds on doctest
1426   polysemy-plugin = doJailbreak super.polysemy-plugin;
1428   # hasn’t bumped upper bounds
1429   # upstream: https://github.com/obsidiansystems/which/pull/6
1430   which = doJailbreak super.which;
1432   dhall-lsp-server =
1433     # 2022-09-20: We have overridden lsp to not be the stackage version.
1434     # dhall-lsp-server needs the older 1.4.0.0 lsp
1435     let overridden-dhall-lsp-server = super.dhall-lsp-server.override {
1436           lsp = dontCheck (super.lsp_1_4_0_0.override {
1437             lsp-types = super.lsp-types_1_4_0_1;
1438           });
1439         };
1440     in appendPatch (fetchpatch {
1441       # This patch can be removed once the change question is in a tracked release.
1442       url = "https://github.com/dhall-lang/dhall-haskell/pull/2539/commits/5dd0f0ba2d836fea3ef499c7aed04e83269c203f.patch";
1443       sha256 = "sha256-xjVuLDBptDGfTf7MVmPb0WuuFWRLpgDYX2ybbgjAjzs=";
1444       relative = "dhall-lsp-server";
1445     }) overridden-dhall-lsp-server;
1447   # 2022-03-16: lens bound can be loosened https://github.com/ghcjs/jsaddle-dom/issues/19
1448   jsaddle-dom = overrideCabal (old: {
1449     postPatch = old.postPatch or "" + ''
1450       sed -i 's/lens.*4.20/lens/' jsaddle-dom.cabal
1451     '';
1452   }) (doJailbreak super.jsaddle-dom);
1454   # Tests disabled and broken override needed because of missing lib chrome-test-utils: https://github.com/reflex-frp/reflex-dom/issues/392
1455   # 2022-03-16: Pullrequest for ghc 9 compat https://github.com/reflex-frp/reflex-dom/pull/433
1456   reflex-dom-core = overrideCabal (old: {
1457     postPatch = old.postPatch or "" + ''
1458       sed -i 's/template-haskell.*2.17/template-haskell/' reflex-dom-core.cabal
1459       sed -i 's/semialign.*1.3/semialign/' reflex-dom-core.cabal
1460       sed -i 's/these.*0.9/these/' reflex-dom-core.cabal
1461     '';
1462     })
1463     ((appendPatches [
1464       (fetchpatch {
1465         url = "https://github.com/reflex-frp/reflex-dom/commit/1814640a14c6c30b1b2299e74d08fb6fcaadfb94.patch";
1466         sha256 = "sha256-QyX2MLd7Tk0M1s0DU0UV3szXs8ngz775i3+KI62Q3B8=";
1467         relative = "reflex-dom-core";
1468       })
1469       (fetchpatch {
1470         url = "https://github.com/reflex-frp/reflex-dom/commit/56fa8a484ccfc7d3365d07fea3caa430155dbcac.patch";
1471         sha256 = "sha256-IogAYJZac17Bg99ZnnFX/7I44DAnHo2PRBWD0iVHbNA=";
1472         relative = "reflex-dom-core";
1473       })
1474     ]
1475           (doDistribute (unmarkBroken (dontCheck (doJailbreak super.reflex-dom-core))))));
1477   # Tests disabled because they assume to run in the whole jsaddle repo and not the hackage tarball of jsaddle-warp.
1478   jsaddle-warp = dontCheck super.jsaddle-warp;
1480   # 2020-06-24: Jailbreaking because of restrictive test dep bounds
1481   # Upstream issue: https://github.com/kowainik/trial/issues/62
1482   trial = doJailbreak super.trial;
1484   # 2020-06-24: Tests are broken in hackage distribution.
1485   # See: https://github.com/robstewart57/rdf4h/issues/39
1486   rdf4h = dontCheck super.rdf4h;
1488   # hasn't bumped upper bounds
1489   # test fails because of a "Warning: Unused LANGUAGE pragma"
1490   # https://github.com/ennocramer/monad-dijkstra/issues/4
1491   monad-dijkstra = dontCheck super.monad-dijkstra;
1493   # Fixed upstream but not released to Hackage yet:
1494   # https://github.com/k0001/hs-libsodium/issues/2
1495   libsodium = overrideCabal (drv: {
1496     libraryToolDepends = (drv.libraryToolDepends or []) ++ [self.buildHaskellPackages.c2hs];
1497   }) super.libsodium;
1499   svgcairo = appendPatches [
1500     # Remove when https://github.com/gtk2hs/svgcairo/pull/12 goes in.
1501     (fetchpatch {
1502       url = "https://github.com/gtk2hs/svgcairo/commit/348c60b99c284557a522baaf47db69322a0a8b67.patch";
1503       sha256 = "0akhq6klmykvqd5wsbdfnnl309f80ds19zgq06sh1mmggi54dnf3";
1504     })
1505     # Remove when https://github.com/gtk2hs/svgcairo/pull/13 goes in.
1506     (fetchpatch {
1507       url = "https://github.com/dalpd/svgcairo/commit/d1e0d7ae04c1edca83d5b782e464524cdda6ae85.patch";
1508       sha256 = "1pq9ld9z67zsxj8vqjf82qwckcp69lvvnrjb7wsyb5jc6jaj3q0a";
1509     })
1510   ] super.svgcairo;
1512   # Upstream PR: https://github.com/jkff/splot/pull/9
1513   splot = appendPatch (fetchpatch {
1514     url = "https://github.com/jkff/splot/commit/a6710b05470d25cb5373481cf1cfc1febd686407.patch";
1515     sha256 = "1c5ck2ibag2gcyag6rjivmlwdlp5k0dmr8nhk7wlkzq2vh7zgw63";
1516   }) super.splot;
1518   # Fix build with newer monad-logger: https://github.com/obsidiansystems/monad-logger-extras/pull/5
1519   monad-logger-extras = appendPatch (fetchpatch {
1520     url = "https://github.com/obsidiansystems/monad-logger-extras/commit/55d414352e740a5ecacf313732074d9b4cf2a6b3.patch";
1521     sha256 = "sha256-xsQbr/QIrgWR0uwDPtV0NRTbVvP0tR9bY9NMe1JzqOw=";
1522   }) super.monad-logger-extras;
1524   # Fails with encoding problems, likely needs locale data.
1525   # Test can be executed by adding which to testToolDepends and
1526   # $PWD/dist/build/haskeline-examples-Test to $PATH.
1527   haskeline_0_8_2_1 = doDistribute (dontCheck super.haskeline_0_8_2_1);
1529   # Too strict upper bound on HTF
1530   # https://github.com/nikita-volkov/stm-containers/issues/29
1531   stm-containers = doJailbreak super.stm-containers;
1533   # Test suite fails to compile https://github.com/agrafix/Spock/issues/177
1534   Spock = dontCheck super.Spock;
1536   # https://github.com/strake/filtrable.hs/issues/6
1537   filtrable = doJailbreak super.filtrable;
1539   # hasura packages need some extra care
1540   graphql-engine = overrideCabal (drv: {
1541     patches = [
1542       # Compat with unordered-containers >= 0.2.15.0
1543       (fetchpatch {
1544         name = "hasura-graphql-engine-updated-deps.patch";
1545         url = "https://github.com/hasura/graphql-engine/commit/d50aae87a58794bc1fc66c7a60acb0c34b5e70c7.patch";
1546         stripLen = 1;
1547         excludes = [ "cabal.project.freeze" ];
1548         sha256 = "0lb5l9vfynr85i9xs53w4mpgczp04ncxz7846n3y91ri34fa87v3";
1549       })
1550       # Compat with hashable >= 1.3.4.0
1551       (fetchpatch {
1552         name = "hasura-graphql-engine-hashable-1.3.4.0.patch";
1553         url = "https://github.com/hasura/graphql-engine/commit/e48b2287315fb09005ffd52c0a686dc321171ae2.patch";
1554         sha256 = "1jppnanmsyl8npyf59s0d8bgjy7bq50vkh5zx4888jy6jqh27jb6";
1555         stripLen = 1;
1556       })
1557       # Compat with unordered-containers >= 0.2.17.0
1558       (fetchpatch {
1559         name = "hasura-graphql-engine-unordered-containers-0.2.17.0.patch";
1560         url = "https://github.com/hasura/graphql-engine/commit/3a1eb3128a2ded2da7c5fef089738890828cce03.patch";
1561         sha256 = "0vz7s8m8mjvv728vm4q0dvvrirvydaw7xks30b5ddj9f6a72a2f1";
1562         stripLen = 1;
1563       })
1564     ];
1565     doHaddock = false;
1566     version = "2.3.1";
1567   }) (super.graphql-engine.override {
1568     immortal = self.immortal_0_2_2_1;
1569     resource-pool = self.hasura-resource-pool;
1570     ekg-core = self.hasura-ekg-core;
1571     ekg-json = self.hasura-ekg-json;
1572   });
1573   hasura-ekg-json = super.hasura-ekg-json.override {
1574     ekg-core = self.hasura-ekg-core;
1575   };
1576   pg-client = overrideCabal (drv: {
1577     librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ];
1578     testToolDepends = drv.testToolDepends or [] ++ [
1579       pkgs.postgresql pkgs.postgresqlTestHook
1580     ];
1581     # https://github.com/NixOS/nixpkgs/issues/198495
1582     doCheck = pkgs.postgresql.doCheck;
1583     preCheck = drv.preCheck or "" + ''
1584       # empty string means use default connection
1585       export DATABASE_URL=""
1586     '';
1587   }) (super.pg-client.override {
1588     resource-pool = self.hasura-resource-pool;
1589     ekg-core = self.hasura-ekg-core;
1590   });
1592   hcoord = overrideCabal (drv: {
1593     # Remove when https://github.com/danfran/hcoord/pull/8 is merged.
1594     patches = [
1595       (fetchpatch {
1596         url = "https://github.com/danfran/hcoord/pull/8/commits/762738b9e4284139f5c21f553667a9975bad688e.patch";
1597         sha256 = "03r4jg9a6xh7w3jz3g4bs7ff35wa4rrmjgcggq51y0jc1sjqvhyz";
1598       })
1599     ];
1600     # Remove when https://github.com/danfran/hcoord/issues/9 is closed.
1601     doCheck = false;
1602   }) super.hcoord;
1604   # Tests rely on `Int` being 64-bit: https://github.com/hspec/hspec/issues/431.
1605   # Also, we need QuickCheck-2.14.x to build the test suite, which isn't easy in LTS-16.x.
1606   # So let's not go there and just disable the tests altogether.
1607   hspec-core = dontCheck super.hspec-core;
1609   # tests seem to require a different version of hspec-core
1610   hspec-contrib = dontCheck super.hspec-contrib;
1612   # github.com/ucsd-progsys/liquidhaskell/issues/1729
1613   liquidhaskell-boot = super.liquidhaskell-boot.override { Diff = self.Diff_0_3_4; };
1614   Diff_0_3_4 = dontCheck super.Diff_0_3_4;
1616   # The test suite attempts to read `/etc/resolv.conf`, which doesn't work in the sandbox.
1617   domain-auth = dontCheck super.domain-auth;
1619   # - Deps are required during the build for testing and also during execution,
1620   #   so add them to build input and also wrap the resulting binary so they're in
1621   #   PATH.
1622   # - Patch can be removed on next package set bump (for v0.2.11)
1624   # 2023-06-26: Test failure: https://hydra.nixos.org/build/225081865
1625   update-nix-fetchgit = dontCheck (let deps = [ pkgs.git pkgs.nix pkgs.nix-prefetch-git ];
1626   in self.generateOptparseApplicativeCompletions [ "update-nix-fetchgit" ] (overrideCabal
1627     (drv: {
1628       buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
1629       postInstall = drv.postInstall or "" + ''
1630         wrapProgram "$out/bin/update-nix-fetchgit" --prefix 'PATH' ':' "${
1631           lib.makeBinPath deps
1632         }"
1633       '';
1634     }) (addTestToolDepends deps super.update-nix-fetchgit)));
1636   # Raise version bounds: https://github.com/idontgetoutmuch/binary-low-level/pull/16
1637   binary-strict = appendPatches [
1638     (fetchpatch {
1639       url = "https://github.com/idontgetoutmuch/binary-low-level/pull/16/commits/c16d06a1f274559be0dea0b1f7497753e1b1a8ae.patch";
1640       sha256 = "sha256-deSbudy+2je1SWapirWZ1IVWtJ0sJVR5O/fnaAaib2g=";
1641     })
1642   ] super.binary-strict;
1644   # 2020-11-15: nettle tests are pre MonadFail change
1645   # https://github.com/stbuehler/haskell-nettle/issues/10
1646   nettle = dontCheck super.nettle;
1648   # The tests for semver-range need to be updated for the MonadFail change in
1649   # ghc-8.8:
1650   # https://github.com/adnelson/semver-range/issues/15
1651   semver-range = dontCheck super.semver-range;
1653   # https://github.com/obsidiansystems/dependent-sum/issues/55
1654   dependent-sum = doJailbreak super.dependent-sum;
1656   # 2022-06-19: Disable checks because of https://github.com/reflex-frp/reflex/issues/475
1657   reflex = doJailbreak (dontCheck super.reflex);
1659   # 2020-11-19: jailbreaking because of pretty-simple bound out of date
1660   # https://github.com/kowainik/stan/issues/408
1661   # Tests disabled because of: https://github.com/kowainik/stan/issues/409
1662   stan = doJailbreak (dontCheck super.stan);
1664   # Due to tests restricting base in 0.8.0.0 release
1665   http-media = doJailbreak super.http-media;
1667   # 2022-03-19: strict upper bounds https://github.com/poscat0x04/hinit/issues/2
1668   hinit = doJailbreak
1669     (self.generateOptparseApplicativeCompletions [ "hi" ]
1670       (super.hinit.override { haskeline = self.haskeline_0_8_2_1; }));
1672   # 2020-11-23: https://github.com/Rufflewind/blas-hs/issues/8
1673   blas-hs = dontCheck super.blas-hs;
1675   # Strange doctest problems
1676   # https://github.com/biocad/servant-openapi3/issues/30
1677   servant-openapi3 = dontCheck super.servant-openapi3;
1679   # Give latest hspec correct dependency versions without overrideScope
1680   hspec_2_11_7 = doDistribute (super.hspec_2_11_7.override {
1681     hspec-discover = self.hspec-discover_2_11_7;
1682     hspec-core = self.hspec-core_2_11_7;
1683   });
1684   hspec-meta_2_11_7 = doDistribute (super.hspec-meta_2_11_7.override {
1685     hspec-expectations = self.hspec-expectations_0_8_4;
1686   });
1687   hspec-discover_2_11_7 = doDistribute (super.hspec-discover_2_11_7.override {
1688     hspec-meta = self.hspec-meta_2_11_7;
1689   });
1690   # Need to disable tests to prevent an infinite recursion if hspec-core_2_11_7
1691   # is overlayed to hspec-core.
1692   hspec-core_2_11_7 = doDistribute (dontCheck (super.hspec-core_2_11_7.override {
1693     hspec-expectations = self.hspec-expectations_0_8_4;
1694   }));
1696   # Point hspec 2.7.10 to correct dependencies
1697   hspec_2_7_10 = super.hspec_2_7_10.override {
1698     hspec-discover = self.hspec-discover_2_7_10;
1699     hspec-core = self.hspec-core_2_7_10;
1700   };
1701   hspec-discover_2_7_10 = super.hspec-discover_2_7_10.override {
1702     hspec-meta = self.hspec-meta_2_7_8;
1703   };
1704   hspec-core_2_7_10 = doJailbreak (dontCheck super.hspec-core_2_7_10);
1706   # waiting for aeson bump
1707   servant-swagger-ui-core = doJailbreak super.servant-swagger-ui-core;
1709   hercules-ci-agent = self.generateOptparseApplicativeCompletions [ "hercules-ci-agent" ] super.hercules-ci-agent;
1711   # Test suite doesn't compile with aeson 2.0
1712   # https://github.com/hercules-ci/hercules-ci-agent/pull/387
1713   hercules-ci-api-agent = dontCheck super.hercules-ci-api-agent;
1715   hercules-ci-cli = lib.pipe super.hercules-ci-cli [
1716     unmarkBroken
1717     (overrideCabal (drv: { hydraPlatforms = super.hercules-ci-cli.meta.platforms; }))
1718     # See hercules-ci-optparse-applicative in non-hackage-packages.nix.
1719     (addBuildDepend super.hercules-ci-optparse-applicative)
1720     (self.generateOptparseApplicativeCompletions [ "hci" ])
1721   ];
1723   pipes-aeson = appendPatches [
1724     # Dependency of the aeson-2 patch
1725     (fetchpatch {
1726       name = "pipes-aeson-add-loop.patch";
1727       url = "https://github.com/k0001/pipes-aeson/commit/d22133b4a678edbb52bcaec5079dc88ccc0de1d3.patch";
1728       sha256 = "sha256-5o5ys1P1+QB4rjLCYok5AcPRWCtRiecP/TqCFm8ulVY=";
1729       includes = ["src/Pipes/Aeson.hs" "src/Pipes/Aeson/Internal.hs" "src/Pipes/Aeson/Unchecked.hs"];
1730     })
1731     # https://github.com/k0001/pipes-aeson/pull/20
1732     (fetchpatch {
1733       name = "pipes-aeson-aeson-2.patch";
1734       url = "https://github.com/hercules-ci/pipes-aeson/commit/ac735c9cd459c6ef51ba82325d1c55eb67cb7b2c.patch";
1735       sha256 = "sha256-viWZ6D5t79x50RXiOjP6UeQ809opgNFYZOP+h+1KJh0=";
1736       includes = ["src/Pipes/Aeson.hs" "src/Pipes/Aeson/Internal.hs" "src/Pipes/Aeson/Unchecked.hs"];
1737     })
1738   ] super.pipes-aeson;
1740   # Needs bytestring 0.11
1741   # https://github.com/Gabriella439/Haskell-Pipes-HTTP-Library/pull/17
1742   pipes-http = doJailbreak super.pipes-http;
1744   moto-postgresql = appendPatches [
1745     # https://gitlab.com/k0001/moto/-/merge_requests/3
1746     (fetchpatch {
1747       name = "moto-postgresql-monadfail.patch";
1748       url = "https://gitlab.com/k0001/moto/-/commit/09cc1c11d703c25f6e81325be6482dc7ec6cbf58.patch";
1749       relative = "moto-postgresql";
1750       sha256 = "sha256-f2JVX9VveShCeV+T41RQgacpUoh1izfyHlE6VlErkZM=";
1751     })
1752   ] (unmarkBroken super.moto-postgresql);
1754   moto = appendPatches [
1755     # https://gitlab.com/k0001/moto/-/merge_requests/3
1756     (fetchpatch {
1757       name = "moto-ghc-9.0.patch";
1758       url = "https://gitlab.com/k0001/moto/-/commit/5b6f015a1271765005f03762f1f1aaed3a3198ed.patch";
1759       relative = "moto";
1760       sha256 = "sha256-RMa9tk+2ip3Ks73UFv9Ea9GEnElRtzIjdpld1Fx+dno=";
1761     })
1762   ] super.moto;
1764   # Readline uses Distribution.Simple from Cabal 2, in a way that is not
1765   # compatible with Cabal 3. No upstream repository found so far
1766   readline = appendPatch ./patches/readline-fix-for-cabal-3.patch super.readline;
1768   # 2020-12-06: Restrictive upper bounds w.r.t. pandoc-types (https://github.com/owickstrom/pandoc-include-code/issues/27)
1769   pandoc-include-code = doJailbreak super.pandoc-include-code;
1771   # 2023-07-08: Restrictive upper bounds on text: https://github.com/owickstrom/pandoc-emphasize-code/pull/14
1772   # 2023-07-08: Missing test dependency: https://github.com/owickstrom/pandoc-emphasize-code/pull/13
1773   pandoc-emphasize-code = dontCheck (doJailbreak super.pandoc-emphasize-code);
1775   # DerivingVia is not allowed in safe Haskell
1776   # https://github.com/strake/util.hs/issues/1
1777   util = appendConfigureFlags [
1778     "--ghc-option=-fno-safe-haskell"
1779     "--haddock-option=--optghc=-fno-safe-haskell"
1780   ] super.util;
1781   category = appendConfigureFlags [
1782     "--ghc-option=-fno-safe-haskell"
1783     "--haddock-option=--optghc=-fno-safe-haskell"
1784   ] super.category;
1785   alg = appendConfigureFlags [
1786     "--ghc-option=-fno-safe-haskell"
1787     "--haddock-option=--optghc=-fno-safe-haskell"
1788   ] super.alg;
1790   # Break out of overspecified constraint on QuickCheck.
1791   filepath-bytestring = doJailbreak super.filepath-bytestring;
1792   haddock-library = doJailbreak super.haddock-library;
1794   # Test suite has overly strict bounds on tasty, jailbreaking fails.
1795   # https://github.com/input-output-hk/nothunks/issues/9
1796   nothunks = dontCheck super.nothunks;
1798   # Allow building with older versions of http-client.
1799   http-client-restricted = doJailbreak super.http-client-restricted;
1801   # Test suite fails, upstream not reachable for simple fix (not responsive on github)
1802   vivid-osc = dontCheck super.vivid-osc;
1803   vivid-supercollider = dontCheck super.vivid-supercollider;
1805   # Test suite does not compile.
1806   feed = dontCheck super.feed;
1808   spacecookie = overrideCabal (old: {
1809     buildTools = (old.buildTools or []) ++ [ pkgs.buildPackages.installShellFiles ];
1810     # let testsuite discover the resulting binary
1811     preCheck = ''
1812       export SPACECOOKIE_TEST_BIN=./dist/build/spacecookie/spacecookie
1813     '' + (old.preCheck or "");
1814     # install man pages shipped in the sdist
1815     postInstall = ''
1816       installManPage docs/man/*
1817     '' + (old.postInstall or "");
1818   }) super.spacecookie;
1820   # Patch and jailbreak can be removed at next release, chatter > 0.9.1.0
1821   # * Remove dependency on regex-tdfa-text
1822   # * Jailbreak as bounds on cereal are too strict
1823   # * Disable test suite which doesn't compile
1824   #   https://github.com/creswick/chatter/issues/38
1825   chatter = appendPatch
1826     (fetchpatch {
1827       url = "https://github.com/creswick/chatter/commit/e8c15a848130d7d27b8eb5e73e8a0db1366b2e62.patch";
1828       sha256 = "1dzak8d12h54vss5fxnrclygz0fz9ygbqvxd5aifz5n3vrwwpj3g";
1829     })
1830     (dontCheck (doJailbreak (super.chatter.override { regex-tdfa-text = null; })));
1832   # test suite doesn't compile anymore due to changed hunit/tasty APIs
1833   fullstop = dontCheck super.fullstop;
1835   # https://github.com/jgm/pandoc/issues/7163
1836   pandoc = dontCheck super.pandoc;
1838   # Since pandoc-3, the actual `pandoc` executable is in the pandoc-cli
1839   # package.  It is no longer distributed in the pandoc package itself.  So for
1840   # people that want to use the `pandoc` cli tool, they must use pandoc-cli.
1841   #
1842   # The unfortunate thing is that LTS-21 includes no possible build plan for
1843   # pandoc-cli, because pandoc-cli pandoc-lua-engine are not in LTS 21.
1844   # To get pandoc-lua-engine building we need either to downgrade a ton
1845   # of hslua-module-* packages from stackage or use pandoc 3.1 although
1846   # LTS contains pandoc 3.0.
1847   inherit (let
1848     pandoc-cli-overlay = self: super: {
1849       # pandoc-cli requires pandoc >= 3.1
1850       pandoc = self.pandoc_3_1_9;
1852       # pandoc depends on http-client-tls, which only starts depending
1853       # on crypton-connection in http-client-tls-0.3.6.2.
1854       http-client-tls = self.http-client-tls_0_3_6_3;
1856       # pandoc depends on skylighting >= 0.14
1857       skylighting = self.skylighting_0_14;
1858       skylighting-core = self.skylighting-core_0_14;
1859     };
1860   in {
1861     pandoc-cli = super.pandoc-cli.overrideScope pandoc-cli-overlay;
1862     pandoc_3_1_9 = doDistribute (super.pandoc_3_1_9.overrideScope pandoc-cli-overlay);
1863     pandoc-lua-engine = super.pandoc-lua-engine.overrideScope pandoc-cli-overlay;
1864   })
1865     pandoc-cli
1866     pandoc_3_1_9
1867     pandoc-lua-engine
1868     ;
1870   crypton-x509 =
1871     lib.pipe
1872       super.crypton-x509
1873       [
1874         # Mistype in a dependency in a test.
1875         # https://github.com/kazu-yamamoto/crypton-certificate/pull/3
1876         (appendPatch
1877           (fetchpatch {
1878             name = "crypton-x509-rename-dep.patch";
1879             url = "https://github.com/kazu-yamamoto/crypton-certificate/commit/5281ff115a18621407b41f9560fd6cd65c602fcc.patch";
1880             hash = "sha256-pLzuq+baSDn+MWhtYIIBOrE1Js+tp3UsaEZy5MhWAjY=";
1881             relative = "x509";
1882           })
1883         )
1884         # There is a revision in crypton-x509, so the above patch won't
1885         # apply because of line endings in revised .cabal files.
1886         (overrideCabal {
1887            editedCabalFile = null;
1888            revision = null;
1889         })
1890       ];
1892   # * doctests don't work without cabal
1893   #   https://github.com/noinia/hgeometry/issues/132
1894   # * Too strict version bound on vector-builder
1895   #   https://github.com/noinia/hgeometry/commit/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a#commitcomment-49282301
1896   hgeometry-combinatorial = dontCheck (doJailbreak super.hgeometry-combinatorial);
1898   # Too strict version bounds on ansi-terminal
1899   # https://github.com/kowainik/co-log/pull/218
1900   co-log = doJailbreak super.co-log;
1902   # Test suite has a too strict bound on base
1903   # https://github.com/jswebtools/language-ecmascript/pull/88
1904   # Test suite doesn't compile anymore
1905   language-ecmascript = dontCheck (doJailbreak super.language-ecmascript);
1907   # Too strict bounds on containers
1908   # https://github.com/jswebtools/language-ecmascript-analysis/issues/1
1909   language-ecmascript-analysis = doJailbreak super.language-ecmascript-analysis;
1911   # Too strict bounds on optparse-applicative
1912   # https://github.com/faylang/fay/pull/474
1913   fay = doJailbreak super.fay;
1915   # Too strict version bounds on cryptonite.
1916   # Issue reported upstream, no bug tracker url yet.
1917   darcs = doJailbreak super.darcs;
1919   # Too strict version bounds on cryptonite and github.
1920   # PRs are merged, will be fixed next release or Hackage revision.
1921   nix-thunk = appendPatches [
1922     (fetchpatch {
1923       url = "https://github.com/obsidiansystems/nix-thunk/commit/49d27a85dd39cd9413c99958c67e596756a502b5.patch";
1924       sha256 = "1p1n0123yrbdqyfk4kx3gq6bdv65l1bxgbsg51ckcwclg54xp2p5";
1925     })
1926     (fetchpatch {
1927       url = "https://github.com/obsidiansystems/nix-thunk/commit/512867c651977265d5d8f456b538f7a364ec8a8b.patch";
1928       sha256 = "121yg26y4g28k8xv7y1j6c3pxm17vsjn3vi62kkc8g928c47yd02";
1929     })
1930   ] super.nix-thunk;
1932   # list `modbus` in librarySystemDepends, correct to `libmodbus`
1933   libmodbus = doJailbreak (addExtraLibrary pkgs.libmodbus super.libmodbus);
1935   # 2021-04-02: Outdated optparse-applicative bound is fixed but not realeased on upstream.
1936   trial-optparse-applicative = assert super.trial-optparse-applicative.version == "0.0.0.0"; doJailbreak super.trial-optparse-applicative;
1938   # 2022-12-28: Too strict version bounds on bytestring
1939   iconv = doJailbreak super.iconv;
1941   # 2021-04-02: iCalendar is basically unmaintained.
1942   # There is a PR for fixing the build: https://github.com/chrra/iCalendar/pull/50
1943   iCalendar = appendPatches [
1944     (fetchpatch {
1945       url = "https://github.com/chrra/iCalendar/commit/66b408f10b2d87929ecda715109b26093c711823.patch";
1946       sha256 = "sha256-MU5OHUx3L8CaX+xAmoQhAAOMxT7u9Xk1OcOaUHBwK3Y=";
1947     })
1948     (fetchpatch {
1949       url = "https://github.com/chrra/iCalendar/commit/76f5d2e8328cb985f1ee5176e86a5cdd05a17934.patch";
1950       sha256 = "sha256-Z5V8VTA5Ml9YIRANQn2aD7dljAbR9dq13N11Y3LZdoE=";
1951     })
1952    ] super.iCalendar;
1954   ginger = doJailbreak super.ginger;
1956   # Too strict version bounds on cryptonite
1957   # https://github.com/obsidiansystems/haveibeenpwned/issues/7
1958   haveibeenpwned = doJailbreak super.haveibeenpwned;
1960   # Too strict version bounds on ghc-events
1961   # https://github.com/mpickering/hs-speedscope/issues/16
1962   hs-speedscope = doJailbreak super.hs-speedscope;
1964   # Test suite doesn't support base16-bytestring >= 1.0
1965   # https://github.com/centromere/blake2/issues/6
1966   blake2 = dontCheck super.blake2;
1968   # Test suite doesn't support base16-bytestring >= 1.0
1969   # https://github.com/serokell/haskell-crypto/issues/25
1970   crypto-sodium = dontCheck super.crypto-sodium;
1972   taskell = super.taskell.override {
1973     # Does not support brick >= 1.0
1974     # https://github.com/smallhadroncollider/taskell/issues/125
1975     brick = self.brick_0_70_1;
1976   };
1978   # Polyfill for GHCs from the integer-simple days that don't bundle ghc-bignum
1979   ghc-bignum = super.ghc-bignum or self.mkDerivation {
1980     pname = "ghc-bignum";
1981     version = "1.0";
1982     sha256 = "0xl848q8z6qx2bi6xil0d35lra7wshwvysyfblki659d7272b1im";
1983     description = "GHC BigNum library";
1984     license = lib.licenses.bsd3;
1985     # ghc-bignum is not buildable if none of the three backends
1986     # is explicitly enabled. We enable Native for now as it doesn't
1987     # depend on anything else as oppossed to GMP and FFI.
1988     # Apply patch which fixes a compilation failure we encountered.
1989     # Will need to be kept until we can drop ghc-bignum entirely,
1990     # i. e. if GHC 8.10.* and 8.8.* have been removed.
1991     configureFlags = [ "-f" "Native" ];
1992     patches = [
1993       (fetchpatch {
1994         url = "https://gitlab.haskell.org/ghc/ghc/-/commit/08d1588bf38d83140a86817a7a615db486357d4f.patch";
1995         sha256 = "sha256-Y9WW0KDQ/qY2L9ObPvh1i/6lxXIlprbxzdSBDfiaMtE=";
1996         relative = "libraries/ghc-bignum";
1997       })
1998     ];
1999   };
2001   # 2021-04-09: outdated base and alex-tools
2002   # PR pending https://github.com/glguy/language-lua/pull/6
2003   language-lua = doJailbreak super.language-lua;
2005   # 2021-04-09: too strict time bound
2006   # PR pending https://github.com/zohl/cereal-time/pull/2
2007   cereal-time = doJailbreak super.cereal-time;
2009   # 2021-04-16: too strict bounds on QuickCheck and tasty
2010   # https://github.com/hasufell/lzma-static/issues/1
2011   lzma-static = doJailbreak super.lzma-static;
2013   # Too strict version bounds on base:
2014   # https://github.com/obsidiansystems/database-id/issues/1
2015   database-id-class = doJailbreak super.database-id-class;
2017   # https://github.com/softwarefactory-project/matrix-client-haskell/issues/36
2018   # Restrictive bounds on aeson
2019   matrix-client = doJailbreak super.matrix-client;
2021   cabal2nix-unstable = overrideCabal {
2022     passthru = {
2023       updateScript = ../../../maintainers/scripts/haskell/update-cabal2nix-unstable.sh;
2025       # This is used by regenerate-hackage-packages.nix to supply the configuration
2026       # values we can easily generate automatically without checking them in.
2027       compilerConfig =
2028         pkgs.runCommand
2029           "hackage2nix-${self.ghc.haskellCompilerName}-config.yaml"
2030           {
2031             nativeBuildInputs = [
2032               self.ghc
2033             ];
2034           }
2035           ''
2036             cat > "$out" << EOF
2037             # generated by haskellPackages.cabal2nix-unstable.compilerConfig
2038             compiler: ${self.ghc.haskellCompilerName}
2040             core-packages:
2041               # Hack: The following package is a core package of GHCJS. If we don't declare
2042               # it, then hackage2nix will generate a Hackage database where all dependants
2043               # of this library are marked as "broken".
2044               - ghcjs-base-0
2046             EOF
2048             ghc-pkg list \
2049               | tail -n '+2' \
2050               | sed -e 's/[()]//g' -e 's/\s\+/  - /' \
2051               >> "$out"
2052           '';
2053     };
2054   } super.cabal2nix-unstable;
2056   # Too strict version bounds on base
2057   # https://github.com/gibiansky/IHaskell/issues/1217
2058   ihaskell-display = doJailbreak super.ihaskell-display;
2059   ihaskell-basic = doJailbreak super.ihaskell-basic;
2061   # Fixes too strict version bounds on regex libraries
2062   # Presumably to be removed at the next release
2063   # Test suite doesn't support hspec 2.8
2064   # https://github.com/yi-editor/yi/issues/1124
2065   yi-language = appendPatch (fetchpatch {
2066     url = "https://github.com/yi-editor/yi/commit/0d3bcb5ba4c237d57ce33a3dc39b63c56d890765.patch";
2067     relative = "yi-language";
2068     sha256 = "sha256-AVQLvul3ufxGQyoXud05qauclNanf6kunip0oJ/9lWQ=";
2069   }) (dontCheck super.yi-language);
2071   # 2022-03-22: Jailbreak for base bound: https://github.com/reflex-frp/reflex-dom/pull/433
2072   reflex-dom = assert super.reflex-dom.version == "0.6.1.1"; doJailbreak super.reflex-dom;
2074   # Tests need to lookup target triple x86_64-unknown-linux
2075   # https://github.com/llvm-hs/llvm-hs/issues/334
2076   llvm-hs = overrideCabal {
2077     doCheck = pkgs.stdenv.targetPlatform.system == "x86_64-linux";
2078   } super.llvm-hs;
2080   # Fix build with bytestring >= 0.11 (GHC 9.2)
2081   # https://github.com/llvm-hs/llvm-hs/pull/389
2082   llvm-hs-pure = appendPatches [
2083     (fetchpatch {
2084       name = "llvm-hs-pure-bytestring-0.11.patch";
2085       url = "https://github.com/llvm-hs/llvm-hs/commit/fe8fd556e8d2cc028f61d4d7b4b6bf18c456d090.patch";
2086       sha256 = "sha256-1d4wQg6JEJL3GwmXQpvbW7VOY5DwjUPmIsLEEur0Kps=";
2087       relative = "llvm-hs-pure";
2088       excludes = [ "**/Triple.hs" ]; # doesn't exist in 9.0.0
2089     })
2090   ] (overrideCabal {
2091     # Hackage Revision prevents patch from applying. Revision 1 does not allow
2092     # bytestring-0.11.4 which is bundled with 9.2.6.
2093     editedCabalFile = null;
2094     revision = null;
2095   } super.llvm-hs-pure);
2097   # * Fix build failure by picking patch from 8.5, we need
2098   #   this version of sbv for petrinizer
2099   # * Pin version of crackNum that still exposes its library
2100   sbv_7_13 = appendPatch (fetchpatch {
2101       url = "https://github.com/LeventErkok/sbv/commit/57014b9c7c67dd9b63619a996e2c66e32c33c958.patch";
2102       sha256 = "10npa8nh2413n6p6qld795qfkbld08icm02bspmk93y0kabpgmgm";
2103     })
2104     (super.sbv_7_13.override {
2105       crackNum = self.crackNum_2_4;
2106     });
2108   # Too strict bounds on dimensional
2109   # https://github.com/enomsg/science-constants-dimensional/pull/1
2110   science-constants-dimensional = doJailbreak super.science-constants-dimensional;
2112   # Tests are flaky on busy machines, upstream doesn't intend to fix
2113   # https://github.com/merijn/paramtree/issues/4
2114   paramtree = dontCheck super.paramtree;
2116   # Too strict version bounds on haskell-gi
2117   # https://github.com/owickstrom/gi-gtk-declarative/issues/100
2118   gi-gtk-declarative = doJailbreak super.gi-gtk-declarative;
2119   gi-gtk-declarative-app-simple = doJailbreak super.gi-gtk-declarative-app-simple;
2121   # 2023-04-09: haskell-ci needs Cabal-syntax 3.10
2122   # 2023-07-03: allow lattices-2.2, waiting on https://github.com/haskell-CI/haskell-ci/pull/664
2123   haskell-ci = doJailbreak (super.haskell-ci.overrideScope (self: super: {
2124     Cabal-syntax = self.Cabal-syntax_3_10_2_0;
2125   }));
2127   large-hashable = lib.pipe (super.large-hashable.override {
2128     # https://github.com/factisresearch/large-hashable/commit/5ec9d2c7233fc4445303564047c992b693e1155c
2129     utf8-light = null;
2130   }) [
2131     # 2022-03-21: use version from git which supports GHC 9.{0,2} and aeson 2.0
2132     (assert super.large-hashable.version == "0.1.0.4"; overrideSrc {
2133       version = "unstable-2022-06-10";
2134       src = pkgs.fetchFromGitHub {
2135         owner = "factisresearch";
2136         repo = "large-hashable";
2137         rev = "4d149c828c185bcf05556d1660f79ff1aec7eaa1";
2138         sha256 = "141349qcw3m93jw95jcha9rsg2y8sn5ca5j59cv8xmci38k2nam0";
2139       };
2140     })
2141     # Provide newly added dependencies
2142     (overrideCabal (drv: {
2143       libraryHaskellDepends = drv.libraryHaskellDepends or [] ++ [
2144         self.cryptonite
2145         self.memory
2146       ];
2147       testHaskellDepends = drv.testHaskellDepends or [] ++ [
2148         self.inspection-testing
2149       ];
2150     }))
2151     # https://github.com/factisresearch/large-hashable/issues/24
2152     (overrideCabal (drv: {
2153       testFlags = drv.testFlags or [] ++ [
2154         "-n" "^Data.LargeHashable.Tests.Inspection:genericSumGetsOptimized$"
2155       ];
2156     }))
2157     # https://github.com/factisresearch/large-hashable/issues/25
2158     # Currently broken with text >= 2.0
2159     (overrideCabal (lib.optionalAttrs (lib.versionAtLeast self.ghc.version "9.4") {
2160       broken = true;
2161       hydraPlatforms = [];
2162     }))
2163   ];
2165   # BSON defaults to requiring network instead of network-bsd which is
2166   # required nowadays: https://github.com/mongodb-haskell/bson/issues/26
2167   bson = appendConfigureFlag "-f-_old_network" (super.bson.override {
2168     network = self.network-bsd;
2169   });
2171   # Disable flaky tests
2172   # https://github.com/DavidEichmann/alpaca-netcode/issues/2
2173   alpaca-netcode = overrideCabal {
2174     testFlags = [ "--pattern" "!/[NOCI]/" ];
2175   } super.alpaca-netcode;
2177   # 2021-05-22: Tests fail sometimes (even consistently on hydra)
2178   # when running a fs-related test with >= 12 jobs. To work around
2179   # this, run tests with only a single job.
2180   # https://github.com/vmchale/libarchive/issues/20
2181   libarchive = overrideCabal {
2182     testFlags = [ "-j1" ];
2183   } super.libarchive;
2185   # Too strict bounds on QuickCheck
2186   # https://github.com/muesli4/table-layout/issues/16
2187   table-layout = doJailbreak super.table-layout;
2189   # 2021-06-20: Outdated upper bounds
2190   # https://github.com/Porges/email-validate-hs/issues/58
2191   email-validate = doJailbreak super.email-validate;
2193   # https://github.com/plow-technologies/hspec-golden-aeson/issues/17
2194   hspec-golden-aeson = dontCheck super.hspec-golden-aeson;
2196   # To strict bound on hspec
2197   # https://github.com/dagit/zenc/issues/5
2198   zenc = doJailbreak super.zenc;
2200   # https://github.com/ajscholl/basic-cpuid/pull/1
2201   basic-cpuid = appendPatch (fetchpatch {
2202     url = "https://github.com/ajscholl/basic-cpuid/commit/2f2bd7a7b53103fb0cf26883f094db9d7659887c.patch";
2203     sha256 = "0l15ccfdys100jf50s9rr4p0d0ikn53bkh7a9qlk9i0y0z5jc6x1";
2204   }) super.basic-cpuid;
2206   # 2021-08-18: streamly-posix was released with hspec 2.8.2, but it works with older versions too.
2207   streamly-posix = doJailbreak super.streamly-posix;
2209   # 2022-12-30: Restrictive upper bound on optparse-applicative
2210   retrie = doJailbreak super.retrie;
2212   # 2022-08-30 Too strict bounds on finite-typelits
2213   # https://github.com/jumper149/blucontrol/issues/1
2214   blucontrol = doJailbreak super.blucontrol;
2216   # Fix from https://github.com/brendanhay/gogol/pull/144 which has seen no release
2217   # Can't use fetchpatch as it required tweaking the line endings as the .cabal
2218   # file revision on hackage was gifted CRLF line endings
2219   gogol-core = appendPatch ./patches/gogol-core-144.patch super.gogol-core;
2221   # Stackage LTS 19 still has 10.*
2222   hadolint = super.hadolint.override {
2223     language-docker = self.language-docker_11_0_0;
2224   };
2226   nix-tree = super.nix-tree;
2228   # test suite requires stack to run, https://github.com/dino-/photoname/issues/24
2229   photoname = dontCheck super.photoname;
2231   # Upgrade of unordered-containers in Stackage causes ordering-sensitive test to fail
2232   # https://github.com/commercialhaskell/stackage/issues/6366
2233   # https://github.com/kapralVV/Unique/issues/9
2234   # Too strict bounds on hashable
2235    # https://github.com/kapralVV/Unique/pull/10
2236   Unique = assert super.Unique.version == "0.4.7.9"; overrideCabal (drv: {
2237     testFlags = [
2238       "--skip" "/Data.List.UniqueUnsorted.removeDuplicates/removeDuplicates: simple test/"
2239       "--skip" "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/unique: simple test/"
2240       "--skip" "/Data.List.UniqueUnsorted.repeatedBy,repeated,unique/repeatedBy: simple test/"
2241     ] ++ drv.testFlags or [];
2242   }) (doJailbreak super.Unique);
2244   # https://github.com/AndrewRademacher/aeson-casing/issues/8
2245   aeson-casing = assert super.aeson-casing.version == "0.2.0.0"; overrideCabal (drv: {
2246     testFlags = [
2247       "-p" "! /encode train/"
2248     ] ++ drv.testFlags or [];
2249   }) super.aeson-casing;
2251   # https://github.com/emc2/HUnit-Plus/issues/26
2252   HUnit-Plus = dontCheck super.HUnit-Plus;
2253   # https://github.com/ewestern/haskell-postgis/issues/7
2254   haskell-postgis = overrideCabal (drv: {
2255     testFlags = [
2256       "--skip" "/Geo/Hexable/Encodes a linestring/"
2257     ] ++ drv.testFlags or [];
2258   }) super.haskell-postgis;
2259   # https://github.com/ChrisPenner/json-to-haskell/issues/5
2260   json-to-haskell = overrideCabal (drv: {
2261     testFlags = [
2262       "--match" "/should sanitize weird field and record names/"
2263     ] ++ drv.testFlags or [];
2264   }) super.json-to-haskell;
2265   # https://github.com/fieldstrength/aeson-deriving/issues/5
2266   aeson-deriving = dontCheck super.aeson-deriving;
2267   # https://github.com/morpheusgraphql/morpheus-graphql/issues/660
2268   morpheus-graphql-core = overrideCabal (drv: {
2269     testFlags = [
2270       "-p" "!/field.unexpected-value/&&!/field.missing-field/&&!/argument.unexpected-value/&&!/argument.missing-field/"
2271     ] ++ drv.testFlags or [];
2272   }) super.morpheus-graphql-core;
2273   morpheus-graphql = overrideCabal (drv: {
2274     testFlags = [
2275       "-p" "!/Test Rendering/"
2276     ] ++ drv.testFlags or [];
2277   }) super.morpheus-graphql;
2278   drunken-bishop = doJailbreak super.drunken-bishop;
2279   # https://github.com/SupercedeTech/dropbox-client/issues/1
2280   dropbox = overrideCabal (drv: {
2281     testFlags = [
2282       "--skip" "/Dropbox/Dropbox aeson aeson/encodes list folder correctly/"
2283     ] ++ drv.testFlags or [];
2284   }) super.dropbox;
2285   # https://github.com/alonsodomin/haskell-schema/issues/11
2286   hschema-aeson = overrideCabal (drv: {
2287     testFlags = [
2288       "--skip" "/toJsonSerializer/should generate valid JSON/"
2289     ] ++ drv.testFlags or [];
2290   }) super.hschema-aeson;
2291   # https://github.com/minio/minio-hs/issues/165
2292   minio-hs = overrideCabal (drv: {
2293     testFlags = [
2294       "-p" "!/Test mkSelectRequest/"
2295     ] ++ drv.testFlags or [];
2296   }) super.minio-hs;
2298   # Invalid CPP in test suite: https://github.com/cdornan/memory-cd/issues/1
2299   memory-cd = dontCheck super.memory-cd;
2301   # https://github.com/haskell/fgl/pull/99
2302   fgl = doJailbreak super.fgl;
2303   fgl-arbitrary = doJailbreak super.fgl-arbitrary;
2305   # raaz-0.3 onwards uses backpack and it does not play nicely with
2306   # parallel builds using -j
2307   #
2308   # See: https://gitlab.haskell.org/ghc/ghc/-/issues/17188
2309   #
2310   # Overwrite the build cores
2311   raaz = overrideCabal (drv: {
2312     enableParallelBuilding = false;
2313   }) super.raaz;
2315   # https://github.com/andreymulik/sdp/issues/3
2316   sdp = disableLibraryProfiling super.sdp;
2317   sdp-binary = disableLibraryProfiling super.sdp-binary;
2318   sdp-deepseq = disableLibraryProfiling super.sdp-deepseq;
2319   sdp-hashable = disableLibraryProfiling super.sdp-hashable;
2320   sdp-io = disableLibraryProfiling super.sdp-io;
2321   sdp-quickcheck = disableLibraryProfiling super.sdp-quickcheck;
2322   sdp4bytestring = disableLibraryProfiling super.sdp4bytestring;
2323   sdp4text = disableLibraryProfiling super.sdp4text;
2324   sdp4unordered = disableLibraryProfiling super.sdp4unordered;
2325   sdp4vector = disableLibraryProfiling super.sdp4vector;
2327   # Unnecessarily strict bound on template-haskell
2328   # https://github.com/tree-sitter/haskell-tree-sitter/issues/298
2329   tree-sitter = doJailbreak super.tree-sitter;
2331   # 2022-08-07: Bounds are too restrictive: https://github.com/marcin-rzeznicki/libjwt-typed/issues/2
2332   # Also, the tests fail.
2333   libjwt-typed = dontCheck (doJailbreak super.libjwt-typed);
2335   # Test suite fails to compile
2336   # https://github.com/kuribas/mfsolve/issues/8
2337   mfsolve = dontCheck super.mfsolve;
2339   # Fixes compilation with GHC 9.0 and above
2340   # https://hub.darcs.net/shelarcy/regex-compat-tdfa/issue/3
2341   regex-compat-tdfa = appendPatches [
2342     ./patches/regex-compat-tdfa-ghc-9.0.patch
2343   ] (overrideCabal {
2344     # Revision introduces bound base < 4.15
2345     revision = null;
2346     editedCabalFile = null;
2347   } super.regex-compat-tdfa);
2349   # https://github.com/kowainik/validation-selective/issues/64
2350   validation-selective = doJailbreak super.validation-selective;
2351   # https://github.com/system-f/validation/issues/57
2352   validation = doJailbreak super.validation;
2354   # 2022-03-16: strict upper bounds https://github.com/monadfix/shower/issues/18
2355   shower = doJailbreak (dontCheck super.shower);
2357   # Test suite isn't supposed to succeed yet, apparently…
2358   # https://github.com/andrewufrank/uniform-error/blob/f40629ad119e90f8dae85e65e93d7eb149bddd53/test/Uniform/Error_test.hs#L124
2359   # https://github.com/andrewufrank/uniform-error/issues/2
2360   uniform-error = dontCheck super.uniform-error;
2361   # https://github.com/andrewufrank/uniform-fileio/issues/2
2362   uniform-fileio = dontCheck super.uniform-fileio;
2364   # The shipped Setup.hs file is broken.
2365   csv = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.hs"; }) super.csv;
2366   # Build-type is simple, but ships a broken Setup.hs
2367   digits = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.lhs"; }) super.digits;
2369   cabal-fmt = doJailbreak (super.cabal-fmt.override {
2370     # Needs newer Cabal-syntax version.
2371     Cabal-syntax = self.Cabal-syntax_3_10_2_0;
2372   });
2374   # 2023-07-18: https://github.com/srid/ema/issues/156
2375   ema = doJailbreak super.ema;
2377   glirc = doJailbreak (super.glirc.override {
2378     vty = self.vty_5_35_1;
2379   });
2381   # Too strict bounds on text and tls
2382   # https://github.com/barrucadu/irc-conduit/issues/54
2383   irc-conduit = doJailbreak super.irc-conduit;
2384   irc-client = doJailbreak super.irc-client;
2386   # 2022-02-25: Unmaintained and to strict upper bounds
2387   paths = doJailbreak super.paths;
2389   # 2022-02-26: https://github.com/emilypi/base64/issues/39
2390   base64 = dontCheck super.base64;
2392   # 2022-03-16: Upstream stopped updating bounds https://github.com/haskell-hvr/base-noprelude/pull/15
2393   base-noprelude = doJailbreak super.base-noprelude;
2395   # 2022-03-16: Bounds need to be loosened https://github.com/obsidiansystems/dependent-sum-aeson-orphans/issues/10
2396   dependent-sum-aeson-orphans = doJailbreak super.dependent-sum-aeson-orphans;
2398   # 2022-03-16: package qualified import issue: https://github.com/ghcjs/ghcjs-dom/issues/101
2399   ghcjs-dom = assert super.ghcjs-dom.version == "0.9.5.0"; overrideCabal (old: {
2400     postPatch = ''
2401       sed -i 's/import "jsaddle-dom" GHCJS.DOM.Document/import "ghcjs-dom-jsaddle" GHCJS.DOM.Document/' src/GHCJS/DOM/Document.hs
2402     '' + (old.postPatch or "");
2403     })
2404     # 2023-07-15: Restrictive upper bounds on text
2405     (doJailbreak super.ghcjs-dom);
2407   # Too strict bounds on chell: https://github.com/fpco/haskell-filesystem/issues/24
2408   system-fileio = doJailbreak super.system-fileio;
2410   # Bounds too strict on base and ghc-prim: https://github.com/tibbe/ekg-core/pull/43 (merged); waiting on hackage release
2411   ekg-core = assert super.ekg-core.version == "0.1.1.7"; doJailbreak super.ekg-core;
2412   hasura-ekg-core = doJailbreak super.hasura-ekg-core;
2414   # Test suite doesn't support hspec 2.8
2415   # https://github.com/zellige/hs-geojson/issues/29
2416   geojson = dontCheck super.geojson;
2418   # Test data missing from sdist
2419   # https://github.com/ngless-toolkit/ngless/issues/152
2420   NGLess = dontCheck super.NGLess;
2422   # Raise version bounds for hspec
2423   records-sop = appendPatch (fetchpatch {
2424     url = "https://github.com/kosmikus/records-sop/pull/11/commits/d88831388ab3041190130fec3cdd679a4217b3c7.patch";
2425     sha256 = "sha256-O+v/OxvqnlWX3HaDvDIBZnJ+Og3xs/SJqI3gaouU3ZI=";
2426   }) super.records-sop;
2428   # Fix build failures for ghc 9 (https://github.com/mokus0/polynomial/pull/20)
2429   polynomial = appendPatch (fetchpatch {
2430     name = "haskell-polynomial.20.patch";
2431     url = "https://github.com/mokus0/polynomial/pull/20.diff";
2432     sha256 = "1bwivimpi2hiil3zdnl5qkds1inyn239wgxbn3y8l2pwyppnnfl0";
2433   })
2434   (overrideCabal (drv: {
2435     revision = null;
2436     editedCabalFile = null;
2437     doCheck = false; # Source dist doesn't include the checks
2438   })
2439   super.polynomial);
2441   # Tests likely broke because of https://github.com/nick8325/quickcheck/issues/359,
2442   # but fft is not on GitHub, so no issue reported.
2443   fft = dontCheck super.fft;
2445   # lucid-htmx has restrictive upper bounds on lucid and servant:
2446   #
2447   #   Setup: Encountered missing or private dependencies:
2448   #   lucid >=2.9.12.1 && <=2.11, servant >=0.18.3 && <0.19
2449   #
2450   # Can be removed once
2451   #
2452   # > https://github.com/MonadicSystems/lucid-htmx/issues/6
2453   #
2454   # has been resolved.
2455   lucid-htmx = doJailbreak super.lucid-htmx;
2457   # Too strict bounds on hspec
2458   # https://github.com/klapaucius/vector-hashtables/issues/11
2459   vector-hashtables = doJailbreak super.vector-hashtables;
2461   # doctest-parallel is broken with v1-style cabal-install / Setup.hs
2462   # https://github.com/martijnbastiaan/doctest-parallel/issues/22
2463   doctest-parallel = dontCheck super.doctest-parallel;
2464   clash-prelude = dontCheck super.clash-prelude;
2466   # Ships a broken Setup.hs
2467   # https://github.com/lehins/conduit-aeson/issues/1
2468   conduit-aeson = overrideCabal (drv: {
2469     postPatch = ''
2470       ${drv.postPatch or ""}
2471       rm Setup.hs
2472     '';
2473     # doctest suite uses doctest-parallel which still doesn't work in nixpkgs
2474     testTarget = "tests";
2475   }) super.conduit-aeson;
2477   # Upper bounds are too strict:
2478   # https://github.com/velveteer/hermes/pull/22
2479   hermes-json = doJailbreak super.hermes-json;
2481   # Disabling doctests.
2482   regex-tdfa = overrideCabal {
2483     testTarget = "regex-tdfa-unittest";
2484   } super.regex-tdfa;
2486   # Missing test files https://github.com/kephas/xdg-basedir-compliant/issues/1
2487   xdg-basedir-compliant = dontCheck super.xdg-basedir-compliant;
2489   # Test failure after libxcrypt migration, reported upstrem at
2490   # https://github.com/phadej/crypt-sha512/issues/13
2491   crypt-sha512 = dontCheck super.crypt-sha512;
2493   # Too strict upper bound on HTTP
2494   oeis = doJailbreak super.oeis;
2496   inherit
2497     (let
2498       # We need to build purescript with these dependencies and thus also its reverse
2499       # dependencies to avoid version mismatches in their dependency closure.
2500       # TODO: maybe unify with the spago overlay in configuration-nix.nix?
2501       purescriptOverlay = self: super: {
2502         # As of 2021-11-08, the latest release of `language-javascript` is 0.7.1.0,
2503         # but it has a problem with parsing the `async` keyword.  It doesn't allow
2504         # `async` to be used as an object key:
2505         # https://github.com/erikd/language-javascript/issues/131
2506         language-javascript = self.language-javascript_0_7_0_0;
2507       };
2508     in {
2509       purescript =
2510         lib.pipe
2511           (super.purescript.overrideScope purescriptOverlay)
2512           ([
2513             # PureScript uses nodejs to run tests, so the tests have been disabled
2514             # for now.  If someone is interested in figuring out how to get this
2515             # working, it seems like it might be possible.
2516             dontCheck
2517             # The current version of purescript (0.14.5) has version bounds for LTS-17,
2518             # but it compiles cleanly using deps in LTS-18 as well.  This jailbreak can
2519             # likely be removed when purescript-0.14.6 is released.
2520             doJailbreak
2521             # Generate shell completions
2522             (self.generateOptparseApplicativeCompletions [ "purs" ])
2523           ]);
2525       purenix = super.purenix.overrideScope purescriptOverlay;
2526     })
2527     purescript
2528     purenix
2529     ;
2531   # 2022-11-05: https://github.com/ysangkok/haskell-tzdata/issues/3
2532   tzdata = dontCheck super.tzdata;
2534   # We provide newer dependencies than upstream expects.
2535   swarm = doJailbreak super.swarm;
2537   # Too strict upper bound on bytestring
2538   # https://github.com/TravisWhitaker/rdf/issues/8
2539   rdf = doJailbreak super.rdf;
2541   # random <1.2
2542   unfoldable = doJailbreak super.unfoldable;
2544   # containers <0.6, semigroupoids <5.3
2545   data-lens = doJailbreak super.data-lens;
2547   # transformers <0.3
2548   monads-fd = doJailbreak super.monads-fd;
2550   # HTF <0.15
2551   cases = doJailbreak super.cases;
2553   # exceptions <0.9
2554   eprocess = doJailbreak super.eprocess;
2556   # hashable <1.4, mmorph <1.2
2557   composite-aeson = doJailbreak super.composite-aeson;
2559   # composite-aeson <0.8, composite-base <0.8
2560   compdoc = doJailbreak super.compdoc;
2562   # composite-aeson <0.8, composite-base <0.8
2563   haskell-coffee = doJailbreak super.haskell-coffee;
2565   # Test suite doesn't compile anymore
2566   twitter-types = dontCheck super.twitter-types;
2568   # base <4.14
2569   numbered-semigroups = doJailbreak super.numbered-semigroups;
2571   # Tests open file "data/test_vectors_aserti3-2d_run01.txt" but it doesn't exist
2572   haskoin-core = dontCheck super.haskoin-core;
2574   # base <4.9, transformers <0.5
2575   MonadCatchIO-transformers = doJailbreak super.MonadCatchIO-transformers;
2577   # unix-compat <0.5
2578   hxt-cache = doJailbreak super.hxt-cache;
2580   # base <4.16
2581   fast-builder = doJailbreak super.fast-builder;
2583   # QuickCheck <2.14
2584   term-rewriting = doJailbreak super.term-rewriting;
2586   # tests can't find the test binary anymore - parseargs-example
2587   parseargs = dontCheck super.parseargs;
2589   # base <4.14
2590   decimal-literals = doJailbreak super.decimal-literals;
2592   # multiple bounds too strict
2593   snaplet-sqlite-simple = doJailbreak super.snaplet-sqlite-simple;
2595   emanote = super.emanote.overrideScope (lself: lsuper: {
2596     commonmark-extensions = lself.commonmark-extensions_0_2_3_2;
2597   });
2599   # Test files missing from sdist
2600   # https://github.com/tweag/webauthn/issues/166
2601   webauthn = dontCheck super.webauthn;
2603   # doctest <0.19
2604   polysemy = doJailbreak super.polysemy;
2606   # multiple bounds too strict
2607   co-log-polysemy = doJailbreak super.co-log-polysemy;
2608   co-log-polysemy-formatting = doJailbreak super.co-log-polysemy-formatting;
2610   # 2022-12-02: Needs newer postgrest package
2611   # 2022-12-02: Hackage release lags behind actual releases: https://github.com/PostgREST/postgrest/issues/2275
2612   # 2022-12-02: Too strict bounds: https://github.com/PostgREST/postgrest/issues/2580
2613   # 2022-12-02: Tests require running postresql server
2614   postgrest = dontCheck (doJailbreak (overrideSrc rec {
2615     version = "10.1.1";
2616     src = pkgs.fetchFromGitHub {
2617       owner = "PostgREST";
2618       repo = "postgrest";
2619       rev = "v${version}";
2620       sha256 = "sha256-ceSPBH+lzGU1OwjolcaE1BCpkKCJrvMU5G8TPeaJesM=";
2621     };
2622   } super.postgrest));
2624   html-charset = dontCheck super.html-charset;
2626   # true-name-0.1.0.4 has been tagged, but has not been released to Hackage.
2627   # Also, beyond 0.1.0.4 an additional patch is required to make true-name
2628   # compatible with current versions of template-haskell
2629   # https://github.com/liyang/true-name/pull/4
2630   true-name = appendPatch (fetchpatch {
2631     url = "https://github.com/liyang/true-name/compare/0.1.0.3...nuttycom:true-name:update_template_haskell.patch";
2632     hash = "sha256-ZMBXGGc2X5AKXYbqgkLXkg5BhEwyj022E37sUEWahtc=";
2633   }) (overrideCabal (drv: {
2634     revision = null;
2635     editedCabalFile = null;
2636   }) super.true-name);
2638   # ffmpeg-light works against the ffmpeg-4 API, but the default ffmpeg in nixpkgs is ffmpeg-5.
2639   # https://github.com/NixOS/nixpkgs/pull/220972#issuecomment-1484017192
2640   ffmpeg-light = super.ffmpeg-light.override { ffmpeg = pkgs.ffmpeg_4; };
2642   # posix-api has had broken tests since 2020 (until at least 2023-01-11)
2643   # raehik has a fix pending: https://github.com/andrewthad/posix-api/pull/14
2644   posix-api = dontCheck super.posix-api;
2646   # bytestring <0.11.0, optparse-applicative <0.13.0
2647   # https://github.com/kseo/sfnt2woff/issues/1
2648   sfnt2woff = doJailbreak super.sfnt2woff;
2650   # 2023-03-05: restrictive bounds on base https://github.com/diagrams/diagrams-gtk/issues/11
2651   diagrams-gtk = doJailbreak super.diagrams-gtk;
2653   # 2023-03-13: restrictive bounds on validation-selective (>=0.1.0 && <0.2).
2654   # Get rid of this in the next release: https://github.com/kowainik/tomland/commit/37f16460a6dfe4606d48b8b86c13635d409442cd
2655   tomland = doJailbreak super.tomland;
2657   llvm-ffi = super.llvm-ffi.override {
2658     LLVM = pkgs.llvmPackages_13.libllvm;
2659   };
2661   # libfuse3 fails to mount fuse file systems within the build environment
2662   libfuse3 = dontCheck super.libfuse3;
2664   # Merged upstream, but never released. Allows both intel and aarch64 darwin to build.
2665   # https://github.com/vincenthz/hs-gauge/pull/106
2666   gauge = appendPatch (pkgs.fetchpatch {
2667     name = "darwin-aarch64-fix.patch";
2668     url = "https://github.com/vincenthz/hs-gauge/commit/3d7776f41187c70c4f0b4517e6a7dde10dc02309.patch";
2669     hash = "sha256-4osUMo0cvTvyDTXF8lY9tQbFqLywRwsc3RkHIhqSriQ=";
2670   }) super.gauge;
2672   # Flaky QuickCheck tests
2673   # https://github.com/Haskell-Things/ImplicitCAD/issues/441
2674   implicit = dontCheck super.implicit;
2676   # The hackage source is somehow missing a file present in the repo (tests/ListStat.hs).
2677   sym = dontCheck super.sym;
2679   # Too strict bounds on base, ghc-prim, primitive
2680   # https://github.com/kowainik/typerep-map/pull/128
2681   typerep-map = doJailbreak super.typerep-map;
2683   # Too strict bounds on base
2684   kewar = doJailbreak super.kewar;
2686   # Tests rely on (missing) submodule
2687   unleash-client-haskell-core = dontCheck super.unleash-client-haskell-core;
2689   # Workaround for Cabal failing to find nonexistent SDL2 library?!
2690   # https://github.com/NixOS/nixpkgs/issues/260863
2691   sdl2-gfx = overrideCabal { __propagatePkgConfigDepends = false; } super.sdl2-gfx;
2692   sdl2-ttf = overrideCabal { __onlyPropagateKnownPkgConfigModules = true; } super.sdl2-ttf;
2694   # Needs git for compile-time insertion of commit hash into --version string.
2695   kmonad = overrideCabal (drv: {
2696     libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.buildPackages.git];
2697   }) super.kmonad;
2699   # Both of these need specific versions of ghc-lib-parser, the minor releases
2700   # seem to be tied.
2701   ghc-syntax-highlighter_0_0_10_0 = super.ghc-syntax-highlighter_0_0_10_0.overrideScope(self: super: {
2702     ghc-lib-parser = self.ghc-lib-parser_9_6_3_20231014;
2703   });
2704   ghc-syntax-highlighter_0_0_11_0 = super.ghc-syntax-highlighter_0_0_11_0.overrideScope(self: super: {
2705     ghc-lib-parser = self.ghc-lib-parser_9_8_1_20231009;
2706   });
2708   # Needs a matching version of ipython-kernel and a
2709   # ghc-syntax-highlighter compatible with a newer ghc-lib-parser it
2710   # transitively pulls in
2711   ihaskell = super.ihaskell.overrideScope (self: super: {
2712     ipython-kernel = self.ipython-kernel_0_11_0_0;
2713     ghc-syntax-highlighter = self.ghc-syntax-highlighter_0_0_10_0;
2714   });
2716 } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super