diff options
Diffstat (limited to 'overlays/matrix-synapse/1.70.1/tools/synadm.nix')
-rw-r--r-- | overlays/matrix-synapse/1.70.1/tools/synadm.nix | 47 |
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 | |||
5 | with 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 | } | ||