From a2230e848bc85e484ef14163ac90fdb7045855f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 26 Apr 2019 02:35:33 +0200 Subject: Move more packages to separate files --- pkgs/cnagios/cnagios.json | 15 +++++++++++++++ pkgs/cnagios/default.nix | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/cnagios/cnagios.json create mode 100644 pkgs/cnagios/default.nix (limited to 'pkgs/cnagios') diff --git a/pkgs/cnagios/cnagios.json b/pkgs/cnagios/cnagios.json new file mode 100644 index 0000000..4c1c385 --- /dev/null +++ b/pkgs/cnagios/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 + } +} diff --git a/pkgs/cnagios/default.nix b/pkgs/cnagios/default.nix new file mode 100644 index 0000000..2e6c799 --- /dev/null +++ b/pkgs/cnagios/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchedGithub, perl, ncurses }: +stdenv.mkDerivation (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 ]; +}) -- cgit v1.2.3