about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/haskell-modules/configuration-common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r--nixpkgs/pkgs/development/haskell-modules/configuration-common.nix755
1 files changed, 450 insertions, 305 deletions
diff --git a/nixpkgs/pkgs/development/haskell-modules/configuration-common.nix b/nixpkgs/pkgs/development/haskell-modules/configuration-common.nix
index 482abb918e02..ec0545a89281 100644
--- a/nixpkgs/pkgs/development/haskell-modules/configuration-common.nix
+++ b/nixpkgs/pkgs/development/haskell-modules/configuration-common.nix
@@ -34,8 +34,6 @@ self: super: {
       # !!! Use cself/csuper inside for the actual overrides
       cabalInstallOverlay = cself: csuper:
         {
-          # Needs to be upgraded compared to Stackage LTS 21
-          cabal-install-solver = cself.cabal-install-solver_3_10_2_1;
           # Needs to be downgraded compared to Stackage LTS 21
           resolv = cself.resolv_0_1_2_0;
         } // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.6") {
@@ -52,21 +50,6 @@ self: super: {
           # process depends on directory.
           process = cself.process_1_6_18_0;
 
-          # hspec < 2.10 depends on ghc (the library) directly which in turn
-          # depends on directory, causing a dependency conflict which is practically
-          # not solvable short of recompiling GHC. Instead of adding
-          # allowInconsistentDependencies for all reverse dependencies of hspec-core,
-          # just upgrade to an hspec version without the offending dependency.
-          hspec-core = cself.hspec-core_2_11_7;
-          hspec-discover = cself.hspec-discover_2_11_7;
-          hspec = cself.hspec_2_11_7;
-
-          # hspec-discover and hspec-core depend on hspec-meta for testing which
-          # we need to avoid since it depends on ghc as well. Since hspec*_2_11*
-          # are overridden to take the versioned attributes as inputs, we need
-          # to make sure to override the versioned attribute with this fix.
-          hspec-discover_2_11_7 = dontCheck csuper.hspec-discover_2_11_7;
-
           # Prevent dependency on doctest which causes an inconsistent dependency
           # due to depending on ghc which depends on directory etc.
           vector = dontCheck csuper.vector;
@@ -94,12 +77,13 @@ self: super: {
 
   # Extensions wants the latest version of Cabal for its list of Haskell
   # language extensions.
-  extensions = super.extensions.override {
+  # 2024-01-15: jailbreak to allow hspec-hedgehog 0.1.1.0 https://github.com/kowainik/extensions/pull/92
+  extensions = doJailbreak (super.extensions.override {
     Cabal =
       if versionOlder self.ghc.version "9.6"
       then self.Cabal_3_10_2_1
       else null; # use GHC bundled version
-  };
+  });
 
   #######################################
   ### HASKELL-LANGUAGE-SERVER SECTION ###
@@ -118,26 +102,9 @@ self: super: {
     ghc-paths = lsuper.ghc-paths.override { Cabal = null; };
   }));
 
-  # hasn't bumped upper bounds
-  # test fails: "floskell-test: styles/base.md: openBinaryFile: does not exist (No such file or directory)"
-  # https://github.com/ennocramer/floskell/issues/48
-  floskell = dontCheck (doJailbreak super.floskell);
-
-  # 2023-04-03: https://github.com/haskell/haskell-language-server/issues/3546#issuecomment-1494139751
-  # There will probably be a new revision soon.
-  hls-brittany-plugin = assert super.hls-brittany-plugin.version == "1.1.0.0"; doJailbreak super.hls-brittany-plugin;
-
   # For -f-auto see cabal.project in haskell-language-server.
   ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser (disableCabalFlag "auto" super.ghc-lib-parser-ex);
 
-  hls-test-utils = doJailbreak super.hls-test-utils;
-  hls-alternate-number-format-plugin = doJailbreak super.hls-alternate-number-format-plugin;
-  hls-cabal-plugin = doJailbreak super.hls-cabal-plugin;
-  hls-call-hierarchy-plugin = doJailbreak super.hls-call-hierarchy-plugin;
-  hls-explicit-fixity-plugin = doJailbreak super.hls-explicit-fixity-plugin;
-  hls-floskell-plugin = doJailbreak super.hls-floskell-plugin;
-  hls-gadt-plugin = doJailbreak super.hls-gadt-plugin;
-
   ###########################################
   ### END HASKELL-LANGUAGE-SERVER SECTION ###
   ###########################################
@@ -177,18 +144,18 @@ self: super: {
   # https://github.com/lspitzner/czipwith/issues/5
   czipwith = doJailbreak super.czipwith;
 
-  # Deal with infinite and NaN values generated by QuickCheck-2.14.3
-  aeson = overrideCabal {
+  aeson =
     # aeson's test suite includes some tests with big numbers that fail on 32bit
     # https://github.com/haskell/aeson/issues/1060
-    doCheck = !pkgs.stdenv.hostPlatform.is32bit;
-  } (appendPatches [
-    (pkgs.fetchpatch {
-      name = "aeson-quickcheck-2.14.3-double-workaround.patch";
-      url = "https://github.com/haskell/aeson/commit/58766a1916b4980792763bab74f0c86e2a7ebf20.patch";
-      sha256 = "1jk2xyi9g6dfjsi6hvpvkpmag3ivimipwy1izpbidf3wvc9cixs3";
-    })
-  ] super.aeson);
+    dontCheckIf pkgs.stdenv.hostPlatform.is32bit
+    # Deal with infinite and NaN values generated by QuickCheck-2.14.3
+    (appendPatches [
+      (pkgs.fetchpatch {
+        name = "aeson-quickcheck-2.14.3-double-workaround.patch";
+        url = "https://github.com/haskell/aeson/commit/58766a1916b4980792763bab74f0c86e2a7ebf20.patch";
+        sha256 = "1jk2xyi9g6dfjsi6hvpvkpmag3ivimipwy1izpbidf3wvc9cixs3";
+      })
+    ] super.aeson);
 
   # 2023-06-28: Test error: https://hydra.nixos.org/build/225565149
   orbits = dontCheck super.orbits;
@@ -208,15 +175,17 @@ self: super: {
     '';
   }) super.double-conversion;
 
+  # Too strict bounds on hspec < 2.11
+  http-api-data = doJailbreak super.http-api-data;
+  tasty-discover = doJailbreak super.tasty-discover;
+
   # Allow aeson == 2.1.*
   # https://github.com/hdgarrood/aeson-better-errors/issues/23
   aeson-better-errors = doJailbreak super.aeson-better-errors;
 
   # 2023-08-09: Jailbreak because of vector < 0.13
   # 2023-11-09: don't check because of https://github.com/tweag/monad-bayes/pull/326
-  monad-bayes = dontCheck (doJailbreak (super.monad-bayes.override {
-    hspec = self.hspec_2_11_7;
-  }));
+  monad-bayes = dontCheck (doJailbreak super.monad-bayes);
 
   # Disable tests failing on odd floating point numbers generated by QuickCheck 2.14.3
   # https://github.com/haskell/statistics/issues/205
@@ -229,12 +198,34 @@ self: super: {
   # There are numerical tests on random data, that may fail occasionally
   lapack = dontCheck super.lapack;
 
+  # currently, cabal-plan seems to get not much maintenance
+  cabal-plan = doJailbreak super.cabal-plan;
+
+  # Too strict bounds on optparse-applicative
+  weeder = lib.warnIf (lib.versionAtLeast super.weeder.version "2.8.0") "jailbreak on weeder may be obsolete" doJailbreak super.weeder;
+
+  # Allow scotty < 0.21
+  # For < 0.22 add https://github.com/taffybar/taffybar/commit/71fe820d892a85e49ad2f2843eac0a59e01f3fd4
+  taffybar = appendPatches [
+    (pkgs.fetchpatch {
+      name = "taffybar-scotty-0.20.patch";
+      url = "https://github.com/taffybar/taffybar/commit/dcc4184fa63295d51b6c6efb2f97f23b13170e66.patch";
+      sha256 = "0hsn0zxpc8icabdq48jlkfn2v07xfjy4l344fnq2pbdc5apcm0fy";
+    })
+  ] super.taffybar;
+
   # fix tests failure for baseā‰„4.15 (https://github.com/kim/leveldb-haskell/pull/41)
   leveldb-haskell = appendPatch (fetchpatch {
     url = "https://github.com/kim/leveldb-haskell/commit/f5249081f589233890ddb1945ec548ca9fb717cf.patch";
     sha256 = "14gllipl28lqry73c5dnclsskzk1bsrrgazibl4lkl8z98j2csjb";
   }) super.leveldb-haskell;
 
+  # 2024-01-08: fix tests failure for fgl >= 5.8.1 https://github.com/koalaman/shellcheck/issues/2677
+  ShellCheck = appendPatch (fetchpatch {
+    url = "https://github.com/koalaman/shellcheck/commit/c05380d518056189412e12128a8906b8ca6f6717.patch";
+    hash = "sha256-FXZQ/D7ut84Yng2/denihDM8e+q04/t2LVALFbohfT0=";
+  }) super.ShellCheck;
+
   # Arion's test suite needs a Nixpkgs, which is cumbersome to do from Nixpkgs
   # itself. For instance, pkgs.path has dirty sources and puts a huge .git in the
   # store. Testing is done upstream.
@@ -269,8 +260,24 @@ self: super: {
   ghcjs-base = null;
   ghcjs-prim = null;
 
-  # 2023-04-17: https://gitlab.haskell.org/ghc/ghc-debug/-/issues/20
-  ghc-debug-brick = doJailbreak super.ghc-debug-brick;
+  # 2024-03-10: Compatibility fixes have been applied upstream, but are unreleased.
+  ghc-debug-brick = appendPatches [
+      (fetchpatch {
+        url = "https://gitlab.haskell.org/ghc/ghc-debug/-/commit/4f195b98a8d3159bd4586af49ea8e269214a848e.patch";
+        sha256 = "sha256-ZMxDkkI365w/qtRc21k9UTcIiTjoOd/BGJgt/6C6P6A=";
+        relative = "ghc-debug-brick";
+        includes = ["ghc-debug-brick.cabal"];
+      })
+      (fetchpatch {
+        url = "https://gitlab.haskell.org/ghc/ghc-debug/-/commit/5b8f848b82ea4c5a1867b9965a973e73e5d58dad.patch";
+        sha256 = "sha256-XydmqScUuXyxqvW1HeKlKiiGFQi/MkM81RMPxmADrhw=";
+        relative = "ghc-debug-brick";
+      })
+    ] super.ghc-debug-brick;
+
+  # Test failure.  Tests also disabled in Stackage:
+  # https://github.com/jtdaugherty/brick/issues/499
+  brick = dontCheck super.brick;
 
   # Needs older QuickCheck version
   attoparsec-varword = dontCheck super.attoparsec-varword;
@@ -304,19 +311,41 @@ self: super: {
     })
   ]) super.memory;
 
