depot/third_party/nixpkgs/pkgs/servers/matrix-synapse/tools/synadm.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

47 lines
1 KiB
Nix

{ 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 ];
};
}