summaryrefslogtreecommitdiff
path: root/overlays/matrix-synapse/1.70.1/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/matrix-synapse/1.70.1/default.nix')
-rw-r--r--overlays/matrix-synapse/1.70.1/default.nix111
1 files changed, 0 insertions, 111 deletions
diff --git a/overlays/matrix-synapse/1.70.1/default.nix b/overlays/matrix-synapse/1.70.1/default.nix
deleted file mode 100644
index 0c026914..00000000
--- a/overlays/matrix-synapse/1.70.1/default.nix
+++ /dev/null
@@ -1,111 +0,0 @@
1{ lib, stdenv, fetchFromGitHub, python3, openssl, rustPlatform
2, enableSystemd ? stdenv.isLinux, nixosTests
3, enableRedis ? true
4, callPackage
5}:
6
7let
8 plugins = python3.pkgs.callPackage ./plugins { };
9 tools = callPackage ./tools { };
10in
11with python3.pkgs;
12buildPythonApplication rec {
13 pname = "matrix-synapse";
14 version = "1.70.1";
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "matrix-org";
19 repo = "synapse";
20 rev = "v${version}";
21 hash = "sha256-/clEY3sabaDEOAAowQ896vYOvzf5Teevoa7ZkzWw+fY=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoTarball {
25 inherit src;
26 name = "${pname}-${version}";
27 hash = "sha256-9wxWxrn+uPcz60710DROhDqNC6FvTtnqzWiWRk8kl6A=";
28 };
29
30 postPatch = ''
31 # Remove setuptools_rust from runtime dependencies
32 # https://github.com/matrix-org/synapse/blob/v1.69.0/pyproject.toml#L177-L185
33 sed -i '/^setuptools_rust =/d' pyproject.toml
34 '';
35
36 nativeBuildInputs = [
37 poetry-core
38 rustPlatform.cargoSetupHook
39 setuptools-rust
40 ] ++ (with rustPlatform.rust; [
41 cargo
42 rustc
43 ]);
44
45 buildInputs = [ openssl ];
46
47 propagatedBuildInputs = [
48 authlib
49 bcrypt
50 bleach
51 canonicaljson
52 daemonize
53 frozendict
54 ijson
55 jinja2
56 jsonschema
57 lxml
58 matrix-common
59 msgpack
60 netaddr
61 phonenumbers
62 pillow
63 prometheus-client
64 psutil
65 psycopg2
66 pyasn1
67 pydantic
68 pyjwt
69 pymacaroons
70 pynacl
71 pyopenssl
72 pysaml2
73 pyyaml
74 requests
75 setuptools
76 signedjson
77 sortedcontainers
78 treq
79 twisted
80 typing-extensions
81 unpaddedbase64
82 ] ++ lib.optional enableSystemd systemd
83 ++ lib.optionals enableRedis [ hiredis txredisapi ];
84
85 checkInputs = [ mock parameterized openssl ];
86
87 doCheck = !stdenv.isDarwin;
88
89 checkPhase = ''
90 runHook preCheck
91
92 # remove src module, so tests use the installed module instead
93 rm -rf ./synapse
94
95 PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tests
96
97 runHook postCheck
98 '';
99
100 passthru.tests = { inherit (nixosTests) matrix-synapse; };
101 passthru.plugins = plugins;
102 passthru.tools = tools;
103 passthru.python = python3;
104
105 meta = with lib; {
106 homepage = "https://matrix.org";
107 description = "Matrix reference homeserver";
108 license = licenses.asl20;
109 maintainers = teams.matrix.members;
110 };
111}