-  # Waiting for the commit being fetched as a patch to get a release.
-  espial = appendPatch (fetchpatch {
-    url = "https://github.com/jonschoning/espial/commit/70375db7e245207b3572779288eade3252c4d9e3.patch";
-    sha256 = "sha256-fto8fdFbZkzn7dwCCsGw+j+5HSvEvyvU5VzYDn4F2G8=";
-    excludes = ["*.yaml" "*.lock" "*.json"];
-  }) super.espial;
+  # Depends on outdated deps hedgehog < 1.4, doctest < 0.12 for tests
+  # As well as deepseq < 1.5 (so it forbids GHC 9.8)
+  hw-fingertree = doJailbreak super.hw-fingertree;
 
-  # 2023-06-10: Too strict version bound on https://github.com/haskell/ThreadScope/issues/118
-  threadscope = doJailbreak super.threadscope;
-
-  # Overriding the version pandoc dependency uses as the latest release has version bounds
-  # defined as >= 3.1  && < 3.2, can be removed once pandoc gets bumped by Stackage.
-  patat = super.patat.override { pandoc = self.pandoc_3_1_11; };
+  # 2024-03-10: Maintainance stalled, fixes unmerged: https://github.com/haskell/ThreadScope/pull/130
+  threadscope = overrideCabal (drv: {
+    prePatch = drv.prePatch or "" + ''
+      ${pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
+    '';
+    editedCabalFile = null;
+    revision = null;
+  })
+  (appendPatches [
+    (fetchpatch {
+      name = "loosen-bounds-1.patch";
+      url = "https://github.com/haskell/ThreadScope/commit/8f9f21449adb3af07eed539dcaf267c9c9ee987b.patch";
+      sha256 = "sha256-egKM060QplSmUeDptHXoSom1vf5KBrvNcjb2Vk59N7A=";
+    })
+    (fetchpatch {
+      name = "loosen-bounds-2.patch";
+      url = "https://github.com/haskell/ThreadScope/commit/f366a9ee455eda16cd6a4dc26f0275e2cf2b5798.patch";
+      sha256 = "sha256-DaPTK5LRbZZS1KDIr5X/eXQasqtofrCteTbUQUZPu0Q=";
+    })
+    (fetchpatch {
+      name = "loosen-bounds-3.patch";
+      url = "https://github.com/haskell/ThreadScope/commit/12819abaa2322976004b7582e598db1cf952707a.patch";
+      sha256 = "sha256-r7MVw8wwKU4R5VmcypBzhOBfTlRCISoRJtwie3+2Vb0=";
+    })
+    (fetchpatch {
+      name = "import-monad.patch";
+      url = "https://github.com/haskell/ThreadScope/commit/8846508e9769a8dfd82b3ff66259ba4d58255932.patch";
+      sha256 = "sha256-wBqDJWmqvmU1sFuw/ZlxHOb8xPhZO2RBuyYFP9bJCVI=";
+    })
+  ]
+    super.threadscope);
 
   # http2 also overridden in all-packages.nix for mailctl.
   # twain is currently only used by mailctl, so the .overrideScope shouldn't
@@ -329,6 +358,18 @@ self: super: {
   # > https://github.com/roelvandijk/numerals
   numerals = doJailbreak (dontCheck super.numerals);
 
+  # Bound on containers is too strict but jailbreak doesn't work with conditional flags
+  # https://github.com/NixOS/jailbreak-cabal/issues/24
+  containers-unicode-symbols = overrideCabal {
+    postPatch = ''
+      substituteInPlace containers-unicode-symbols.cabal \
+        --replace 'containers >= 0.5 && < 0.6.5' 'containers'
+    '';
+  } super.containers-unicode-symbols;
+
+  # Test file not included on hackage
+  numerals-base = dontCheck (doJailbreak super.numerals-base);
+
   # This test keeps being aborted because it runs too quietly for too long
   Lazy-Pbkdf2 = if pkgs.stdenv.isi686 then dontCheck super.Lazy-Pbkdf2 else super.Lazy-Pbkdf2;
 
@@ -356,16 +397,7 @@ self: super: {
         rm -r $out/doc/?ndroid*
       '';
     };
-
-    # Git annex provides a restricted login shell. Setting
-    # passthru.shellPath here allows a user's login shell to be set to
-    # `git-annex-shell` by making `shell = haskellPackages.git-annex`.
-    # https://git-annex.branchable.com/git-annex-shell/
-    passthru.shellPath = "/bin/git-annex-shell";
-  }) (super.git-annex.overrideScope (self: _: {
-    # https://github.com/haskell-pkg-janitors/unix-compat/issues/3
-    unix-compat = self.unix-compat_0_6;
-  }));
+  }) super.git-annex;
 
   # Too strict bounds on servant
   # Pending a hackage revision: https://github.com/berberman/arch-web/commit/5d08afee5b25e644f9e2e2b95380a5d4f4aa81ea#commitcomment-89230555
