depot/third_party/nixpkgs/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

48 lines
998 B
Nix

{ lib
, fetchFromGitHub
, python3Packages
, prometheus-alertmanager
}:
python3Packages.buildPythonApplication rec {
pname = "prometheus-xmpp-alerts";
version = "0.5.6";
src = fetchFromGitHub {
owner = "jelmer";
repo = pname;
rev = "v${version}";
sha256 = "sha256-PwShGS1rbfZCK5OS6Cnn+mduOpWAD4fC69mcGB5GB1c=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "bs4" "beautifulsoup4"
'';
propagatedBuildInputs = [
prometheus-alertmanager
] ++ (with python3Packages; [
aiohttp
aiohttp-openmetrics
beautifulsoup4
jinja2
slixmpp
prometheus-client
pyyaml
]);
checkInputs = with python3Packages; [
unittestCheckHook
pytz
];
pythonImportsCheck = [ "prometheus_xmpp" ];
meta = {
description = "XMPP Web hook for Prometheus";
homepage = "https://github.com/jelmer/prometheus-xmpp-alerts";
maintainers = with lib.maintainers; [ fpletz ];
license = with lib.licenses; [ asl20 ];
};
}