lol
1{ stdenv, fetchurl, lockfileProgs, perl, mimeConstruct }:
2
3stdenv.mkDerivation rec {
4 _name = "logcheck";
5 version = "1.3.17";
6 name = "${_name}-${version}";
7
8 src = fetchurl {
9 url = "mirror://debian/pool/main/l/${_name}/${_name}_${version}.tar.xz";
10 sha256 = "0fphzaljc9ddv1x6l3zdf9cbarqgzpdqaqwm3plmarcc7qrgrly2";
11 };
12
13 preConfigure = ''
14 substituteInPlace src/logtail --replace "/usr/bin/perl" "${perl}/bin/perl"
15 substituteInPlace src/logtail2 --replace "/usr/bin/perl" "${perl}/bin/perl"
16
17 sed -i -e 's|! -f /usr/bin/lockfile|! -f ${lockfileProgs}/bin/lockfile|' \
18 -e 's|^\([ \t]*\)lockfile-|\1${lockfileProgs}/bin/lockfile-|' \
19 -e "s|/usr/sbin/logtail2|$out/sbin/logtail2|" \
20 -e 's|mime-construct|${mimeConstruct}/bin/mime-construct|' \
21 -e 's|\$(run-parts --list "\$dir")|"$dir"/*|' src/logcheck
22 '';
23
24 makeFlags = [
25 "DESTDIR=$(out)"
26 "SBINDIR=sbin"
27 "BINDIR=bin"
28 "SHAREDIR=share/logtail/detectrotate"
29 ];
30
31 meta = {
32 description = "Mails anomalies in the system logfiles to the administrator";
33 longDescription = ''
34 Mails anomalies in the system logfiles to the administrator.
35
36 Logcheck helps spot problems and security violations in your logfiles automatically and will send the results to you by e-mail.
37 Logcheck was part of the Abacus Project of security tools, but this version has been rewritten.
38 '';
39 homepage = http://logcheck.org;
40 license = stdenv.lib.licenses.gpl2;
41
42 maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
43 platforms = stdenv.lib.platforms.all;
44 };
45}