Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix-synapse: fix test errors #371815

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pkgs/servers/matrix-synapse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
rustc,
nixosTests,
callPackage,
fetchpatch2,
}:

let
Expand All @@ -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
Expand All @@ -47,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; [
Expand Down