From 4e216d5059aa8281647391da9953c7f8fa486729 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 14 May 2025 20:28:59 +0200 Subject: [PATCH] haskellPackages.postgres-websockets: fix at run-time Reason for the failure is still unclear and it was not possible to reproduce outside nixpkgs, yet. https://github.com/diogob/postgres-websockets/pull/101#issuecomment-2881016449 --- .../haskell-modules/configuration-common.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 2321fdd060e6..782c57cf2d5b 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2695,6 +2695,20 @@ self: super: tasty-autocollect = dontCheck super.tasty-autocollect; postgres-websockets = lib.pipe super.postgres-websockets [ + (appendPatches [ + (pkgs.fetchpatch { + # Needed for the patch below to apply. + name = "remove-protolude.patch"; + url = "https://github.com/diogob/postgres-websockets/commit/8027c0f6dc0c5fe6bab4e3e7730db8653b2c51cc.patch"; + hash = "sha256-gefVUR+tJLrmpwnc1hf4GjLbGVe1GwNmLn5YU7qW/HY="; + }) + (pkgs.fetchpatch { + # Can be removed with the next update. + name = "fix-connection-closing-when-no-write-mode-is-present.patch"; + url = "https://github.com/diogob/postgres-websockets/commit/577a2f0bf4750c682c2c3c63e37d90e0ec6f95eb.patch"; + hash = "sha256-7PCVbfNiJhWfmQrEjaVqbmCL5jffhofOto1RF2FVYJo="; + }) + ]) (addTestToolDepends [ pkgs.postgresql pkgs.postgresqlTestHook