Merge pull request #112125 from dotlambda/alerta
alerta: move to all-packages.nix and use buildPythonApplication
This commit is contained in:
commit
6692b32105
|
@ -95,13 +95,13 @@ in
|
|||
ALERTA_SVR_CONF_FILE = alertaConf;
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.python36Packages.alerta-server}/bin/alertad run --port ${toString cfg.port} --host ${cfg.bind}";
|
||||
ExecStart = "${pkgs.alerta-server}/bin/alertad run --port ${toString cfg.port} --host ${cfg.bind}";
|
||||
User = "alerta";
|
||||
Group = "alerta";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.python36Packages.alerta ];
|
||||
environment.systemPackages = [ pkgs.alerta ];
|
||||
|
||||
users.users.alerta = {
|
||||
uid = config.ids.uids.alerta;
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{ lib, buildPythonPackage, fetchPypi
|
||||
, six, click, requests, requests-hawk, pytz, tabulate, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "alerta";
|
||||
version = "8.4.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "260ff3118e73396104129928217b0f317ac5afdff8221874d8986df22ecf5f34";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six click requests requests-hawk pytz tabulate ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/alerta --prefix PYTHONPATH : "$PYTHONPATH"
|
||||
'';
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://alerta.io";
|
||||
description = "Alerta Monitoring System command-line interface";
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
27
pkgs/servers/monitoring/alerta/client.nix
Normal file
27
pkgs/servers/monitoring/alerta/client.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib
|
||||
, python3
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "alerta";
|
||||
version = "8.4.0";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "260ff3118e73396104129928217b0f317ac5afdff8221874d8986df22ecf5f34";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
six click requests requests-hawk pytz tabulate
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
disabled = python3.pythonOlder "3.6";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://alerta.io";
|
||||
description = "Alerta Monitoring System command-line interface";
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
|
@ -1,17 +1,17 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, pythonOlder
|
||||
, bcrypt, blinker, flask, flask-compress, flask-cors, mohawk, psycopg2, pyjwt, pymongo, python-dateutil, pytz, pyyaml, requests, requests-hawk, sentry-sdk
|
||||
{ lib
|
||||
, python3
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "alerta-server";
|
||||
version = "8.3.3";
|
||||
|
||||
src = fetchPypi {
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "a2713a31c6e326c774a3ee0328f424f944b951935ff1b893a4a66598d61c5a97";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
bcrypt
|
||||
blinker
|
||||
flask
|
||||
|
@ -31,11 +31,7 @@ buildPythonPackage rec {
|
|||
|
||||
doCheck = false; # We can't run the tests from Nix, because they rely on the presence of a working MongoDB server
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/alertad --prefix PYTHONPATH : "$PYTHONPATH"
|
||||
'';
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
disabled = python3.pythonOlder "3.6";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://alerta.io";
|
|
@ -17832,6 +17832,10 @@ in
|
|||
|
||||
adguardhome = callPackage ../servers/adguardhome {};
|
||||
|
||||
alerta = callPackage ../servers/monitoring/alerta/client.nix { };
|
||||
|
||||
alerta-server = callPackage ../servers/monitoring/alerta { };
|
||||
|
||||
apacheHttpd_2_4 = callPackage ../servers/http/apache-httpd/2.4.nix { };
|
||||
apacheHttpd = pkgs.apacheHttpd_2_4;
|
||||
|
||||
|
|
|
@ -334,10 +334,6 @@ in {
|
|||
|
||||
alembic = callPackage ../development/python-modules/alembic { };
|
||||
|
||||
alerta = callPackage ../development/python-modules/alerta { };
|
||||
|
||||
alerta-server = callPackage ../development/python-modules/alerta-server { };
|
||||
|
||||
algebraic-data-types = callPackage ../development/python-modules/algebraic-data-types { };
|
||||
|
||||
allpairspy = callPackage ../development/python-modules/allpairspy { };
|
||||
|
|
Loading…
Reference in a new issue