From 540f1e4f84858d684120c29d17a3d0c4e0c86a20 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 2 Apr 2026 20:34:34 +0200 Subject: [PATCH] haskellPackages.socket: avoid test race condition with tasty >= 1.5.4 --- .../haskell-modules/configuration-common.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 52b192c4bad6..ccb135b8700b 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -384,6 +384,16 @@ with haskellLib; }) ] super.criterion; + # Avoid rebinding to the same port with tasty >= 1.5.4 parallelism + # https://github.com/lpeterse/haskell-socket/pull/73 + socket = appendPatches [ + (pkgs.fetchpatch { + name = "socket-tasty-1.5.4.patch"; + url = "https://github.com/lpeterse/haskell-socket/commit/a2687d9f1a60cfb72f85962c501a68d110ed6de0.patch"; + hash = "sha256-21qkRFnRF6nuM1BILps8o5A/QvaVQ6SkKxO0u2goXos="; + }) + ] super.socket; + # Expected failures are fixed as of GHC-9.10, # but the tests haven't been updated yet. # https://github.com/ocharles/weeder/issues/198