Merge pull request #328637 from NixOS/backport-327806-to-release-24.05

[Backport release-24.05] matrix-synapse-unwrapped: 1.110.0 -> 1.111.0
This commit is contained in:
Nick Cao 2024-07-22 18:03:49 -04:00 committed by GitHub
commit 4c7a3c81ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchPypi
, python3
, openssl
, libiconv
@ -13,39 +12,25 @@
}:
let
python = python3.override {
packageOverrides = self: super: {
netaddr = super.netaddr.overridePythonAttrs (oldAttrs: rec {
version = "1.0.0";
src = fetchPypi {
pname = "netaddr";
inherit version;
hash = "sha256-6wRrVTVOelv4AcBJAq6SO9aZGQJC2JsJnolvmycktNM=";
};
});
};
};
plugins = python.pkgs.callPackage ./plugins { };
plugins = python3.pkgs.callPackage ./plugins { };
tools = callPackage ./tools { };
in
python.pkgs.buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "matrix-synapse";
version = "1.110.0";
version = "1.111.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "element-hq";
repo = "synapse";
rev = "v${version}";
hash = "sha256-DsDQgmHDU+iJ+00p1uch9Zj6lleDvdTQMy05hi8R9CM=";
hash = "sha256-CgoJJK2pqkHU8X6oisY19uN6zyjGL8W3irTsraFOYQM=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-J0JBp9pCP00Cjs6T4litjhY28mq0OJDBrRZVSQaS03w=";
hash = "sha256-uKyy2m3bvo6U++Qx6t7maeIp84QfMzslPGV1so4ZT3U=";
};
postPatch = ''
@ -63,7 +48,7 @@ python.pkgs.buildPythonApplication rec {
sed -i 's/Pillow = ".*"/Pillow = ">=5.4.0"/' pyproject.toml
'';
nativeBuildInputs = with python.pkgs; [
nativeBuildInputs = with python3.pkgs; [
poetry-core
rustPlatform.cargoSetupHook
setuptools-rust
@ -77,7 +62,7 @@ python.pkgs.buildPythonApplication rec {
libiconv
];
propagatedBuildInputs = with python.pkgs; [
propagatedBuildInputs = with python3.pkgs; [
attrs
bcrypt
bleach
@ -89,6 +74,7 @@ python.pkgs.buildPythonApplication rec {
jsonschema
matrix-common
msgpack
python-multipart
netaddr
packaging
phonenumbers
@ -110,7 +96,7 @@ python.pkgs.buildPythonApplication rec {
]
++ twisted.optional-dependencies.tls;
passthru.optional-dependencies = with python.pkgs; {
passthru.optional-dependencies = with python3.pkgs; {
postgres = if isPyPy then [
psycopg2cffi
] else [
@ -148,7 +134,7 @@ python.pkgs.buildPythonApplication rec {
nativeCheckInputs = [
openssl
] ++ (with python.pkgs; [
] ++ (with python3.pkgs; [
mock
parameterized
])
@ -169,14 +155,15 @@ python.pkgs.buildPythonApplication rec {
NIX_BUILD_CORES=4
fi
PYTHONPATH=".:$PYTHONPATH" ${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tests
PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tests
runHook postCheck
'';
passthru = {
tests = { inherit (nixosTests) matrix-synapse matrix-synapse-workers; };
inherit plugins tools python;
inherit plugins tools;
python = python3;
};
meta = with lib; {