depot/pkgs/servers/matrix-synapse/tools/synadm.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

48 lines
1.1 KiB
Nix

{ lib
, python3
, fetchPypi
, nix-update-script
}:
python3.pkgs.buildPythonApplication rec {
pname = "synadm";
version = "0.46.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-EjV3zTd6VAemNS/mD19Caw9SQZW1qs4+07wRxfVq++g=";
};
propagatedBuildInputs = with python3.pkgs; [
click
click-option-group
dnspython
tabulate
pyyaml
requests
];
checkPhase = ''
runHook preCheck
export HOME=$TMPDIR
$out/bin/synadm -h > /dev/null
runHook postCheck
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Command line admin tool for Synapse";
mainProgram = "synadm";
longDescription = ''
A CLI tool to help admins of Matrix Synapse homeservers
conveniently issue commands available via its admin API's
(element-hq/synapse@master/docs/admin_api)
'';
changelog = "https://github.com/JOJ0/synadm/releases/tag/v${version}";
homepage = "https://github.com/JOJ0/synadm";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hexa ];
};
}