From e9baee4095133c5d17a5be27042ad18066d2033c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 7 Jan 2025 15:10:25 +0100 Subject: [PATCH 1/2] matrix-synapse: fix test errors --- pkgs/servers/matrix-synapse/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index 79b5cdc861a5b..422097f9e490d 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -10,6 +10,7 @@ rustc, nixosTests, callPackage, + fetchpatch2, }: let @@ -34,6 +35,15 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-LGFuz3NtNqH+XumJOirvflH0fyfTtqz5qgYlJx2fmAU="; }; + patches = [ + # Fixes test compat with twisted 24.11.0. + # Can be removed in next release. + (fetchpatch2 { + url = "https://github.com/element-hq/synapse/commit/3eb92369ca14012a07da2fbf9250e66f66afb710.patch"; + sha256 = "sha256-VDn3kQy23+QC2WKhWfe0FrUOnLuI1YwH5GxdTTVWt+A="; + }) + ]; + postPatch = '' # Remove setuptools_rust from runtime dependencies # https://github.com/element-hq/synapse/blob/v1.69.0/pyproject.toml#L177-L185 From 7b2d7afbcc73cb0719e0bae137ad16a5e8b9f746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 8 Jan 2025 11:17:38 +0100 Subject: [PATCH 2/2] matrix-synapse: disable failing test --- pkgs/servers/matrix-synapse/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index 422097f9e490d..db9ba29a0c828 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -57,6 +57,10 @@ python3.pkgs.buildPythonApplication rec { # Don't force pillow to be 10.0.1 because we already have patched it, and # we don't use the pillow wheels. sed -i 's/Pillow = ".*"/Pillow = ">=5.4.0"/' pyproject.toml + + # https://github.com/element-hq/synapse/pull/17878#issuecomment-2575412821 + substituteInPlace tests/storage/databases/main/test_events_worker.py \ + --replace-fail "def test_recovery" "def no_test_recovery" ''; nativeBuildInputs = with python3.pkgs; [