summary refs log blame commit diff
path: root/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix
blob: 97593cecca8969771b3968763124f6eb358e7aa9 (plain) (tree)
1
2
3
4
5
6
7
8
9




                         
 
                                            
                                   
                    



                         

                                                                    

    




                               
                     









                                                              







                                                                  
{ 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 ];
  };
}