depot/third_party/nixpkgs/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

41 lines
867 B
Nix

{ lib
, fetchFromGitHub
, python3Packages
, prometheus-alertmanager
}:
python3Packages.buildPythonApplication rec {
pname = "prometheus-xmpp-alerts";
version = "0.5.1";
src = fetchFromGitHub {
owner = "jelmer";
repo = pname;
rev = "v${version}";
sha256 = "0qmmmlcanbrhyyxi32gy3gibgvj7jdjwpa8cf5ci9czvbyxg4rld";
};
propagatedBuildInputs = [
prometheus-alertmanager
] ++ (with python3Packages; [
aiohttp
slixmpp
prometheus_client
pyyaml
]);
checkInputs = with python3Packages; [
pytz
];
checkPhase = ''
${python3Packages.python.interpreter} -m unittest discover
'';
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 ];
};
}