2020-04-24 23:36:52 +00:00
|
|
|
{ lib, stdenv, python3, openssl
|
|
|
|
, enableSystemd ? stdenv.isLinux, nixosTests
|
2020-11-03 02:18:15 +00:00
|
|
|
, enableRedis ? false
|
2020-12-25 13:55:36 +00:00
|
|
|
, callPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
let
|
2020-06-18 07:06:33 +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
|
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "matrix-synapse";
|
2021-08-25 08:27:29 +00:00
|
|
|
version = "1.41.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-25 08:27:29 +00:00
|
|
|
sha256 = "sha256-KLsTr8dKp8k7TcrC598ApDib7P0m9evmfdl8jbsZLdc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-08-18 13:19:15 +00:00
|
|
|
./0001-setup-add-homeserver-as-console-script.patch
|
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
|
|
|
|
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
|
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 = ''
|
|
|
|
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;
|
2020-12-25 13:55:36 +00:00
|
|
|
passthru.tools = tools;
|
2020-06-18 07:06:33 +00:00
|
|
|
passthru.python = python3;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|