From 173448a2a72b1f51c7efdd81500a583510a0ad31 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Tue, 16 Jul 2024 22:06:18 -0600 Subject: [PATCH] matrix-synapse-unwrapped: 1.110.0 -> 1.111.0 This also reverts d2e41f147f6a4b4930393077822a6738a80ac283 as it is no longer necessary after https://github.com/element-hq/synapse/pull/17353. This also adds the python-multipart dependency that was added in https://github.com/element-hq/synapse/pull/17365 Signed-off-by: Sumner Evans (cherry picked from commit 27d453cf9441a723251acb5d32409ad77384dc72) --- pkgs/servers/matrix-synapse/default.nix | 39 +++++++++---------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index 177cee956ca15..ab7573c683e58 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -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; {