From e017139e7092d9ef1ec9b0eaf5ed5bd32006d9c3 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sun, 4 May 2014 01:55:46 +0200 Subject: [PATCH 1/3] Add wmertens to maintainers --- lib/maintainers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index cf0743fa403a..f64b087e55df 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -91,6 +91,7 @@ vlstill = "Vladimír Štill "; winden = "Antonio Vargas Gonzalez "; wizeman = "Ricardo M. Correia "; + wmertens = "Wout Mertens "; z77z = "Marco Maggesi "; zef = "Zef Hemel "; zimbatm = "zimbatm "; From 6ab576b702e9dbe64e7c1472a5d1386a34cc128c Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sun, 4 May 2014 09:51:10 +0200 Subject: [PATCH 2/3] Monit: Bump to 5.8 - Use callPackage etc - Make PAM optional --- pkgs/tools/system/monit/default.nix | 40 ++++++++----------- pkgs/tools/system/monit/src-for-default.nix | 9 ----- .../system/monit/src-info-for-default.nix | 4 -- pkgs/top-level/all-packages.nix | 4 +- 4 files changed, 17 insertions(+), 40 deletions(-) delete mode 100644 pkgs/tools/system/monit/src-for-default.nix delete mode 100644 pkgs/tools/system/monit/src-info-for-default.nix diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix index b8b2e2cbcdcf..cbd9c20389ce 100644 --- a/pkgs/tools/system/monit/default.nix +++ b/pkgs/tools/system/monit/default.nix @@ -1,30 +1,22 @@ -a : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - bison flex openssl - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{stdenv, fetchurl, openssl, bison, flex, pam, usePAM ? stdenv.isLinux }: - inherit (s) name; - inherit buildInputs; +stdenv.mkDerivation rec { + name = "monit-5.8"; + + src = fetchurl { + url = "${meta.homepage}dist/${name}.tar.gz"; + sha256 = "1xa7i29ma81jjxac0qc29wcxxvbv58n3jbwmllscamh1phz5f00c"; + }; + + nativeBuildInputs = [ bison flex ]; + buildInputs = [ openssl ] ++ stdenv.lib.optionals usePAM [ pam ]; + + configureFlags = stdenv.lib.optionals (! usePAM) [ "--without-pam" ]; - /* 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 = { + homepage = http://mmonit.com/monit/; description = "Monitoring system"; - maintainers = [ - a.lib.maintainers.raskin - ]; + license = stdenv.lib.licenses.agpl3; + maintainer = with stdenv.lib.maintainers; [ raskin wmertens ]; }; } diff --git a/pkgs/tools/system/monit/src-for-default.nix b/pkgs/tools/system/monit/src-for-default.nix deleted file mode 100644 index b74958ae19a0..000000000000 --- a/pkgs/tools/system/monit/src-for-default.nix +++ /dev/null @@ -1,9 +0,0 @@ -rec { - version="5.5"; - name="monit-5.5"; - hash="0lvw9llsnaj72dp6di74sc4sxpa4q3g23m28jwy4brphndhb0xl2"; - url="http://mmonit.com/monit/download/../dist/monit-${version}.tar.gz"; - advertisedUrl="http://mmonit.com/monit/download/../dist/monit-5.5.tar.gz"; - - -} diff --git a/pkgs/tools/system/monit/src-info-for-default.nix b/pkgs/tools/system/monit/src-info-for-default.nix deleted file mode 100644 index 691984a9fd5e..000000000000 --- a/pkgs/tools/system/monit/src-info-for-default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - 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 b92341445d04..b31db5f1bd93 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1430,9 +1430,7 @@ let modemmanager = callPackage ../tools/networking/modemmanager {}; - monit = builderDefsPackage ../tools/system/monit { - inherit openssl flex bison; - }; + monit = callPackage ../tools/system/monit { }; mosh = callPackage ../tools/networking/mosh { boost = boostHeaders; From 1e711ee42d09673f4336cba05dace87ff4db0554 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Fri, 9 May 2014 22:47:45 +0200 Subject: [PATCH 3/3] Fix OpenSSL requirement --- pkgs/tools/system/monit/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix index cbd9c20389ce..28d58abe5aac 100644 --- a/pkgs/tools/system/monit/default.nix +++ b/pkgs/tools/system/monit/default.nix @@ -11,7 +11,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ bison flex ]; buildInputs = [ openssl ] ++ stdenv.lib.optionals usePAM [ pam ]; - configureFlags = stdenv.lib.optionals (! usePAM) [ "--without-pam" ]; + configureFlags = [ + "--with-ssl-incl-dir=${openssl}/include" + "--with-ssl-lib-dir=${openssl}/lib" + ] ++ stdenv.lib.optionals (! usePAM) [ "--without-pam" ]; meta = { homepage = http://mmonit.com/monit/;