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-unwrapped: 1.110.0 -> 1.111.0 #327806

Merged
merged 1 commit into from
Jul 20, 2024
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
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