Adding monit monitoring tool; in the course of action creating a script to auto-prepare basic autoupdate layout

svn path=/nixpkgs/trunk/; revision=16863
This commit is contained in:
Michael Raskin 2009-08-26 16:22:20 +00:00
parent 921de5b511
commit f16657b14f
5 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#! /bin/sh
[ -z "$1" ] && {
echo "Use $0 expression-basename download-page package-base-name"
echo "Like:"
echo "$0 default http://example.com/downloads hello"
exit 1;
} >&2
own_dir="$(cd "$(dirname "$0")"; sh -c pwd)"
cp "$own_dir/../builder-defs/template-bdp-uud.nix" "$1.nix"
sed -e "s@src-for-default.nix@src-for-$1.nix@g" -i "$1.nix"
echo '{}' > "src-for-$1.nix"
cat << EOF > src-info-for-$1.nix
{
downloadPage = "$2";
baseName = "$3";
}
EOF

View file

@ -0,0 +1,30 @@
a :
let
s = import ./src-for-default.nix;
buildInputs = with a; [
bison flex openssl
];
in
rec {
src = a.fetchUrlFromSrcInfo s;
inherit (s) name;
inherit buildInputs;
/* doConfigure should be removed if not needed */
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
configureFlags = [
"--with-ssl-incl-dir=${a.openssl}/include"
"--with-ssl-lib-dir=${a.openssl}/lib"
];
preConfigure = a.fullDepEntry (''
sed -e 's@/bin/@@' -i Makefile.in
'') ["doUnpack" "minInit"];
meta = {
description = "Monitoring system";
maintainers = [
a.lib.maintainers.raskin
];
};
}

View file

@ -0,0 +1,8 @@
rec {
advertisedUrl="http://mmonit.com/monit/download/../dist/monit-5.0.3.tar.gz";
version = "5.0.3";
url="http://mmonit.com/monit/download/../dist/monit-5.0.3.tar.gz";
hash = "1lw7qp5906cb9jg8ifhfy9cvv4gbd28mkapgfpx0klb17jdm7ljx";
name = "monit-5.0.3";
}

View file

@ -0,0 +1,4 @@
{
downloadPage = "http://mmonit.com/monit/download/";
baseName = "monit";
}

View file

@ -1016,6 +1016,12 @@ let
inherit fetchurl stdenv ocaml zlib ncurses;
};
monit = builderDefsPackage ../tools/system/monit {
flex = flex2535;
bison = bison24;
inherit openssl;
};
mpage = import ../tools/text/mpage {
inherit fetchurl stdenv;
};