Skip to content

Commit ce94938

Browse files
haskellPackages.postgres-websockets: fix at run-time
Reason for the failure is still unclear and it was not possible to reproduce outside nixpkgs, yet. diogob/postgres-websockets#101 (comment)
1 parent 09317d9 commit ce94938

File tree

4 files changed

+307
-13
lines changed

4 files changed

+307
-13
lines changed

pkgs/development/haskell-modules/configuration-common.nix

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,19 +2694,31 @@ self: super:
26942694
# https://github.com/brandonchinn178/tasty-autocollect/issues/54
26952695
tasty-autocollect = dontCheck super.tasty-autocollect;
26962696

2697-
postgres-websockets = lib.pipe super.postgres-websockets [
2698-
(addTestToolDepends [
2699-
pkgs.postgresql
2700-
pkgs.postgresqlTestHook
2701-
])
2702-
(dontCheckIf pkgs.postgresqlTestHook.meta.broken)
2703-
(overrideCabal {
2704-
preCheck = ''
2705-
export postgresqlEnableTCP=1
2706-
export PGDATABASE=postgres_ws_test
2707-
'';
2708-
})
2709-
];
2697+
postgres-websockets =
2698+
lib.pipe
2699+
(super.postgres-websockets.overrideScope (
2700+
self: super: {
2701+
# time-manager 0.1.1 prevents run-time breakage
2702+
# https://github.com/diogob/postgres-websockets/pull/105
2703+
http2 = super.http2_5_3_6;
2704+
network-run = super.network-run_0_4_1;
2705+
time-manager = super.time-manager_0_1_1;
2706+
warp = super.warp_3_4_5;
2707+
}
2708+
))
2709+
[
2710+
(addTestToolDepends [
2711+
pkgs.postgresql
2712+
pkgs.postgresqlTestHook
2713+
])
2714+
(dontCheckIf pkgs.postgresqlTestHook.meta.broken)
2715+
(overrideCabal {
2716+
preCheck = ''
2717+
export postgresqlEnableTCP=1
2718+
export PGDATABASE=postgres_ws_test
2719+
'';
2720+
})
2721+
];
27102722

27112723
postgrest =
27122724
lib.pipe

pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ extra-packages:
9898
- hspec-discover < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6
9999
- hspec-megaparsec == 2.2.0 # 2023-11-18: Latest version compatible with ghc 9.0
100100
- hspec-meta < 2.8 # 2022-12-07: Needed for elmPackages.elm / hspec-discover
101+
- http2 == 5.3.6 # 2025-05-14: needed for postgres-websockets
101102
- language-javascript == 0.7.0.0 # required by purescript
102103
- lsp < 2.5 # 2024-07-08: need for koka
103104
- lsp == 2.1.* # 2024-02-28: need for dhall-lsp-server
104105
- lsp-types == 2.1.* # 2024-02-28: need for dhall-lsp-server and koka
105106
- network-run == 0.4.0 # 2024-10-20: for GHC 9.10/network == 3.1.*
107+
- network-run == 0.4.1 # 2025-05-14: needed for postgres-websockets
106108
- optparse-applicative < 0.16 # needed for niv-0.2.19
107109
- ormolu == 0.5.2.0 # 2023-08-08: preserve for ghc 9.0
108110
- ormolu == 0.7.2.0 # 2023-11-13: for ghc-lib-parser 9.6 compat
@@ -118,7 +120,9 @@ extra-packages:
118120
- tar == 0.6.0.0 # 2025-02-08: last version to not require os-string (which can't be built with GHC < 9.2)
119121
- text == 2.0.2 # 2023-09-14: Needed for elm (which is currently on ghc-8.10)
120122
- text-metrics < 0.3.3 # 2025-02-08: >= 0.3.3 uses GHC2021
123+
- time-manager == 0.1.1 # 2025-05-14: needed for postgres-websockets
121124
- versions < 6 # 2024-04-22: required by spago-0.21
125+
- warp == 3.4.5 # 2025-05-14: needed for postgres-websockets
122126
- weeder == 2.2.* # 2022-02-21: preserve for GHC 8.10.7
123127
- weeder == 2.3.* # 2022-05-31: preserve for GHC 9.0.2
124128
- weeder == 2.4.* # 2023-02-02: preserve for GHC 9.2.*

pkgs/development/haskell-modules/configuration-nix.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ builtins.intersectAttrs super {
405405

406406
# The curl executable is required for withApplication tests.
407407
warp = addTestToolDepend pkgs.curl super.warp;
408+
warp_3_4_5 = addTestToolDepend pkgs.curl super.warp_3_4_5;
408409

409410
safe-exceptions = overrideCabal (drv: {
410411
# Fix strictDeps build error "could not execute: hspec-discover"

pkgs/development/haskell-modules/hackage-packages.nix

Lines changed: 277 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)