@@ -435,9 +467,10 @@ self: super: {
   hzk = dontCheck super.hzk;
   resolv_0_1_2_0 = doJailbreak super.resolv_0_1_2_0;
 
-  # Too strict bounds on base{,-orphans}, template-haskell
-  # https://github.com/sebastiaanvisser/fclabels/issues/44
-  fclabels = doJailbreak super.fclabels;
+  # Test suite doesn't compile with 9.6, 9.8
+  # https://github.com/sebastiaanvisser/fclabels/issues/45
+  # https://github.com/sebastiaanvisser/fclabels/issues/46
+  fclabels = dontCheck super.fclabels;
 
   # Tests require a Kafka broker running locally
   haskakafka = dontCheck super.haskakafka;
@@ -470,6 +503,10 @@ self: super: {
 
   inline-java = addBuildDepend pkgs.jdk super.inline-java;
 
+  # Too strict upper bound on unicode-transforms
+  # <https://gitlab.com/ngua/ipa-hs/-/issues/1>
+  ipa = doJailbreak super.ipa;
+
   # Upstream notified by e-mail.
   permutation = dontCheck super.permutation;
 
@@ -497,14 +534,12 @@ self: super: {
   msgpack-rpc = dontCheck super.msgpack-rpc;
   persistent-zookeeper = dontCheck super.persistent-zookeeper;
   pocket-dns = dontCheck super.pocket-dns;
-  postgresql-simple = dontCheck super.postgresql-simple;
   squeal-postgresql = dontCheck super.squeal-postgresql;
   postgrest-ws = dontCheck super.postgrest-ws;
   snowball = dontCheck super.snowball;
   sophia = dontCheck super.sophia;
   test-sandbox = dontCheck super.test-sandbox;
   texrunner = dontCheck super.texrunner;
-  users-postgresql-simple = dontCheck super.users-postgresql-simple;
   wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
   xkbcommon = dontCheck super.xkbcommon;
   xmlgen = dontCheck super.xmlgen;
@@ -524,17 +559,18 @@ self: super: {
   # 2023-04-20: Restrictive bytestring bound in tests.
   storablevector = doJailbreak super.storablevector;
 
-  # 2023-04-20: Pretends to need brick 1.6 but the commit history here
-  # https://github.com/matterhorn-chat/matterhorn/commits/master/matterhorn.cabal
-  # makes very clear that 1.4 is equally fine.
-  # Generally a slightly packaging hostile bound practice.
   matterhorn = doJailbreak super.matterhorn;
 
+  # Too strict bounds on transformers and resourcet
+  # https://github.com/alphaHeavy/lzma-conduit/issues/23
+  lzma-conduit = doJailbreak super.lzma-conduit;
+
   # 2020-06-05: HACK: does not pass own build suite - `dontCheck`
-  hnix = dontCheck (super.hnix.override {
+  # 2024-01-15: too strict bound on free < 5.2
+  hnix = doJailbreak (dontCheck (super.hnix.override {
     # 2023-12-11: Needs older core due to remote
     hnix-store-core = self.hnix-store-core_0_6_1_0;
-  });
+  }));
 
 
   # Too strict bounds on algebraic-graphs
@@ -554,9 +590,6 @@ self: super: {
   # https://github.com/ekmett/structures/issues/3
   structures = dontCheck super.structures;
 
-  # Requires alex >= 3.4
-  jacinda = super.jacinda.override { alex = self.alex_3_4_0_1; };
-
   # Disable test suites to fix the build.
   acme-year = dontCheck super.acme-year;                # http://hydra.cryp.to/build/497858/log/raw
   aeson-lens = dontCheck super.aeson-lens;              # http://hydra.cryp.to/build/496769/log/raw
@@ -681,7 +714,6 @@ self: super: {
   pipes-websockets = dontCheck super.pipes-websockets;
   posix-pty = dontCheck super.posix-pty; # https://github.com/merijn/posix-pty/issues/12
   postgresql-binary = dontCheck super.postgresql-binary; # needs a running postgresql server
-  postgresql-simple-migration = dontCheck super.postgresql-simple-migration;
   powerdns = dontCheck super.powerdns; # Tests require networking and external services
   process-streaming = dontCheck super.process-streaming;
   punycode = dontCheck super.punycode;
@@ -719,6 +751,10 @@ self: super: {
   xsd = dontCheck super.xsd;
   zip-archive = dontCheck super.zip-archive;  # https://github.com/jgm/zip-archive/issues/57
 
+  # 2023-01-11: Too strict bounds on optparse-applicative
+  # https://github.com/Gabriella439/bench/issues/49
+  bench = doJailbreak super.bench;
+
   # 2023-06-26: Test failure: https://hydra.nixos.org/build/224869905
   comfort-blas = dontCheck super.comfort-blas;
 
@@ -959,6 +995,9 @@ self: super: {
   selda-json
   ;
 
+  # 2024-03-10: Getting the test suite to run requires a correctly crafted GHC_ENVIRONMENT variable.
+  graphql-client = dontCheck super.graphql-client;
+
   # Build the latest git version instead of the official release. This isn't
   # ideal, but Chris doesn't seem to make official releases any more.
   structured-haskell-mode = overrideCabal (drv: {
@@ -1057,10 +1096,17 @@ self: super: {
 
   # Djinn's last release was 2014, incompatible with Semigroup-Monoid Proposal
   # https://github.com/augustss/djinn/pull/8
-  djinn = appendPatch (fetchpatch {
-    url = "https://github.com/augustss/djinn/commit/6cb9433a137fb6b5194afe41d616bd8b62b95630.patch";
-    sha256 = "0s021y5nzrh74gfp8xpxpxm11ivzfs3jwg6mkrlyry3iy584xqil";
-  }) super.djinn;
+  djinn = overrideSrc {
+    version = "unstable-2023-11-20";
+    src = pkgs.fetchFromGitHub {
+      owner = "augustss";
+      repo = "djinn";
+      rev = "69b3fbad9f42f0b1b2c49977976b8588c967d76e";
+      hash = "sha256-ibxn6DXk4pqsOsWhi8KcrlH/THnuMWvIu5ENOn3H3So=";
+    };
+  } super.djinn;
+
+  mueval = doJailbreak super.mueval;
 
   # We cannot build this package w/o the C library from <http://www.phash.org/>.
   phash = markBroken super.phash;
@@ -1280,37 +1326,6 @@ self: super: {
   dhall-nixpkgs = self.generateOptparseApplicativeCompletions [ "dhall-to-nixpkgs" ] (doJailbreak super.dhall-nixpkgs);
   dhall-yaml = self.generateOptparseApplicativeCompletions ["dhall-to-yaml-ng" "yaml-to-dhall"] super.dhall-yaml;
 
-  crypton-connection = super.crypton-connection.override {
-    # requires tls >= 1.7
-    tls = self.tls_1_9_0;
-  };
-
-  stack =
-    lib.pipe
-      super.stack
-      [
-        (self.generateOptparseApplicativeCompletions [ "stack" ])
-
-        # stack-2.13.1 requires a bunch of the latest packages.
-        (drv: drv.overrideScope (hfinal: hprev: {
-          ansi-terminal = hfinal.ansi-terminal_1_0; # needs ansi-terminal >= 1.0
-          crypton = hfinal.crypton_0_34; # needs crypton >= 0.33
-          hedgehog = doJailbreak hprev.hedgehog; # has too strict version bound for ansi-terminal
-          hpack = hfinal.hpack_0_36_0; # needs hpack == 0.36.0
-          http-client-tls = hfinal.http-client-tls_0_3_6_3; # needs http-client-tls >= 0.3.6.2
-          http-download = hfinal.http-download_0_2_1_0; # needs http-download >= 0.2.1.0
-          optparse-applicative = hfinal.optparse-applicative_0_18_1_0; # needs optparse-applicative >= 0.18.1.0
-          pantry = hfinal.pantry_0_9_3_1; # needs pantry >= 0.9.2
-          syb = dontCheck hprev.syb; # cyclic dependencies
-          tar-conduit = hfinal.tar-conduit_0_4_0; # pantry needs tar-conduit >= 0.4.0
-          temporary = dontCheck hprev.temporary; # cyclic dependencies
-        }))
-      ];
-
-  hopenpgp-tools = super.hopenpgp-tools.override {
-    optparse-applicative = self.optparse-applicative_0_18_1_0;
-  };
-
   # musl fixes
   # dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test
   unix-time = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.unix-time else super.unix-time;
@@ -1369,12 +1384,32 @@ self: super: {
   # https://github.com/mgajda/json-autotype/issues/25
   json-autotype = dontCheck super.json-autotype;
 
-  # Requires pg_ctl command during tests
-  beam-postgres = overrideCabal (drv: {
-    # https://github.com/NixOS/nixpkgs/issues/198495
-    doCheck = pkgs.postgresql.doCheck;
-    testToolDepends = (drv.testToolDepends or []) ++ [pkgs.postgresql];
-  }) super.beam-postgres;
+  postgresql-simple-migration = overrideCabal (drv: {
+      preCheck = ''
+        PGUSER=test
+        PGDATABASE=test
+      '';
+      testToolDepends = drv.testToolDepends or [] ++ [
+        pkgs.postgresql
+        pkgs.postgresqlTestHook
+      ];
+    }) (doJailbreak super.postgresql-simple-migration);
+
+  postgresql-simple = addTestToolDepends [
+    pkgs.postgresql
+    pkgs.postgresqlTestHook
+  ] super.postgresql-simple;
+
+  beam-postgres = lib.pipe super.beam-postgres [
+    # Requires pg_ctl command during tests
+    (addTestToolDepends [pkgs.postgresql])
+    (dontCheckIf (!pkgs.postgresql.doCheck))
+  ];
+
+  users-postgresql-simple = addTestToolDepends [
+    pkgs.postgresql
+    pkgs.postgresqlTestHook
+  ] super.users-postgresql-simple;
 
   # PortMidi needs an environment variable to have ALSA find its plugins:
   # https://github.com/NixOS/nixpkgs/issues/6860
@@ -1415,8 +1450,6 @@ self: super: {
           sed -i test/PostgreSQL/Test.hs \
             -e s^host=localhost^^
         '';
-        # https://github.com/NixOS/nixpkgs/issues/198495
-        doCheck = pkgs.postgresql.doCheck;
         # Match the test suite defaults (or hardcoded values?)
         preCheck = drv.preCheck or "" + ''
           PGUSER=esqutest
@@ -1431,7 +1464,8 @@ self: super: {
           pkgs.postgresqlTestHook
         ];
       })
-      super.esqueleto;
+      # https://github.com/NixOS/nixpkgs/issues/198495
+      (dontCheckIf (!pkgs.postgresql.doCheck) super.esqueleto);
 
   # Requires API keys to run tests
   algolia = dontCheck super.algolia;
@@ -1533,14 +1567,11 @@ self: super: {
           sed -i test/PgInit.hs \
             -e s^'host=" <> host <> "'^^
         '';
-        doCheck =
-          # https://github.com/commercialhaskell/stackage/issues/6884
-          # persistent-postgresql-2.13.5.1 needs persistent-test >= 2.13.1.3 which
-          # is incompatible with the stackage version of persistent, so the tests
-          # are disabled temporarily.
-          false
-          # https://github.com/NixOS/nixpkgs/issues/198495
-          && pkgs.postgresql.doCheck;
+        # https://github.com/commercialhaskell/stackage/issues/6884
+        # persistent-postgresql-2.13.5.1 needs persistent-test >= 2.13.1.3 which
+        # is incompatible with the stackage version of persistent, so the tests
+        # are disabled temporarily.
+        doCheck = false;
         preCheck = drv.preCheck or "" + ''
           PGDATABASE=test
           PGUSER=test
@@ -1550,7 +1581,8 @@ self: super: {
           pkgs.postgresqlTestHook
         ];
       })
-      super.persistent-postgresql;
+      # https://github.com/NixOS/nixpkgs/issues/198495
+      (dontCheckIf (!pkgs.postgresql.doCheck) super.persistent-postgresql);
 
   # Test suite requires a later version of persistent-test which depends on persistent 2.14
   # https://github.com/commercialhaskell/stackage/issues/6884
@@ -1563,20 +1595,32 @@ self: super: {
   # upstream: https://github.com/obsidiansystems/which/pull/6
   which = doJailbreak super.which;
 
-  dhall-lsp-server =
-    # 2022-09-20: We have overridden lsp to not be the stackage version.
-    # dhall-lsp-server needs the older 1.4.0.0 lsp
-    let overridden-dhall-lsp-server = super.dhall-lsp-server.override {
-          lsp = dontCheck (super.lsp_1_4_0_0.override {
-            lsp-types = super.lsp-types_1_4_0_1;
-          });
-        };
-    in appendPatch (fetchpatch {
-      # This patch can be removed once the change question is in a tracked release.
-      url = "https://github.com/dhall-lang/dhall-haskell/pull/2539/commits/5dd0f0ba2d836fea3ef499c7aed04e83269c203f.patch";
-      sha256 = "sha256-xjVuLDBptDGfTf7MVmPb0WuuFWRLpgDYX2ybbgjAjzs=";
-      relative = "dhall-lsp-server";
-    }) overridden-dhall-lsp-server;
+
+  # 2024-02-28: The Hackage version dhall-lsp-server-1.1.3 requires
+  # lsp-1.4.0.0 which is hard to build with this LTS. However, the latest
+  # git version of dhall-lsp-server works with lsp-2.1.0.0, and only
+  # needs jailbreaking to build successfully.
+  dhall-lsp-server = lib.pipe
+    (super.dhall-lsp-server.overrideScope (lself: lsuper: {
+      lsp = doJailbreak lself.lsp_2_1_0_0;  # sorted-list <0.2.2
+      lsp-types = lself.lsp-types_2_0_2_0;
+    }))
+    [
+      # Use latest main branch version of dhall-lsp-server.
+      (assert super.dhall-lsp-server.version == "1.1.3"; overrideSrc {
+        version = "unstable-2024-02-19";
+        src = pkgs.fetchFromGitHub {
+          owner = "dhall-lang";
+          repo = "dhall-haskell";
+          rev = "277d8b1b3637ba2ce125783cc1936dc9591e67a7";
+          hash = "sha256-YvL3XEltU9sdU45ULHeD3j1mPGZoO1J81MW7f2+10ok=";
+        } + "/dhall-lsp-server";
+      })
+      # New version needs an extra dependency
+      (addBuildDepend self.text-rope)
+      # bounds too strict: mtl <2.3, transformers <0.6
+      doJailbreak
+    ];
 
   # 2022-03-16: lens bound can be loosened https://github.com/ghcjs/jsaddle-dom/issues/19
   jsaddle-dom = overrideCabal (old: {
@@ -1585,28 +1629,48 @@ self: super: {
     '';
   }) (doJailbreak super.jsaddle-dom);
 
+  reflex-dom = lib.pipe super.reflex-dom [
+      (appendPatch
+        (fetchpatch {
+          name = "bump-reflex-dom-bounds.patch";
+          url = "https://github.com/reflex-frp/reflex-dom/commit/70ff88942f9d2bcd364e301c70df8702f452df38.patch";
+          sha256 = "sha256-xzk1+6CnfhEBfXdL5RUFbLRSn7knMwydmV8v2F2W5gE=";
+          relative = "reflex-dom";
+        })
+      )
+      (overrideCabal (drv: {
+        editedCabalFile = null;
+        revision = null;
+      }))
+    ];
+
   # Tests disabled and broken override needed because of missing lib chrome-test-utils: https://github.com/reflex-frp/reflex-dom/issues/392
   # 2022-03-16: Pullrequest for ghc 9 compat https://github.com/reflex-frp/reflex-dom/pull/433
-  reflex-dom-core = overrideCabal (old: {
-    postPatch = old.postPatch or "" + ''
-      sed -i 's/template-haskell.*2.17/template-haskell/' reflex-dom-core.cabal
-      sed -i 's/semialign.*1.3/semialign/' reflex-dom-core.cabal
-      sed -i 's/these.*0.9/these/' reflex-dom-core.cabal
-    '';
-    })
-    ((appendPatches [
-      (fetchpatch {
-        url = "https://github.com/reflex-frp/reflex-dom/commit/1814640a14c6c30b1b2299e74d08fb6fcaadfb94.patch";
-        sha256 = "sha256-QyX2MLd7Tk0M1s0DU0UV3szXs8ngz775i3+KI62Q3B8=";
-        relative = "reflex-dom-core";
-      })
-      (fetchpatch {
-        url = "https://github.com/reflex-frp/reflex-dom/commit/56fa8a484ccfc7d3365d07fea3caa430155dbcac.patch";
-        sha256 = "sha256-IogAYJZac17Bg99ZnnFX/7I44DAnHo2PRBWD0iVHbNA=";
-        relative = "reflex-dom-core";
-      })
-    ]
-          (doDistribute (unmarkBroken (dontCheck (doJailbreak super.reflex-dom-core))))));
+  reflex-dom-core = lib.pipe super.reflex-dom-core [
+      doDistribute
+      unmarkBroken
+      dontCheck
+      (appendPatches [
+        (fetchpatch {
+          name = "fix-th-build-order.patch";
+          url = "https://github.com/reflex-frp/reflex-dom/commit/1814640a14c6c30b1b2299e74d08fb6fcaadfb94.patch";
+          sha256 = "sha256-QyX2MLd7Tk0M1s0DU0UV3szXs8ngz775i3+KI62Q3B8=";
+          relative = "reflex-dom-core";
+        })
+        (fetchpatch {
+          name = "bump-reflex-dom-core-bounds.patch";
+          url = "https://github.com/reflex-frp/reflex-dom/commit/51cdd96dde9d65fcde326a16a797397bf62102d9.patch";
+          sha256 = "sha256-Ct8gMbXqN+6vqTwFiqnKxddAfs+YFaBocF4G7PPMzFo=";
+          relative = "reflex-dom-core";
+        })
+        (fetchpatch {
+          name = "new-mtl-compat.patch";
+          url = "https://github.com/reflex-frp/reflex-dom/commit/df95bfc0b9baf70492f20daddfe6bb180f80c413.patch";
+          sha256 = "sha256-zkLZtcnfqpfiv6zDEmkZjWHr2b7lOnZ4zujm0/pkxQg=";
+          relative = "reflex-dom-core";
+        })
+      ])
+    ];
 
   # Tests disabled because they assume to run in the whole jsaddle repo and not the hackage tarball of jsaddle-warp.
   jsaddle-warp = dontCheck super.jsaddle-warp;
@@ -1630,18 +1694,22 @@ self: super: {
     libraryToolDepends = (drv.libraryToolDepends or []) ++ [self.buildHaskellPackages.c2hs];
   }) super.libsodium;
 
-  svgcairo = appendPatches [
-    # Remove when https://github.com/gtk2hs/svgcairo/pull/12 goes in.
-    (fetchpatch {
-      url = "https://github.com/gtk2hs/svgcairo/commit/348c60b99c284557a522baaf47db69322a0a8b67.patch";
-      sha256 = "0akhq6klmykvqd5wsbdfnnl309f80ds19zgq06sh1mmggi54dnf3";
-    })
-    # Remove when https://github.com/gtk2hs/svgcairo/pull/13 goes in.
-    (fetchpatch {
-      url = "https://github.com/dalpd/svgcairo/commit/d1e0d7ae04c1edca83d5b782e464524cdda6ae85.patch";
-      sha256 = "1pq9ld9z67zsxj8vqjf82qwckcp69lvvnrjb7wsyb5jc6jaj3q0a";
-    })
-  ] super.svgcairo;
+  svgcairo = overrideCabal (drv: {
+    patches = drv.patches or [ ] ++ [
+      # Remove when https://github.com/gtk2hs/svgcairo/pull/12 goes in.
+      (fetchpatch {
+        url = "https://github.com/gtk2hs/svgcairo/commit/348c60b99c284557a522baaf47db69322a0a8b67.patch";
+        sha256 = "0akhq6klmykvqd5wsbdfnnl309f80ds19zgq06sh1mmggi54dnf3";
+      })
+      # Remove when https://github.com/gtk2hs/svgcairo/pull/13 goes in.
+      (fetchpatch {
+        url = "https://github.com/dalpd/svgcairo/commit/d1e0d7ae04c1edca83d5b782e464524cdda6ae85.patch";
+        sha256 = "1pq9ld9z67zsxj8vqjf82qwckcp69lvvnrjb7wsyb5jc6jaj3q0a";
+      })
+    ];
+    editedCabalFile = null;
+    revision = null;
+  }) super.svgcairo;
 
   # Upstream PR: https://github.com/jkff/splot/pull/9
   splot = appendPatch (fetchpatch {
@@ -1649,11 +1717,12 @@ self: super: {
     sha256 = "1c5ck2ibag2gcyag6rjivmlwdlp5k0dmr8nhk7wlkzq2vh7zgw63";
   }) super.splot;
 
-  # Fix build with newer monad-logger: https://github.com/obsidiansystems/monad-logger-extras/pull/5
+  # 2023-07-27: Fix build with newer monad-logger: https://github.com/obsidiansystems/monad-logger-extras/pull/5
+  # 2024-03-02: jailbreak for ansi-terminal <0.12, mtl <2.3
   monad-logger-extras = appendPatch (fetchpatch {
     url = "https://github.com/obsidiansystems/monad-logger-extras/commit/55d414352e740a5ecacf313732074d9b4cf2a6b3.patch";
     sha256 = "sha256-xsQbr/QIrgWR0uwDPtV0NRTbVvP0tR9bY9NMe1JzqOw=";
-  }) super.monad-logger-extras;
+  }) (doJailbreak super.monad-logger-extras);
 
   # Fails with encoding problems, likely needs locale data.
   # Test can be executed by adding which to testToolDepends and
@@ -1707,21 +1776,24 @@ self: super: {
   hasura-ekg-json = super.hasura-ekg-json.override {
     ekg-core = self.hasura-ekg-core;
   };
-  pg-client = overrideCabal (drv: {
-    librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ];
-    testToolDepends = drv.testToolDepends or [] ++ [
-      pkgs.postgresql pkgs.postgresqlTestHook
+  pg-client = lib.pipe
+    (super.pg-client.override {
+      resource-pool = self.hasura-resource-pool;
+      ekg-core = self.hasura-ekg-core;
+    }) [
+      (overrideCabal (drv: {
+        librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ];
+        testToolDepends = drv.testToolDepends or [] ++ [
+          pkgs.postgresql pkgs.postgresqlTestHook
+        ];
+        preCheck = drv.preCheck or "" + ''
+          # empty string means use default connection
+          export DATABASE_URL=""
+        '';
+      }))
+      # https://github.com/NixOS/nixpkgs/issues/198495
+      (dontCheckIf (!pkgs.postgresql.doCheck))
     ];
-    # https://github.com/NixOS/nixpkgs/issues/198495
-    doCheck = pkgs.postgresql.doCheck;
-    preCheck = drv.preCheck or "" + ''
-      # empty string means use default connection
-      export DATABASE_URL=""
-    '';
-  }) (super.pg-client.override {
-    resource-pool = self.hasura-resource-pool;
-    ekg-core = self.hasura-ekg-core;
-  });
 
   hcoord = overrideCabal (drv: {
     # Remove when https://github.com/danfran/hcoord/pull/8 is merged.
@@ -1735,6 +1807,15 @@ self: super: {
     doCheck = false;
   }) super.hcoord;
 
+  # Break infinite recursion via tasty
+  temporary = dontCheck super.temporary;
+
+  # Break infinite recursion via doctest-lib
+  utility-ht = dontCheck super.utility-ht;
+
+  # Break infinite recursion via optparse-applicative (alternatively, dontCheck syb)
+  prettyprinter-ansi-terminal = dontCheck super.prettyprinter-ansi-terminal;
+
   # Tests rely on `Int` being 64-bit: https://github.com/hspec/hspec/issues/431.
   # Also, we need QuickCheck-2.14.x to build the test suite, which isn't easy in LTS-16.x.
   # So let's not go there and just disable the tests altogether.
@@ -1798,9 +1879,25 @@ self: super: {
   # https://github.com/obsidiansystems/dependent-sum/issues/55
   dependent-sum = doJailbreak super.dependent-sum;
 
+  # 2024-02-03: Jailbreak because pretty much every dependency has
+  # tight bounds, and disable building the example executable because
+  # it's not compatible with Reflex 0.9 (the library itself is
+  # compatible however).
+  # https://gitlab.com/Kritzefitz/reflex-gi-gtk/-/merge_requests/16
+  reflex-gi-gtk = assert super.reflex-gi-gtk.version == "0.2.0.0";
+    overrideCabal (drv: {
+      jailbreak = true;
+      buildTarget = drv.pname;  # just the library
+    }) super.reflex-gi-gtk;
+
   # 2022-06-19: Disable checks because of https://github.com/reflex-frp/reflex/issues/475
   reflex = doJailbreak (dontCheck super.reflex);
 
+  # 2024-03-02: hspec <2.11, primitive <0.8 - https://github.com/reflex-frp/reflex-vty/pull/80
+  reflex-vty = assert super.reflex-vty.version == "0.5.2.0"; doJailbreak super.reflex-vty;
+  # 2024-03-02: vty <5.39 - https://github.com/reflex-frp/reflex-ghci/pull/33
+  reflex-ghci = assert super.reflex-ghci.version == "0.2.0.1"; doJailbreak super.reflex-ghci;
+
   # 2020-11-19: jailbreaking because of pretty-simple bound out of date
   # https://github.com/kowainik/stan/issues/408
   # Tests disabled because of: https://github.com/kowainik/stan/issues/409
@@ -1821,23 +1918,6 @@ self: super: {
   # https://github.com/biocad/servant-openapi3/issues/30
   servant-openapi3 = dontCheck super.servant-openapi3;
 
-  # Give latest hspec correct dependency versions without overrideScope
-  hspec_2_11_7 = doDistribute (super.hspec_2_11_7.override {
-    hspec-discover = self.hspec-discover_2_11_7;
-    hspec-core = self.hspec-core_2_11_7;
-  });
-  hspec-meta_2_11_7 = doDistribute (super.hspec-meta_2_11_7.override {
-    hspec-expectations = self.hspec-expectations_0_8_4;
-  });
-  hspec-discover_2_11_7 = doDistribute (super.hspec-discover_2_11_7.override {
-    hspec-meta = self.hspec-meta_2_11_7;
-  });
-  # Need to disable tests to prevent an infinite recursion if hspec-core_2_11_7
-  # is overlayed to hspec-core.
-  hspec-core_2_11_7 = doDistribute (dontCheck (super.hspec-core_2_11_7.override {
-    hspec-expectations = self.hspec-expectations_0_8_4;
-  }));
-
   # Point hspec 2.7.10 to correct dependencies
   hspec_2_7_10 = super.hspec_2_7_10.override {
     hspec-discover = self.hspec-discover_2_7_10;
@@ -1932,8 +2012,16 @@ self: super: {
     "--haddock-option=--optghc=-fno-safe-haskell"
   ] super.alg;
 
+  # Windows.normalise changed in filepath >= 1.4.100.4 which fails the equivalency
+  # test suite. This is of no great consequence for us, though.
+  # Patch solving this has been submitted to upstream by me (@sternenseemann).
+  filepath-bytestring =
+    lib.warnIf
+      (lib.versionAtLeast super.filepath-bytestring.version "1.4.100.4")
+      "filepath-bytestring override may be obsolete"
+      dontCheck super.filepath-bytestring;
+
   # Break out of overspecified constraint on QuickCheck.
-  filepath-bytestring = doJailbreak super.filepath-bytestring;
   haddock-library = doJailbreak super.haddock-library;
 
   # Test suite has overly strict bounds on tasty, jailbreaking fails.
@@ -1948,7 +2036,10 @@ self: super: {
   vivid-supercollider = dontCheck super.vivid-supercollider;
 
   # Test suite does not compile.
-  feed = dontCheck super.feed;
+  feed = overrideCabal (drv: {
+    jailbreak = lib.warnIf (lib.toInt drv.revision >= 4) "haskellPackages.feed: jailbreak can be removed" true;
+    doCheck = false;
+  }) super.feed;
 
   spacecookie = overrideCabal (old: {
     buildTools = (old.buildTools or []) ++ [ pkgs.buildPackages.installShellFiles ];
@@ -1977,50 +2068,6 @@ self: super: {
   # test suite doesn't compile anymore due to changed hunit/tasty APIs
   fullstop = dontCheck super.fullstop;
 
-  # https://github.com/jgm/pandoc/issues/7163
-  pandoc = dontCheck super.pandoc;
-
-  # Since pandoc-3, the actual `pandoc` executable is in the pandoc-cli
-  # package.  It is no longer distributed in the pandoc package itself.  So for
-  # people that want to use the `pandoc` cli tool, they must use pandoc-cli.
-  #
-  # The unfortunate thing is that LTS-21 includes no possible build plan for
-  # pandoc-cli, because pandoc-cli pandoc-lua-engine are not in LTS 21.
-  # To get pandoc-lua-engine building we need either to downgrade a ton
-  # of hslua-module-* packages from stackage or use pandoc 3.1 although
-  # LTS contains pandoc 3.0.
-  inherit (let
-    pandoc-cli-overlay = self: super: {
-      # pandoc-cli requires pandoc >= 3.1
-      pandoc = self.pandoc_3_1_11;
-
-      # pandoc depends on http-client-tls, which only starts depending
-      # on crypton-connection in http-client-tls-0.3.6.2.
-      http-client-tls = self.http-client-tls_0_3_6_3;
-
-      # pandoc depends on skylighting >= 0.14
-      skylighting = self.skylighting_0_14_1;
-      skylighting-core = self.skylighting-core_0_14_1;
-
-      # pandoc needs up to date typst
-      typst-symbols = self.typst-symbols_0_1_5;
-      # and texmath to match
-      texmath = self.texmath_0_12_8_6;
-    };
-  in {
-    pandoc-cli = super.pandoc-cli.overrideScope pandoc-cli-overlay;
-    pandoc_3_1_11 = doDistribute (super.pandoc_3_1_11.overrideScope pandoc-cli-overlay);
-    pandoc-lua-engine = super.pandoc-lua-engine.overrideScope pandoc-cli-overlay;
-  })
-    pandoc-cli
-    pandoc_3_1_11
-    pandoc-lua-engine
-    ;
-
-  # Doesn't work without typst-symbols >= 0.1.5 which conflicts with Stackage
-  # TODO(@sternenseemann): clean up with Stackage LTS 22
-  typst = dontDistribute super.typst;
-
   crypton-x509 =
     lib.pipe
       super.crypton-x509
@@ -2092,19 +2139,6 @@ self: super: {
   # 2022-12-28: Too strict version bounds on bytestring
   iconv = doJailbreak super.iconv;
 
-  # 2021-04-02: iCalendar is basically unmaintained.
-  # There is a PR for fixing the build: https://github.com/chrra/iCalendar/pull/50
-  iCalendar = appendPatches [
-    (fetchpatch {
-      url = "https://github.com/chrra/iCalendar/commit/66b408f10b2d87929ecda715109b26093c711823.patch";
-      sha256 = "sha256-MU5OHUx3L8CaX+xAmoQhAAOMxT7u9Xk1OcOaUHBwK3Y=";
-    })
-    (fetchpatch {
-      url = "https://github.com/chrra/iCalendar/commit/76f5d2e8328cb985f1ee5176e86a5cdd05a17934.patch";
-      sha256 = "sha256-Z5V8VTA5Ml9YIRANQn2aD7dljAbR9dq13N11Y3LZdoE=";
-    })
-   ] super.iCalendar;
-
   ginger = doJailbreak super.ginger;
 
   # Too strict version bounds on cryptonite
@@ -2222,14 +2256,9 @@ self: super: {
     sha256 = "sha256-AVQLvul3ufxGQyoXud05qauclNanf6kunip0oJ/9lWQ=";
   }) (dontCheck super.yi-language);
 
-  # 2022-03-22: Jailbreak for base bound: https://github.com/reflex-frp/reflex-dom/pull/433
-  reflex-dom = assert super.reflex-dom.version == "0.6.1.1"; doJailbreak super.reflex-dom;
-
   # Tests need to lookup target triple x86_64-unknown-linux
   # https://github.com/llvm-hs/llvm-hs/issues/334
-  llvm-hs = overrideCabal {
-    doCheck = pkgs.stdenv.targetPlatform.system == "x86_64-linux";
-  } super.llvm-hs;
+  llvm-hs = dontCheckIf (pkgs.stdenv.targetPlatform.system != "x86_64-linux") super.llvm-hs;
 
   # Fix build with bytestring >= 0.11 (GHC 9.2)
   # https://github.com/llvm-hs/llvm-hs/pull/389
@@ -2272,6 +2301,21 @@ self: super: {
   gi-gtk-declarative = doJailbreak super.gi-gtk-declarative;
   gi-gtk-declarative-app-simple = doJailbreak super.gi-gtk-declarative-app-simple;
 
+  gi-gtk_4 = self.gi-gtk_4_0_8;
+  gi-gtk_4_0_8 = doDistribute (super.gi-gtk_4_0_8.override {
+    gi-gdk = self.gi-gdk_4;
+  });
+  gi-gdk_4 = self.gi-gdk_4_0_7;
+  gi-gdk_4_0_7 = doDistribute super.gi-gdk_4_0_7;
+  # GSK is only used for GTK 4.
+  gi-gsk = super.gi-gsk.override {
+    gi-gdk = self.gi-gdk_4;
+  };
+  gi-adwaita = super.gi-adwaita.override {
+    gi-gdk = self.gi-gdk_4;
+    gi-gtk = self.gi-gtk_4;
+  };
+
   # Missing dependency on gi-cairo
   # https://github.com/haskell-gi/haskell-gi/pull/420
   gi-vte =
@@ -2294,6 +2338,9 @@ self: super: {
     Cabal-syntax = self.Cabal-syntax_3_10_2_0;
   }));
 
+  # Too strict bound on hspec (<2.11)
+  utf8-light = doJailbreak super.utf8-light;
+
   large-hashable = lib.pipe (super.large-hashable.override {
     # https://github.com/factisresearch/large-hashable/commit/5ec9d2c7233fc4445303564047c992b693e1155c
     utf8-light = null;
@@ -2393,8 +2440,6 @@ self: super: {
     language-docker = self.language-docker_11_0_0;
   };
 
-  nix-tree = super.nix-tree;
-
   # test suite requires stack to run, https://github.com/dino-/photoname/issues/24
   photoname = dontCheck super.photoname;
 
@@ -2544,14 +2589,33 @@ self: super: {
   # 2023-07-18: https://github.com/srid/ema/issues/156
   ema = doJailbreak super.ema;
 
+  # 2024-03-02: base <=4.18.0.0  https://github.com/srid/url-slug/pull/2
+  url-slug = doJailbreak super.url-slug;
+
   glirc = doJailbreak (super.glirc.override {
     vty = self.vty_5_35_1;
   });
 
   # Too strict bounds on text and tls
   # https://github.com/barrucadu/irc-conduit/issues/54
-  irc-conduit = doJailbreak super.irc-conduit;
-  irc-client = doJailbreak super.irc-client;
+  # Use crypton-connection instead of connection
+  # https://github.com/barrucadu/irc-conduit/pull/60 https://github.com/barrucadu/irc-client/pull/101
+  irc-conduit = appendPatch (pkgs.fetchpatch {
+    url = "https://github.com/barrucadu/irc-conduit/pull/60/commits/58f6b5ee0c23a0615e43292dbbacf40636dcd7a6.patch";
+    hash = "sha256-d08tb9iL07mBWdlZ7PCfTLVFJLgcxeGVPzJ+jOej8io=";
+  }) (doJailbreak (super.irc-conduit.override {
+    connection = self.crypton-connection;
+    x509-validation = self.crypton-x509-validation;
+  }));
+  irc-client = appendPatch (pkgs.fetchpatch {
+    url = "https://github.com/barrucadu/irc-client/pull/101/commits/0440b7e2ce943d960234c50957a55025771f567a.patch";
+    hash = "sha256-iZyZMrodgViXFCMH9y2wIJZRnjd6WhkqInAdykqTdkY=";
+  }) (doJailbreak (super.irc-client.override {
+    connection = self.crypton-connection;
+    x509 = self.crypton-x509;
+    x509-store = self.crypton-x509-store;
+    x509-validation = self.crypton-x509-validation;
+  }));
 
   # 2022-02-25: Unmaintained and to strict upper bounds
   paths = doJailbreak super.paths;
@@ -2762,9 +2826,35 @@ self: super: {
   # multiple bounds too strict
   snaplet-sqlite-simple = doJailbreak super.snaplet-sqlite-simple;
 
-  emanote = super.emanote.overrideScope (lself: lsuper: {
-    commonmark-extensions = lself.commonmark-extensions_0_2_3_2;
-  });
+  # Test failure https://gitlab.com/lysxia/ap-normalize/-/issues/2
+  ap-normalize = dontCheck super.ap-normalize;
+
+  heist-extra = doJailbreak super.heist-extra;  # base <4.18.0.0.0
+  unionmount = doJailbreak super.unionmount;  # base <4.18
+  path-tree = doJailbreak super.path-tree;  # base <4.18  https://github.com/srid/pathtree/pull/1
+  tailwind = doJailbreak super.tailwind;  # base <=4.17.0.0
+  tagtree = doJailbreak super.tagtree;  # base <=4.17  https://github.com/srid/tagtree/issues/1
+  commonmark-wikilink = doJailbreak super.commonmark-wikilink; # base <4.18.0.0.0
+
+  # 2024-03-02: Apply unreleased changes necessary for compatibility
+  # with commonmark-extensions-0.2.5.3.
+  commonmark-simple = assert super.commonmark-simple.version == "0.1.0.0";
+    appendPatches (map ({ rev, hash }: fetchpatch {
+      name = "commonmark-simple-${lib.substring 0 7 rev}.patch";
+      url = "https://github.com/srid/commonmark-simple/commit/${rev}.patch";
+      includes = [ "src/Commonmark/Simple.hs" ];
+      inherit hash;
+    }) [
+      {
+        rev = "71f5807ed4cbd8da915bf5ba04cd115b49980bcb";
+        hash = "sha256-ibDQbyTd2BoA0V+ldMOr4XYurnqk1nWzbJ15tKizHrM=";
+      }
+      {
+        rev = "fc106c94f781f6a35ef66900880edc08cbe3b034";
+        hash = "sha256-9cpgRNFWhpSuSttAvnwPiLmi1sIoDSYbp0sMwcKWgDQ=";
+      }
+    ])
+      (doJailbreak super.commonmark-simple);
 
   # Test files missing from sdist
   # https://github.com/tweag/webauthn/issues/166
@@ -2777,10 +2867,8 @@ self: super: {
   co-log-polysemy = doJailbreak super.co-log-polysemy;
   co-log-polysemy-formatting = doJailbreak super.co-log-polysemy-formatting;
 
-  # 2023-12-20: Needs newer hasql-pool package and extra dependencies
-  postgrest = lib.pipe (super.postgrest.overrideScope (lself: lsuper: {
-    hasql-pool = lself.hasql-pool_0_10_0_1;
-  })) [
+  postgrest = lib.pipe super.postgrest [
+    # 2023-12-20: New version needs extra dependencies
     (addBuildDepends [ self.extra self.fuzzyset_0_2_4 self.cache self.timeit ])
     # 2022-12-02: Too strict bounds: https://github.com/PostgREST/postgrest/issues/2580
     doJailbreak
@@ -2796,6 +2884,10 @@ self: super: {
     })
   ];
 
+  # Too strict bounds on hspec < 2.11
+  fuzzyset_0_2_4 = doJailbreak super.fuzzyset_0_2_4;
+  swagger2 = doJailbreak super.swagger2;
+
   html-charset = dontCheck super.html-charset;
 
   # true-name-0.1.0.4 has been tagged, but has not been released to Hackage.
@@ -2857,6 +2949,12 @@ self: super: {
   # The hackage source is somehow missing a file present in the repo (tests/ListStat.hs).
   sym = dontCheck super.sym;
 
+  # 2024-01-23: https://github.com/composewell/unicode-data/issues/118
+  unicode-data = dontCheck super.unicode-data;
+
+  # 2024-01-24: https://github.com/haskellari/tree-diff/issues/79
+  tree-diff = dontCheck super.tree-diff;
+
   # Too strict bounds on base, ghc-prim, primitive
   # https://github.com/kowainik/typerep-map/pull/128
   typerep-map = doJailbreak super.typerep-map;
@@ -2864,6 +2962,9 @@ self: super: {
   # Too strict bounds on base
   kewar = doJailbreak super.kewar;
 
+  # Too strict bounds on mtl, servant and servant-client
+  unleash-client-haskell = doJailbreak super.unleash-client-haskell;
+
   # Tests rely on (missing) submodule
   unleash-client-haskell-core = dontCheck super.unleash-client-haskell-core;
 
@@ -2877,25 +2978,69 @@ self: super: {
     libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.buildPackages.git];
   }) super.kmonad;
 
-  # Both of these need specific versions of ghc-lib-parser, the minor releases
-  # seem to be tied.
-  ghc-syntax-highlighter_0_0_10_0 = super.ghc-syntax-highlighter_0_0_10_0.overrideScope(self: super: {
-    ghc-lib-parser = self.ghc-lib-parser_9_6_3_20231121;
-  });
   ghc-syntax-highlighter_0_0_11_0 = super.ghc-syntax-highlighter_0_0_11_0.overrideScope(self: super: {
     ghc-lib-parser = self.ghc-lib-parser_9_8_1_20231121;
   });
 
+  # 2024-03-17: broken
+  vaultenv = dontDistribute super.vaultenv;
+
+  # Support base16 1.0
+  nix-serve-ng = appendPatch (fetchpatch {
+    url = "https://github.com/aristanetworks/nix-serve-ng/commit/4d9eacfcf753acbcfa0f513bec725e9017076270.patch";
+    hash = "sha256-zugyUpEq/iVkxghrvguL95+lJDEpE8MLvZivken0p24=";
+  }) super.nix-serve-ng;
+
   # Needs a matching version of ipython-kernel and a
   # ghc-syntax-highlighter compatible with a newer ghc-lib-parser it
   # transitively pulls in
   ihaskell = super.ihaskell.overrideScope (self: super: {
-    ipython-kernel = self.ipython-kernel_0_11_0_0;
     ghc-syntax-highlighter = self.ghc-syntax-highlighter_0_0_10_0;
   });
 
-  # 2024-01-01: Too strict bounds on megaparsec
-  # Fixed in 0.2.8: https://github.com/PostgREST/configurator-pg/pull/20
-  configurator-pg = doJailbreak super.configurator-pg;
+  # 2024-01-24: support optparse-applicative 0.18
+  niv = appendPatches [
+    (fetchpatch {
+      # needed for the following patch to apply
+      url = "https://github.com/nmattia/niv/commit/7b76374b2b44152bfbf41fcb60162c2ce9182e7a.patch";
+      includes = [ "src/*" ];
+      hash = "sha256-3xG+GD6fUCGgi2EgS7WUpjfn6gvc2JurJcIrnyy4ys8=";
+    })
+    (fetchpatch {
+      # Update to optparse-applicative 0.18
+      url = "https://github.com/nmattia/niv/commit/290965abaa02be33b601032d850c588a6bafb1a5.patch";
+      hash = "sha256-YxUdv4r/Fx+8YxHhqEuS9uZR1XKzVCPrLmj5+AY5GRA=";
+    })
+  ] super.niv;
+
+  inherit
+    (let
+      unbreakRepa = packageName: drv: lib.pipe drv [
+        # 2023-12-23: Apply build fixes for ghc >=9.4
+        (appendPatches (lib.optionals (lib.versionAtLeast self.ghc.version "9.4") (repaPatches.${packageName} or [])))
+        # 2023-12-23: jailbreak for base <4.17, vector <0.13
+        doJailbreak
+      ];
+      # https://github.com/haskell-repa/repa/pull/27
+      repaPatches = lib.mapAttrs (relative: hash: lib.singleton (pkgs.fetchpatch {
+        name = "repa-pr-27.patch";
+        url = "https://github.com/haskell-repa/repa/pull/27/commits/40cb2866bb4da51a8cac5e3792984744a64b016e.patch";
+        inherit relative hash;
+     })) {
+        repa = "sha256-bcSnzvCJmmSBts9UQHA2dYL0Q+wXN9Fbz5LfkrmhCo8=";
+        repa-io = "sha256-KsIN7NPWCyTpVzhR+xaBKGl8vC6rYH94llvlTawSxFk=";
+        repa-examples = "sha256-//2JG1CW1h2sKS2BSJadVAujSE3v1TfS0F8zgcNkPI8=";
+        repa-algorithms = "sha256-z/a7DpT3xJrIsif4cbciYcTSjapAtCoNNVX7PrZtc4I=";
+      };
+    in
+      lib.mapAttrs unbreakRepa super)
+    repa
+    repa-io
+    repa-examples
+    repa-algorithms
+    # The following packages aren't fixed yet, sorry:
+    #   repa-array, repa-convert, repa-eval, repa-flow,
+    #   repa-query, repa-scalar, repa-store, repa-stream
+  ;
 
 } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super