]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - flakes/mypackages/pkgs/naemon/default.nix
Move backup directory to host subdir
[perso/Immae/Config/Nix.git] / flakes / mypackages / pkgs / naemon / default.nix
1 { stdenv, fetchFromGitHub, 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 ({
12 pname = "naemon";
13 version = "d7ac1c8-master";
14 src = fetchFromGitHub {
15 owner = "naemon";
16 repo = "naemon-core";
17 rev = "d7ac1c824e01dbb1c4a6bd0550b324e7cf165d54";
18 sha256 = "003grwciplnqfn9jh2km2pm6xxp8fxvmwihg3vmch8f0vfwcmv1m";
19 fetchSubmodules = true;
20 };
21 passthru.status_engine_version = "1-1-0";
22 preConfigure = ''
23 ./autogen.sh || true
24 '';
25
26 configureFlags = [
27 "--localstatedir=${varDir}"
28 "--sysconfdir=${etcDir}"
29 "--with-pkgconfdir=${etcDir}"
30 "--with-pluginsdir=${monitoring-plugins}/libexec"
31 "--with-tempdir=${cacheDir}"
32 "--with-checkresultdir=${cacheDir}/checkresults"
33 "--with-logdir=${logDir}"
34 "--with-naemon-user=${user}"
35 "--with-naemon-group=${group}"
36 "--with-lockfile=${runDir}/naemon.pid"
37 ];
38
39 preInstall = ''
40 substituteInPlace Makefile --replace '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook' ""
41 '';
42
43 buildInputs = [ autoconf automake help2man libtool glib pkg-config gperf ];
44 })