From 364c87ba89ac8261ac151ec2d1229b203b8a2ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 21 Dec 2018 01:19:43 +0100 Subject: Add cnagios program --- default.nix | 22 ++++++++++++++++++++++ fetched/cnagios.json | 15 +++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 fetched/cnagios.json diff --git a/default.nix b/default.nix index b5dad69..92dea9c 100644 --- a/default.nix +++ b/default.nix @@ -179,6 +179,27 @@ let ''; }; + cnagios = stdenv.mkDerivation (fetchedGithub ./fetched/cnagios.json // rec { + configureFlags = [ + "--with-etc-dir=/etc/cnagios" + "--with-var-dir=/var/lib/naemon" + "--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/ + ''; + propagatedBuildInputs = [ perl ncurses ]; + }); + # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks in @@ -208,5 +229,6 @@ in inherit note terminal_velocity; inherit mtop; inherit tiv; + inherit cnagios; #inherit nixos; } diff --git a/fetched/cnagios.json b/fetched/cnagios.json new file mode 100644 index 0000000..4c1c385 --- /dev/null +++ b/fetched/cnagios.json @@ -0,0 +1,15 @@ +{ + "tag": "3bd27fb-master", + "meta": { + "name": "cnagios", + "url": "https://github.com/dannywarren/cnagios", + "branch": "master" + }, + "github": { + "owner": "dannywarren", + "repo": "cnagios", + "rev": "3bd27fb40e68f61ffd01bea6234b919a667b6fe4", + "sha256": "0iy5pmlcz6y3if72nav22xqxniiv1v8ywi0927m6s459hkw5n2rb", + "fetchSubmodules": true + } +} -- cgit v1.2.3