depot/third_party/nixpkgs/pkgs/servers/matrix-synapse/tools/synadm.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

46 lines
1.1 KiB
Nix

{ lib
, nix-update-script
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "synadm";
version = "0.41.2";
format = "setuptools";
src = python3.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-wSpgc1umBMLCc2ThfYSuNNnzqWXyEQM0XhTuOAQaiXg=";
};
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";
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)
'';
changelog = "https://github.com/JOJ0/synadm/releases/tag/v${version}";
homepage = "https://github.com/JOJ0/synadm";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hexa ];
};
}