From 0e9f1e85cd8c6f9d546ef88e971043b909017170 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 7 Nov 2022 20:51:39 +0100 Subject: ... --- overlays/matrix-synapse/1.70.1/tools/synadm.nix | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 overlays/matrix-synapse/1.70.1/tools/synadm.nix (limited to 'overlays/matrix-synapse/1.70.1/tools/synadm.nix') 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 @@ +{ lib +, python3Packages +}: + +with python3Packages; buildPythonApplication rec { + pname = "synadm"; + version = "0.36"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-OMXUbfAC927qJw0B5sq1lGJQRkFAUdohIOkCYUbZumI="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "Click>=7.0,<8.0" "Click" + ''; + + propagatedBuildInputs = [ + click + click-option-group + dnspython + tabulate + pyyaml + requests + ]; + + checkPhase = '' + runHook preCheck + export HOME=$TMPDIR + $out/bin/synadm -h > /dev/null + runHook postCheck + ''; + + meta = with lib; { + description = "Command line admin tool for Synapse"; + longDescription = '' + A CLI tool to help admins of Matrix Synapse homeservers + conveniently issue commands available via its admin API's + (matrix-org/synapse@master/docs/admin_api) + ''; + homepage = "https://github.com/JOJ0/synadm"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ hexa ]; + }; +} -- cgit v1.2.3