aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-12-21 01:19:43 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-12-21 01:19:43 +0100
commit364c87ba89ac8261ac151ec2d1229b203b8a2ad1 (patch)
tree8bd38decaad5f6328768cdb34923d5f714a7070a
parente8ac4a5449e9bca441e2ac93e041f3399cf3026a (diff)
downloadNix-364c87ba89ac8261ac151ec2d1229b203b8a2ad1.tar.gz
Nix-364c87ba89ac8261ac151ec2d1229b203b8a2ad1.tar.zst
Nix-364c87ba89ac8261ac151ec2d1229b203b8a2ad1.zip
Add cnagios program
-rw-r--r--default.nix22
-rw-r--r--fetched/cnagios.json15
2 files changed, 37 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index b5dad69..92dea9c 100644
--- a/default.nix
+++ b/default.nix
@@ -179,6 +179,27 @@ let
179 ''; 179 '';
180 }; 180 };
181 181
182 cnagios = stdenv.mkDerivation (fetchedGithub ./fetched/cnagios.json // rec {
183 configureFlags = [
184 "--with-etc-dir=/etc/cnagios"
185 "--with-var-dir=/var/lib/naemon"
186 "--with-nagios-data=4"
187 ];
188
189 prePatch = ''
190 sed -i -e "s/-lcurses/-lncurses/" Makefile.in
191 '';
192 installPhase = ''
193 install -dm755 $out/share/doc/cnagios
194 install -Dm644 cnagiosrc $out/share/doc/cnagios/
195 install -Dm644 cnagios.help $out/share/doc/cnagios/
196 install -Dm644 cnagios.pl $out/share/doc/cnagios/
197 install -dm755 $out/bin
198 install -Dm755 cnagios $out/bin/
199 '';
200 propagatedBuildInputs = [ perl ncurses ];
201 });
202
182# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh 203# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
183# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks 204# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
184in 205in
@@ -208,5 +229,6 @@ in
208 inherit note terminal_velocity; 229 inherit note terminal_velocity;
209 inherit mtop; 230 inherit mtop;
210 inherit tiv; 231 inherit tiv;
232 inherit cnagios;
211 #inherit nixos; 233 #inherit nixos;
212 } 234 }
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 @@
1{
2 "tag": "3bd27fb-master",
3 "meta": {
4 "name": "cnagios",
5 "url": "https://github.com/dannywarren/cnagios",
6 "branch": "master"
7 },
8 "github": {
9 "owner": "dannywarren",
10 "repo": "cnagios",
11 "rev": "3bd27fb40e68f61ffd01bea6234b919a667b6fe4",
12 "sha256": "0iy5pmlcz6y3if72nav22xqxniiv1v8ywi0927m6s459hkw5n2rb",
13 "fetchSubmodules": true
14 }
15}