2012-08-25 10:14:40 +01:00
|
|
|
{ stdenv, fetchurl, lockfileProgs, perl, mimeConstruct }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-03-01 02:10:30 +00:00
|
|
|
name = "logcheck-${version}";
|
|
|
|
version = "1.3.18";
|
|
|
|
_name = "logcheck_${version}";
|
2012-08-25 10:14:40 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-01 02:10:30 +00:00
|
|
|
url = "mirror://debian/pool/main/l/logcheck/${_name}.tar.xz";
|
|
|
|
sha256 = "1x4skb5nmv2xj8cygj8pq1rd1ws4m2fsibw54yslgdyjri4r2yq7";
|
2012-08-25 10:14:40 +01:00
|
|
|
};
|
|
|
|
|
2017-06-16 12:48:04 +01:00
|
|
|
prePatch = ''
|
2017-06-17 10:38:50 +01:00
|
|
|
# do not set sticky bit in nix store.
|
2017-06-16 12:48:04 +01:00
|
|
|
substituteInPlace Makefile --replace 2750 0750
|
|
|
|
'';
|
|
|
|
|
2012-08-25 10:14:40 +01:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace src/logtail --replace "/usr/bin/perl" "${perl}/bin/perl"
|
|
|
|
substituteInPlace src/logtail2 --replace "/usr/bin/perl" "${perl}/bin/perl"
|
|
|
|
|
|
|
|
sed -i -e 's|! -f /usr/bin/lockfile|! -f ${lockfileProgs}/bin/lockfile|' \
|
|
|
|
-e 's|^\([ \t]*\)lockfile-|\1${lockfileProgs}/bin/lockfile-|' \
|
|
|
|
-e "s|/usr/sbin/logtail2|$out/sbin/logtail2|" \
|
|
|
|
-e 's|mime-construct|${mimeConstruct}/bin/mime-construct|' \
|
|
|
|
-e 's|\$(run-parts --list "\$dir")|"$dir"/*|' src/logcheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"SBINDIR=sbin"
|
|
|
|
"BINDIR=bin"
|
|
|
|
"SHAREDIR=share/logtail/detectrotate"
|
|
|
|
];
|
|
|
|
|
2017-03-01 02:10:30 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Mails anomalies in the system logfiles to the administrator";
|
2012-08-25 10:14:40 +01:00
|
|
|
longDescription = ''
|
|
|
|
Mails anomalies in the system logfiles to the administrator.
|
|
|
|
|
|
|
|
Logcheck helps spot problems and security violations in your logfiles automatically and will send the results to you by e-mail.
|
|
|
|
Logcheck was part of the Abacus Project of security tools, but this version has been rewritten.
|
|
|
|
'';
|
2017-04-16 19:41:06 +01:00
|
|
|
homepage = http://logcheck.alioth.debian.org/;
|
2017-03-01 02:10:30 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.bluescreen303 ];
|
|
|
|
|
2012-08-25 10:14:40 +01:00
|
|
|
};
|
|
|
|
}
|