2020-04-24 23:36:52 +00:00
|
|
|
{ lib, stdenv, python3, openssl
|
|
|
|
, enableSystemd ? stdenv.isLinux, nixosTests
|
2021-10-04 12:37:57 +00:00
|
|
|
, enableRedis ? true
|
2020-12-25 13:55:36 +00:00
|
|
|
, callPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
let
|
2021-12-06 16:07:01 +00:00
|
|
|
plugins = python3.pkgs.callPackage ./plugins { };
|
2020-12-25 13:55:36 +00:00
|
|
|
tools = callPackage ./tools { };
|
2020-06-18 07:06:33 +00:00
|
|
|
in
|
2021-12-06 16:07:01 +00:00
|
|
|
with python3.pkgs;
|
2020-06-18 07:06:33 +00:00
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "matrix-synapse";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "1.55.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-03 18:54:34 +00:00
|
|
|
sha256 = "sha256-MCdwatNo4cDAaq9a3UFwSLJzT1ZxhoYqPOu/a957D2Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-06-04 09:07:49 +00:00
|
|
|
authlib
|
2020-04-24 23:36:52 +00:00
|
|
|
bcrypt
|
|
|
|
bleach
|
|
|
|
canonicaljson
|
|
|
|
daemonize
|
|
|
|
frozendict
|
2021-06-04 09:07:49 +00:00
|
|
|
ijson
|
2020-04-24 23:36:52 +00:00
|
|
|
jinja2
|
|
|
|
jsonschema
|
|
|
|
lxml
|
2022-01-19 23:45:15 +00:00
|
|
|
matrix-common
|
2020-04-24 23:36:52 +00:00
|
|
|
msgpack
|
|
|
|
netaddr
|
|
|
|
phonenumbers
|
|
|
|
pillow
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client
|
2020-04-24 23:36:52 +00:00
|
|
|
psutil
|
|
|
|
psycopg2
|
|
|
|
pyasn1
|
2021-06-04 09:07:49 +00:00
|
|
|
pyjwt
|
2020-04-24 23:36:52 +00:00
|
|
|
pymacaroons
|
|
|
|
pynacl
|
|
|
|
pyopenssl
|
|
|
|
pysaml2
|
|
|
|
pyyaml
|
|
|
|
requests
|
2021-06-04 09:07:49 +00:00
|
|
|
setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
signedjson
|
|
|
|
sortedcontainers
|
|
|
|
treq
|
|
|
|
twisted
|
|
|
|
typing-extensions
|
2021-06-04 09:07:49 +00:00
|
|
|
unpaddedbase64
|
2020-11-03 02:18:15 +00:00
|
|
|
] ++ lib.optional enableSystemd systemd
|
2021-06-28 23:13:55 +00:00
|
|
|
++ lib.optionals enableRedis [ hiredis txredisapi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ mock parameterized openssl ];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tests
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) matrix-synapse; };
|
|
|
|
passthru.plugins = plugins;
|
2020-12-25 13:55:36 +00:00
|
|
|
passthru.tools = tools;
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.python = python3;
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://matrix.org";
|
|
|
|
description = "Matrix reference homeserver";
|
|
|
|
license = licenses.asl20;
|
2020-06-18 07:06:33 +00:00
|
|
|
maintainers = teams.matrix.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|