diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/monitoring-plugins/default.nix | 33 | ||||
-rw-r--r-- | pkgs/naemon-livestatus/default.nix | 23 | ||||
-rw-r--r-- | pkgs/naemon-livestatus/naemon-livestatus.json | 15 | ||||
-rw-r--r-- | pkgs/naemon/default.nix | 34 | ||||
-rw-r--r-- | pkgs/naemon/naemon.json | 15 |
6 files changed, 124 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index ff9d477b..49495730 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix | |||
@@ -42,6 +42,10 @@ rec { | |||
42 | composerEnv = callPackage ./composer-env {}; | 42 | composerEnv = callPackage ./composer-env {}; |
43 | webapps = callPackage ./webapps { inherit mylibs composerEnv private; }; | 43 | webapps = callPackage ./webapps { inherit mylibs composerEnv private; }; |
44 | 44 | ||
45 | monitoring-plugins = callPackage ./monitoring-plugins {}; | ||
46 | naemon = callPackage ./naemon { inherit mylibs monitoring-plugins; }; | ||
47 | naemon-livestatus = callPackage ./naemon-livestatus { inherit mylibs naemon; }; | ||
48 | |||
45 | private = if builtins.pathExists (./. + "/private") | 49 | private = if builtins.pathExists (./. + "/private") |
46 | then import ./private { inherit pkgs; } | 50 | then import ./private { inherit pkgs; } |
47 | else { webapps = {}; }; | 51 | else { webapps = {}; }; |
diff --git a/pkgs/monitoring-plugins/default.nix b/pkgs/monitoring-plugins/default.nix new file mode 100644 index 00000000..852d29bf --- /dev/null +++ b/pkgs/monitoring-plugins/default.nix | |||
@@ -0,0 +1,33 @@ | |||
1 | { stdenv, iputils, fetchpatch, fetchurl, file, hostname, perl, openssl, | ||
2 | bind, openldap, procps-ng, postfix, | ||
3 | wrapperDir ? "/run/wrappers/bin" | ||
4 | }: | ||
5 | stdenv.mkDerivation rec { | ||
6 | pname = "monitoring-plugins"; | ||
7 | version = "2.2"; | ||
8 | name = "${pname}-${version}"; | ||
9 | |||
10 | src = fetchurl { | ||
11 | url = "https://www.monitoring-plugins.org/download/${name}.tar.gz"; | ||
12 | sha256 = "0r9nvnk64nv7k8w352n99lw4p92pycxd9wlga9zyzjx9027m6si9"; | ||
13 | }; | ||
14 | |||
15 | patches = [ | ||
16 | (fetchpatch { | ||
17 | name = "mariadb.patch"; | ||
18 | url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mariadb.patch?h=packages/monitoring-plugins"; | ||
19 | sha256 = "0jf6fqkyzag66rid92m7asnr2dp8rr8kn4zjvhqg0mqvf8imppky"; | ||
20 | }) | ||
21 | ]; | ||
22 | |||
23 | # ping needs CAP_NET_RAW capability which is set only in the wrappers namespace | ||
24 | configurePhase = '' | ||
25 | ./configure --disable-static --disable-dependency-tracking \ | ||
26 | --prefix=$out \ | ||
27 | --with-ping-command="${wrapperDir}/ping -4 -n -U -w %d -c %d %s" \ | ||
28 | --with-ping6-command="${wrapperDir}/ping -6 -n -U -w %d -c %d %s" \ | ||
29 | --with-sudo-command="${wrapperDir}/sudo" | ||
30 | ''; | ||
31 | |||
32 | buildInputs = [ perl file hostname iputils openssl openldap procps-ng bind.dnsutils postfix ]; | ||
33 | } | ||
diff --git a/pkgs/naemon-livestatus/default.nix b/pkgs/naemon-livestatus/default.nix new file mode 100644 index 00000000..46ef51ac --- /dev/null +++ b/pkgs/naemon-livestatus/default.nix | |||
@@ -0,0 +1,23 @@ | |||
1 | { stdenv, mylibs, autoconf, automake, | ||
2 | libtool, pkg-config, naemon, | ||
3 | varDir ? "/var/lib/naemon", | ||
4 | etcDir ? "/etc/naemon" | ||
5 | }: | ||
6 | stdenv.mkDerivation (mylibs.fetchedGithub ./naemon-livestatus.json // { | ||
7 | preConfigure = '' | ||
8 | ./autogen.sh || true | ||
9 | ''; | ||
10 | |||
11 | configureFlags = [ | ||
12 | "--localstatedir=${varDir}" | ||
13 | "--sysconfdir=${etcDir}" | ||
14 | ]; | ||
15 | |||
16 | preInstall = '' | ||
17 | substituteInPlace Makefile --replace \ | ||
18 | '@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am' \ | ||
19 | '@$(MAKE) $(AM_MAKEFLAGS) install-exec-am' | ||
20 | ''; | ||
21 | |||
22 | buildInputs = [ autoconf automake libtool pkg-config naemon ]; | ||
23 | }) | ||
diff --git a/pkgs/naemon-livestatus/naemon-livestatus.json b/pkgs/naemon-livestatus/naemon-livestatus.json new file mode 100644 index 00000000..c648d2bb --- /dev/null +++ b/pkgs/naemon-livestatus/naemon-livestatus.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "33dbcfe-master", | ||
3 | "meta": { | ||
4 | "name": "naemon-livestatus", | ||
5 | "url": "https://github.com/naemon/naemon-livestatus", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "naemon", | ||
10 | "repo": "naemon-livestatus", | ||
11 | "rev": "33dbcfe18e42158f25c27cff95a1e07b73be53b0", | ||
12 | "sha256": "16jk0c6pwr7ck0g6s12hj6czbhgdr7c7f74zzsp5279af86y8fd6", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||
diff --git a/pkgs/naemon/default.nix b/pkgs/naemon/default.nix new file mode 100644 index 00000000..080a226d --- /dev/null +++ b/pkgs/naemon/default.nix | |||
@@ -0,0 +1,34 @@ | |||
1 | { stdenv, mylibs, help2man, monitoring-plugins, autoconf, automake, | ||
2 | libtool, glib, pkg-config, gperf, | ||
3 | varDir ? "/var/lib/naemon", | ||
4 | etcDir ? "/etc/naemon", | ||
5 | cacheDir ? "/var/cache/naemon", | ||
6 | logDir ? "/var/log/naemon", | ||
7 | runDir ? "/run/naemon", | ||
8 | user ? "naemon", | ||
9 | group ? "naemon" | ||
10 | }: | ||
11 | stdenv.mkDerivation (mylibs.fetchedGithub ./naemon.json // { | ||
12 | preConfigure = '' | ||
13 | ./autogen.sh || true | ||
14 | ''; | ||
15 | |||
16 | configureFlags = [ | ||
17 | "--localstatedir=${varDir}" | ||
18 | "--sysconfdir=${etcDir}" | ||
19 | "--with-pkgconfdir=${etcDir}" | ||
20 | "--with-pluginsdir=${monitoring-plugins}/libexec" | ||
21 | "--with-tempdir=${cacheDir}" | ||
22 | "--with-checkresultdir=${cacheDir}/checkresults" | ||
23 | "--with-logdir=${logDir}" | ||
24 | "--with-naemon-user=${user}" | ||
25 | "--with-naemon-group=${group}" | ||
26 | "--with-lockfile=${runDir}/naemon.pid" | ||
27 | ]; | ||
28 | |||
29 | preInstall = '' | ||
30 | substituteInPlace Makefile --replace '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook' "" | ||
31 | ''; | ||
32 | |||
33 | buildInputs = [ autoconf automake help2man libtool glib pkg-config gperf ]; | ||
34 | }) | ||
diff --git a/pkgs/naemon/naemon.json b/pkgs/naemon/naemon.json new file mode 100644 index 00000000..c68647f6 --- /dev/null +++ b/pkgs/naemon/naemon.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "ba6fd20-master", | ||
3 | "meta": { | ||
4 | "name": "naemon", | ||
5 | "url": "https://github.com/naemon/naemon-core", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "naemon", | ||
10 | "repo": "naemon-core", | ||
11 | "rev": "ba6fd20221fbdd5c99b4eb5dcf4ee5681c5a9495", | ||
12 | "sha256": "15rvqg985nn05rsgkch4ix8y2wg7a6pb70d63ckzy1inwqjp8z46", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||