diff --git a/packages/overlays/matrix-synapse/patches/0004-Explicitly-enable-pypy-for-cibuildwheel-18417.patch b/packages/overlays/matrix-synapse/patches/0004-Explicitly-enable-pypy-for-cibuildwheel-18417.patch
new file mode 100644
index 0000000..a85de14
--- /dev/null
+++ b/packages/overlays/matrix-synapse/patches/0004-Explicitly-enable-pypy-for-cibuildwheel-18417.patch
@@ -0,0 +1,262 @@
+From 2db54c88ff54a5377d96088c23ac1f4dfef8faf3 Mon Sep 17 00:00:00 2001
+From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
+Date: Tue, 13 May 2025 15:19:30 +0100
+Subject: [PATCH 04/34] Explicitly enable pypy for cibuildwheel (#18417)
+
+---
+ changelog.d/18417.misc | 1 +
+ poetry.lock | 49 +++++++++++++++++++++---------------------
+ pyproject.toml | 3 +++
+ 3 files changed, 28 insertions(+), 25 deletions(-)
+ create mode 100644 changelog.d/18417.misc
+
+diff --git a/changelog.d/18417.misc b/changelog.d/18417.misc
+new file mode 100644
+index 0000000000..5f650a202a
+--- /dev/null
++++ b/changelog.d/18417.misc
+@@ -0,0 +1 @@
++Explicitly enable PyPy builds in `cibuildwheel`s config to avoid it being disabled on a future upgrade to `cibuildwheel` v3.
+\ No newline at end of file
+diff --git a/poetry.lock b/poetry.lock
+index 7d7868d37f..7190d0f788 100644
+--- a/poetry.lock
++++ b/poetry.lock
+@@ -1,4 +1,4 @@
+-# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand.
++# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.
+
+ [[package]]
+ name = "annotated-types"
+@@ -39,7 +39,7 @@ description = "The ultimate Python library in building OAuth and OpenID Connect
+ optional = true
+ python-versions = ">=3.9"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"jwt\" or extra == \"oidc\""
++markers = "extra == \"oidc\" or extra == \"jwt\" or extra == \"all\""
+ files = [
+ {file = "authlib-1.5.1-py2.py3-none-any.whl", hash = "sha256:8408861cbd9b4ea2ff759b00b6f02fd7d81ac5a56d0b2b22c08606c6049aae11"},
+ {file = "authlib-1.5.1.tar.gz", hash = "sha256:5cbc85ecb0667312c1cdc2f9095680bb735883b123fb509fde1e65b1c5df972e"},
+@@ -451,7 +451,7 @@ description = "XML bomb protection for Python stdlib modules"
+ optional = true
+ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"saml2\""
++markers = "extra == \"saml2\" or extra == \"all\""
+ files = [
+ {file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"},
+ {file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"},
+@@ -494,7 +494,7 @@ description = "XPath 1.0/2.0/3.0/3.1 parsers and selectors for ElementTree and l
+ optional = true
+ python-versions = ">=3.7"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"saml2\""
++markers = "extra == \"saml2\" or extra == \"all\""
+ files = [
+ {file = "elementpath-4.1.5-py3-none-any.whl", hash = "sha256:2ac1a2fb31eb22bbbf817f8cf6752f844513216263f0e3892c8e79782fe4bb55"},
+ {file = "elementpath-4.1.5.tar.gz", hash = "sha256:c2d6dc524b29ef751ecfc416b0627668119d8812441c555d7471da41d4bacb8d"},
+@@ -544,7 +544,7 @@ description = "Python wrapper for hiredis"
+ optional = true
+ python-versions = ">=3.8"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"redis\""
++markers = "extra == \"redis\" or extra == \"all\""
+ files = [
+ {file = "hiredis-3.1.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:2892db9db21f0cf7cc298d09f85d3e1f6dc4c4c24463ab67f79bc7a006d51867"},
+ {file = "hiredis-3.1.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:93cfa6cc25ee2ceb0be81dc61eca9995160b9e16bdb7cca4a00607d57e998918"},
+@@ -890,7 +890,7 @@ description = "Jaeger Python OpenTracing Tracer implementation"
+ optional = true
+ python-versions = ">=3.7"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"opentracing\""
++markers = "extra == \"opentracing\" or extra == \"all\""
+ files = [
+ {file = "jaeger-client-4.8.0.tar.gz", hash = "sha256:3157836edab8e2c209bd2d6ae61113db36f7ee399e66b1dcbb715d87ab49bfe0"},
+ ]
+@@ -1028,7 +1028,7 @@ description = "A strictly RFC 4510 conforming LDAP V3 pure Python client library
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"matrix-synapse-ldap3\""
++markers = "extra == \"matrix-synapse-ldap3\" or extra == \"all\""
+ files = [
+ {file = "ldap3-2.9.1-py2.py3-none-any.whl", hash = "sha256:5869596fc4948797020d3f03b7939da938778a0f9e2009f7a072ccf92b8e8d70"},
+ {file = "ldap3-2.9.1.tar.gz", hash = "sha256:f3e7fc4718e3f09dda568b57100095e0ce58633bcabbed8667ce3f8fbaa4229f"},
+@@ -1044,7 +1044,7 @@ description = "Powerful and Pythonic XML processing library combining libxml2/li
+ optional = true
+ python-versions = ">=3.6"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"url-preview\""
++markers = "extra == \"url-preview\" or extra == \"all\""
+ files = [
+ {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:dd36439be765e2dde7660212b5275641edbc813e7b24668831a5c8ac91180656"},
+ {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ae5fe5c4b525aa82b8076c1a59d642c17b6e8739ecf852522c6321852178119d"},
+@@ -1330,7 +1330,7 @@ description = "An LDAP3 auth provider for Synapse"
+ optional = true
+ python-versions = ">=3.7"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"matrix-synapse-ldap3\""
++markers = "extra == \"matrix-synapse-ldap3\" or extra == \"all\""
+ files = [
+ {file = "matrix-synapse-ldap3-0.3.0.tar.gz", hash = "sha256:8bb6517173164d4b9cc44f49de411d8cebdb2e705d5dd1ea1f38733c4a009e1d"},
+ {file = "matrix_synapse_ldap3-0.3.0-py3-none-any.whl", hash = "sha256:8b4d701f8702551e98cc1d8c20dbed532de5613584c08d0df22de376ba99159d"},
+@@ -1551,7 +1551,7 @@ description = "OpenTracing API for Python. See documentation at http://opentraci
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"opentracing\""
++markers = "extra == \"opentracing\" or extra == \"all\""
+ files = [
+ {file = "opentracing-2.4.0.tar.gz", hash = "sha256:a173117e6ef580d55874734d1fa7ecb6f3655160b8b8974a2a1e98e5ec9c840d"},
+ ]
+@@ -1720,7 +1720,7 @@ description = "psycopg2 - Python-PostgreSQL Database Adapter"
+ optional = true
+ python-versions = ">=3.8"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"postgres\""
++markers = "extra == \"postgres\" or extra == \"all\""
+ files = [
+ {file = "psycopg2-2.9.10-cp310-cp310-win32.whl", hash = "sha256:5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716"},
+ {file = "psycopg2-2.9.10-cp310-cp310-win_amd64.whl", hash = "sha256:c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a"},
+@@ -1728,7 +1728,6 @@ files = [
+ {file = "psycopg2-2.9.10-cp311-cp311-win_amd64.whl", hash = "sha256:0435034157049f6846e95103bd8f5a668788dd913a7c30162ca9503fdf542cb4"},
+ {file = "psycopg2-2.9.10-cp312-cp312-win32.whl", hash = "sha256:65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067"},
+ {file = "psycopg2-2.9.10-cp312-cp312-win_amd64.whl", hash = "sha256:4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e"},
+- {file = "psycopg2-2.9.10-cp313-cp313-win_amd64.whl", hash = "sha256:91fd603a2155da8d0cfcdbf8ab24a2d54bca72795b90d2a3ed2b6da8d979dee2"},
+ {file = "psycopg2-2.9.10-cp39-cp39-win32.whl", hash = "sha256:9d5b3b94b79a844a986d029eee38998232451119ad653aea42bb9220a8c5066b"},
+ {file = "psycopg2-2.9.10-cp39-cp39-win_amd64.whl", hash = "sha256:88138c8dedcbfa96408023ea2b0c369eda40fe5d75002c0964c78f46f11fa442"},
+ {file = "psycopg2-2.9.10.tar.gz", hash = "sha256:12ec0b40b0273f95296233e8750441339298e6a572f7039da5b260e3c8b60e11"},
+@@ -1741,7 +1740,7 @@ description = ".. image:: https://travis-ci.org/chtd/psycopg2cffi.svg?branch=mas
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "platform_python_implementation == \"PyPy\" and (extra == \"all\" or extra == \"postgres\")"
++markers = "platform_python_implementation == \"PyPy\" and (extra == \"postgres\" or extra == \"all\")"
+ files = [
+ {file = "psycopg2cffi-2.9.0.tar.gz", hash = "sha256:7e272edcd837de3a1d12b62185eb85c45a19feda9e62fa1b120c54f9e8d35c52"},
+ ]
+@@ -1757,7 +1756,7 @@ description = "A Simple library to enable psycopg2 compatability"
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "platform_python_implementation == \"PyPy\" and (extra == \"all\" or extra == \"postgres\")"
++markers = "platform_python_implementation == \"PyPy\" and (extra == \"postgres\" or extra == \"all\")"
+ files = [
+ {file = "psycopg2cffi-compat-1.1.tar.gz", hash = "sha256:d25e921748475522b33d13420aad5c2831c743227dc1f1f2585e0fdb5c914e05"},
+ ]
+@@ -1980,7 +1979,7 @@ description = "Python extension wrapping the ICU C++ API"
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"user-search\""
++markers = "extra == \"user-search\" or extra == \"all\""
+ files = [
+ {file = "PyICU-2.14.tar.gz", hash = "sha256:acc7eb92bd5c554ed577249c6978450a4feda0aa6f01470152b3a7b382a02132"},
+ ]
+@@ -2029,7 +2028,7 @@ description = "A development tool to measure, monitor and analyze the memory beh
+ optional = true
+ python-versions = ">=3.6"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"cache-memory\""
++markers = "extra == \"cache-memory\" or extra == \"all\""
+ files = [
+ {file = "Pympler-1.0.1-py3-none-any.whl", hash = "sha256:d260dda9ae781e1eab6ea15bacb84015849833ba5555f141d2d9b7b7473b307d"},
+ {file = "Pympler-1.0.1.tar.gz", hash = "sha256:993f1a3599ca3f4fcd7160c7545ad06310c9e12f70174ae7ae8d4e25f6c5d3fa"},
+@@ -2089,7 +2088,7 @@ description = "Python implementation of SAML Version 2 Standard"
+ optional = true
+ python-versions = ">=3.9,<4.0"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"saml2\""
++markers = "extra == \"saml2\" or extra == \"all\""
+ files = [
+ {file = "pysaml2-7.5.0-py3-none-any.whl", hash = "sha256:bc6627cc344476a83c757f440a73fda1369f13b6fda1b4e16bca63ffbabb5318"},
+ {file = "pysaml2-7.5.0.tar.gz", hash = "sha256:f36871d4e5ee857c6b85532e942550d2cf90ea4ee943d75eb681044bbc4f54f7"},
+@@ -2114,7 +2113,7 @@ description = "Extensions to the standard Python datetime module"
+ optional = true
+ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"saml2\""
++markers = "extra == \"saml2\" or extra == \"all\""
+ files = [
+ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
+ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
+@@ -2142,7 +2141,7 @@ description = "World timezone definitions, modern and historical"
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"saml2\""
++markers = "extra == \"saml2\" or extra == \"all\""
+ files = [
+ {file = "pytz-2022.7.1-py2.py3-none-any.whl", hash = "sha256:78f4f37d8198e0627c5f1143240bb0206b8691d8d7ac6d78fee88b78733f8c4a"},
+ {file = "pytz-2022.7.1.tar.gz", hash = "sha256:01a0681c4b9684a28304615eba55d1ab31ae00bf68ec157ec3708a8182dbbcd0"},
+@@ -2506,7 +2505,7 @@ description = "Python client for Sentry (https://sentry.io)"
+ optional = true
+ python-versions = ">=3.6"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"sentry\""
++markers = "extra == \"sentry\" or extra == \"all\""
+ files = [
+ {file = "sentry_sdk-2.22.0-py2.py3-none-any.whl", hash = "sha256:3d791d631a6c97aad4da7074081a57073126c69487560c6f8bffcf586461de66"},
+ {file = "sentry_sdk-2.22.0.tar.gz", hash = "sha256:b4bf43bb38f547c84b2eadcefbe389b36ef75f3f38253d7a74d6b928c07ae944"},
+@@ -2690,7 +2689,7 @@ description = "Tornado IOLoop Backed Concurrent Futures"
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"opentracing\""
++markers = "extra == \"opentracing\" or extra == \"all\""
+ files = [
+ {file = "threadloop-1.0.2-py2-none-any.whl", hash = "sha256:5c90dbefab6ffbdba26afb4829d2a9df8275d13ac7dc58dccb0e279992679599"},
+ {file = "threadloop-1.0.2.tar.gz", hash = "sha256:8b180aac31013de13c2ad5c834819771992d350267bddb854613ae77ef571944"},
+@@ -2706,7 +2705,7 @@ description = "Python bindings for the Apache Thrift RPC system"
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"opentracing\""
++markers = "extra == \"opentracing\" or extra == \"all\""
+ files = [
+ {file = "thrift-0.16.0.tar.gz", hash = "sha256:2b5b6488fcded21f9d312aa23c9ff6a0195d0f6ae26ddbd5ad9e3e25dfc14408"},
+ ]
+@@ -2768,7 +2767,7 @@ description = "Tornado is a Python web framework and asynchronous networking lib
+ optional = true
+ python-versions = ">=3.8"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"opentracing\""
++markers = "extra == \"opentracing\" or extra == \"all\""
+ files = [
+ {file = "tornado-6.4.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:e828cce1123e9e44ae2a50a9de3055497ab1d0aeb440c5ac23064d9e44880da1"},
+ {file = "tornado-6.4.2-cp38-abi3-macosx_10_9_x86_64.whl", hash = "sha256:072ce12ada169c5b00b7d92a99ba089447ccc993ea2143c9ede887e0937aa803"},
+@@ -2902,7 +2901,7 @@ description = "non-blocking redis client for python"
+ optional = true
+ python-versions = "*"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"redis\""
++markers = "extra == \"redis\" or extra == \"all\""
+ files = [
+ {file = "txredisapi-1.4.11-py3-none-any.whl", hash = "sha256:ac64d7a9342b58edca13ef267d4fa7637c1aa63f8595e066801c1e8b56b22d0b"},
+ {file = "txredisapi-1.4.11.tar.gz", hash = "sha256:3eb1af99aefdefb59eb877b1dd08861efad60915e30ad5bf3d5bf6c5cedcdbc6"},
+@@ -3245,7 +3244,7 @@ description = "An XML Schema validator and decoder"
+ optional = true
+ python-versions = ">=3.7"
+ groups = ["main"]
+-markers = "extra == \"all\" or extra == \"saml2\""
++markers = "extra == \"saml2\" or extra == \"all\""
+ files = [
+ {file = "xmlschema-2.4.0-py3-none-any.whl", hash = "sha256:dc87be0caaa61f42649899189aab2fd8e0d567f2cf548433ba7b79278d231a4a"},
+ {file = "xmlschema-2.4.0.tar.gz", hash = "sha256:d74cd0c10866ac609e1ef94a5a69b018ad16e39077bc6393408b40c6babee793"},
+diff --git a/pyproject.toml b/pyproject.toml
+index 5f80d28344..914a5804aa 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -385,6 +385,9 @@ build-backend = "poetry.core.masonry.api"
+ # - PyPy on Aarch64 and musllinux on aarch64: too slow to build.
+ # c.f. https://github.com/matrix-org/synapse/pull/14259
+ skip = "cp36* cp37* cp38* pp37* pp38* *-musllinux_i686 pp*aarch64 *-musllinux_aarch64"
++# Enable non-default builds.
++# "pypy" used to be included by default up until cibuildwheel 3.
++enable = "pypy"
+
+ # We need a rust compiler.
+ #
+--
+2.49.0
+
|