mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
matrix-synapse: 1.48.0 -> 1.49.0
This commit is contained in:
parent
39f6bdab71
commit
c0a6554847
4 changed files with 4 additions and 85 deletions
|
@ -739,7 +739,7 @@ in {
|
|||
after = [ "network.target" ] ++ optional hasLocalPostgresDB "postgresql.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
${cfg.package}/bin/homeserver \
|
||||
${cfg.package}/bin/synapse_homeserver \
|
||||
--config-path ${configFile} \
|
||||
--keys-directory ${cfg.dataDir} \
|
||||
--generate-keys
|
||||
|
@ -759,7 +759,7 @@ in {
|
|||
chmod 0600 ${cfg.dataDir}/homeserver.signing.key
|
||||
'')) ];
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/homeserver \
|
||||
${cfg.package}/bin/synapse_homeserver \
|
||||
${ concatMapStringsSep "\n " (x: "--config-path ${x} \\") ([ configFile ] ++ cfg.extraConfigFiles) }
|
||||
--keys-directory ${cfg.dataDir}
|
||||
'';
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
From 36ffbb7ad2c535180cae473b470a43f9db4fbdcd Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Mon, 16 Aug 2021 13:27:28 +0200
|
||||
Subject: [PATCH 1/2] setup: add homeserver as console script
|
||||
|
||||
With this change, it will be added to `$out/bin` in `nixpkgs` directly.
|
||||
This became necessary since our old workaround, calling it as script,
|
||||
doesn't work anymore since the shebangs were removed[1].
|
||||
|
||||
[1] https://github.com/matrix-org/synapse/pull/10415
|
||||
---
|
||||
setup.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c47856351..27f1d842c 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -133,6 +133,11 @@ setup(
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/x-rst",
|
||||
python_requires="~=3.6",
|
||||
+ entry_points={
|
||||
+ 'console_scripts': [
|
||||
+ 'homeserver = synapse.app.homeserver:main'
|
||||
+ ]
|
||||
+ },
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Topic :: Communications :: Chat",
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From 3089758015c64cc1e6788793c4fe40a0e1783457 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Tue, 5 Oct 2021 22:33:12 +0200
|
||||
Subject: [PATCH 2/2] Expose generic worker as binary under NixOS
|
||||
|
||||
---
|
||||
setup.py | 3 ++-
|
||||
synapse/app/generic_worker.py | 6 +++++-
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 27f1d842c..6383aed6f 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -135,7 +135,8 @@ setup(
|
||||
python_requires="~=3.6",
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
- 'homeserver = synapse.app.homeserver:main'
|
||||
+ 'homeserver = synapse.app.homeserver:main',
|
||||
+ 'worker = synapse.app.generic_worker:main'
|
||||
]
|
||||
},
|
||||
classifiers=[
|
||||
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py
|
||||
index 3b7131af8..c77a6a95c 100644
|
||||
--- a/synapse/app/generic_worker.py
|
||||
+++ b/synapse/app/generic_worker.py
|
||||
@@ -491,6 +491,10 @@ def start(config_options):
|
||||
_base.start_worker_reactor("synapse-generic-worker", config)
|
||||
|
||||
|
||||
-if __name__ == "__main__":
|
||||
+def main():
|
||||
with LoggingContext("main"):
|
||||
start(sys.argv[1:])
|
||||
+
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ main()
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -11,18 +11,13 @@ in
|
|||
with python3.pkgs;
|
||||
buildPythonApplication rec {
|
||||
pname = "matrix-synapse";
|
||||
version = "1.48.0";
|
||||
version = "1.49.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-G09VbfC9mZ0+shLHRNutR91URewvLW4l4lQaVrsZYaQ=";
|
||||
sha256 = "sha256-vvLcRy2qt/qOgKkQpj2eHP4691OX0AW58dD3EecluZM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-setup-add-homeserver-as-console-script.patch
|
||||
./0002-Expose-generic-worker-as-binary-under-NixOS.patch
|
||||
];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
Loading…
Reference in a new issue