summaryrefslogtreecommitdiff
path: root/pkgs/cnagios/default.nix
blob: d5b52f3f6e8ba983246cee4a098995ced09ae668 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, mylibs, perl, ncurses }:
stdenv.mkDerivation (mylibs.fetchedGithub ./cnagios.json // {
  configureFlags = [
    "--with-etc-dir=/etc/cnagios"
    "--with-var-dir=/var/lib/naemon"
    "--with-status-file=/var/lib/naemon/status.dat"
    "--with-nagios-data=4"
  ];

  prePatch = ''
    sed -i -e "s/-lcurses/-lncurses/" Makefile.in
  '';
  installPhase = ''
    install -dm755 $out/share/doc/cnagios
    install -Dm644 cnagiosrc $out/share/doc/cnagios/
    install -Dm644 cnagios.help $out/share/doc/cnagios/
    install -Dm644 cnagios.pl $out/share/doc/cnagios/
    install -dm755 $out/bin
    install -Dm755 cnagios $out/bin/
  '';
  buildInputs = [ perl ncurses ];
})