Skip to content

Commit

Permalink
matrix-synapse-unwrapped: 1.110.0 -> 1.111.0
Browse files Browse the repository at this point in the history
This also reverts d2e41f1 as it is no
longer necessary after element-hq/synapse#17353.

This also adds the python-multipart dependency that was added in
element-hq/synapse#17365

Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Jul 17, 2024
1 parent 9d7caf7 commit 27d453c
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions pkgs/servers/matrix-synapse/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchPypi
, python3
, openssl
, libiconv
Expand All @@ -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 = ''
Expand All @@ -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
Expand All @@ -77,7 +62,7 @@ python.pkgs.buildPythonApplication rec {
libiconv
];

propagatedBuildInputs = with python.pkgs; [
propagatedBuildInputs = with python3.pkgs; [
attrs
bcrypt
bleach
Expand All @@ -89,6 +74,7 @@ python.pkgs.buildPythonApplication rec {
jsonschema
matrix-common
msgpack
python-multipart
netaddr
packaging
phonenumbers
Expand All @@ -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 [
Expand Down Expand Up @@ -148,7 +134,7 @@ python.pkgs.buildPythonApplication rec {

nativeCheckInputs = [
openssl
] ++ (with python.pkgs; [
] ++ (with python3.pkgs; [
mock
parameterized
])
Expand All @@ -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; {
Expand Down

0 comments on commit 27d453c

Please sign in to comment.