diff options
-rwxr-xr-x | pkgs/build-support/upstream-updater/create-src-info.sh | 20 | ||||
-rw-r--r-- | pkgs/tools/system/monit/default.nix | 30 | ||||
-rw-r--r-- | pkgs/tools/system/monit/src-for-default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/system/monit/src-info-for-default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
5 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/build-support/upstream-updater/create-src-info.sh b/pkgs/build-support/upstream-updater/create-src-info.sh new file mode 100755 index 000000000000..b5c235dcfcf8 --- /dev/null +++ b/pkgs/build-support/upstream-updater/create-src-info.sh @@ -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 diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix new file mode 100644 index 000000000000..b8b2e2cbcdcf --- /dev/null +++ b/pkgs/tools/system/monit/default.nix @@ -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 + ]; + }; +} diff --git a/pkgs/tools/system/monit/src-for-default.nix b/pkgs/tools/system/monit/src-for-default.nix new file mode 100644 index 000000000000..f024801515fb --- /dev/null +++ b/pkgs/tools/system/monit/src-for-default.nix @@ -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"; + +} diff --git a/pkgs/tools/system/monit/src-info-for-default.nix b/pkgs/tools/system/monit/src-info-for-default.nix new file mode 100644 index 000000000000..691984a9fd5e --- /dev/null +++ b/pkgs/tools/system/monit/src-info-for-default.nix @@ -0,0 +1,4 @@ +{ + downloadPage = "http://mmonit.com/monit/download/"; + baseName = "monit"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 407f9e47641c..ca381bac3698 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; }; |