summaryrefslogtreecommitdiff
path: root/overlays/matrix-synapse/1.70.1/tools/synadm.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-11-07 20:51:39 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-11-07 20:51:39 +0100
commit0e9f1e85cd8c6f9d546ef88e971043b909017170 (patch)
tree5cb4d14df7594ef123f20d82cb2ec423b6bca744 /overlays/matrix-synapse/1.70.1/tools/synadm.nix
parentf563ddece04adfd8d80d4e984405f5c70a6c94f3 (diff)
downloadnixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar
nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar.gz
nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar.bz2
nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.tar.xz
nixos-0e9f1e85cd8c6f9d546ef88e971043b909017170.zip
...
Diffstat (limited to 'overlays/matrix-synapse/1.70.1/tools/synadm.nix')
-rw-r--r--overlays/matrix-synapse/1.70.1/tools/synadm.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/overlays/matrix-synapse/1.70.1/tools/synadm.nix b/overlays/matrix-synapse/1.70.1/tools/synadm.nix
new file mode 100644
index 00000000..5075e42e
--- /dev/null
+++ b/overlays/matrix-synapse/1.70.1/tools/synadm.nix
@@ -0,0 +1,47 @@
1{ lib
2, python3Packages
3}:
4
5with python3Packages; buildPythonApplication rec {
6 pname = "synadm";
7 version = "0.36";
8 format = "setuptools";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "sha256-OMXUbfAC927qJw0B5sq1lGJQRkFAUdohIOkCYUbZumI=";
13 };
14
15 postPatch = ''
16 substituteInPlace setup.py \
17 --replace "Click>=7.0,<8.0" "Click"
18 '';
19
20 propagatedBuildInputs = [
21 click
22 click-option-group
23 dnspython
24 tabulate
25 pyyaml
26 requests
27 ];
28
29 checkPhase = ''
30 runHook preCheck
31 export HOME=$TMPDIR
32 $out/bin/synadm -h > /dev/null
33 runHook postCheck
34 '';
35
36 meta = with lib; {
37 description = "Command line admin tool for Synapse";
38 longDescription = ''
39 A CLI tool to help admins of Matrix Synapse homeservers
40 conveniently issue commands available via its admin API's
41 (matrix-org/synapse@master/docs/admin_api)
42 '';
43 homepage = "https://github.com/JOJ0/synadm";
44 license = licenses.gpl3Plus;
45 maintainers = with maintainers; [ hexa ];
46 };
47}