2020-04-24 23:36:52 +00:00
|
|
|
{ lib, stdenv, python3, openssl
|
|
|
|
, enableSystemd ? stdenv.isLinux, nixosTests
|
|
|
|
}:
|
|
|
|
|
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
let
|
2020-06-18 07:06:33 +00:00
|
|
|
plugins = python3.pkgs.callPackage ./plugins { };
|
|
|
|
in
|
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "matrix-synapse";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "1.21.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "061b2mpdzqxyks1kj3p7xmw8i4akqfd2s9vb7v8w27k2qpcw7528";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# adds an entry point for the service
|
|
|
|
./homeserver-script.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
bcrypt
|
|
|
|
bleach
|
|
|
|
canonicaljson
|
|
|
|
daemonize
|
|
|
|
frozendict
|
|
|
|
jinja2
|
|
|
|
jsonschema
|
|
|
|
lxml
|
|
|
|
msgpack
|
|
|
|
netaddr
|
|
|
|
phonenumbers
|
|
|
|
pillow
|
2020-10-16 20:44:37 +00:00
|
|
|
prometheus_client
|
2020-04-24 23:36:52 +00:00
|
|
|
psutil
|
|
|
|
psycopg2
|
|
|
|
pyasn1
|
|
|
|
pymacaroons
|
|
|
|
pynacl
|
|
|
|
pyopenssl
|
|
|
|
pysaml2
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
signedjson
|
|
|
|
sortedcontainers
|
|
|
|
treq
|
|
|
|
twisted
|
|
|
|
unpaddedbase64
|
|
|
|
typing-extensions
|
2020-06-02 18:00:15 +00:00
|
|
|
authlib
|
2020-06-18 07:06:33 +00:00
|
|
|
pyjwt
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optional enableSystemd systemd;
|
|
|
|
|
|
|
|
checkInputs = [ mock parameterized openssl ];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial tests
|
|
|
|
'';
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) matrix-synapse; };
|
|
|
|
passthru.plugins = plugins;
|
|
|
|
passthru.python = python3;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|