2021-04-30 00:29:51 +03:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, prometheus-alertmanager
|
|
|
|
}:
|
2020-02-01 17:02:58 +03:00
|
|
|
|
2021-04-30 00:29:51 +03:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-02-01 17:02:58 +03:00
|
|
|
pname = "prometheus-xmpp-alerts";
|
2021-04-30 00:29:51 +03:00
|
|
|
version = "0.5.1";
|
2020-02-01 17:02:58 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jelmer";
|
|
|
|
repo = pname;
|
2021-04-30 00:29:51 +03:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0qmmmlcanbrhyyxi32gy3gibgvj7jdjwpa8cf5ci9czvbyxg4rld";
|
2020-02-01 17:02:58 +03:00
|
|
|
};
|
|
|
|
|
2021-04-30 00:29:51 +03:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
prometheus-alertmanager
|
|
|
|
] ++ (with python3Packages; [
|
|
|
|
aiohttp
|
|
|
|
slixmpp
|
2021-08-26 03:08:48 +03:00
|
|
|
prometheus-client
|
2021-04-30 00:29:51 +03:00
|
|
|
pyyaml
|
|
|
|
]);
|
|
|
|
|
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python3Packages.python.interpreter} -m unittest discover
|
|
|
|
'';
|
2020-02-01 17:02:58 +03:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|