mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
53 lines
1.7 KiB
Nix
53 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
lockfile-progs,
|
|
perlPackages,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "logcheck";
|
|
version = "1.4.7";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://debian/pool/main/l/logcheck/logcheck_${finalAttrs.version}.tar.xz";
|
|
hash = "sha256-zBYMvKwo85OI6LluRixOYtAFRTtpV/Hw6qjAk/+c898=";
|
|
};
|
|
|
|
prePatch = ''
|
|
# do not set sticky bit in nix store.
|
|
substituteInPlace Makefile --replace-fail 2750 0750
|
|
'';
|
|
|
|
preConfigure = ''
|
|
substituteInPlace src/logtail --replace-fail "/usr/bin/perl" "${perlPackages.perl}/bin/perl"
|
|
substituteInPlace src/logtail2 --replace-fail "/usr/bin/perl" "${perlPackages.perl}/bin/perl"
|
|
|
|
sed -i -e 's|! -f /usr/bin/lockfile|! -f ${lockfile-progs}/bin/lockfile|' \
|
|
-e 's|^\([ \t]*\)lockfile-|\1${lockfile-progs}/bin/lockfile-|' \
|
|
-e "s|/usr/sbin/logtail2|$out/sbin/logtail2|" \
|
|
-e 's|mime-construct|${perlPackages.mimeConstruct}/bin/mime-construct|' \
|
|
-e 's|\$(run-parts --list "\$dir")|"$dir"/*|' src/logcheck
|
|
'';
|
|
|
|
makeFlags = [
|
|
"DESTDIR=$(out)"
|
|
"SBINDIR=sbin"
|
|
"BINDIR=bin"
|
|
"SHAREDIR=share/logtail/detectrotate"
|
|
];
|
|
|
|
meta = {
|
|
description = "Mails anomalies in the system logfiles to the administrator";
|
|
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.
|
|
'';
|
|
homepage = "https://salsa.debian.org/debian/logcheck";
|
|
license = lib.licenses.gpl2Plus;
|
|
};
|
|
})
|