nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 53 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 lockfileProgs, 6 perlPackages, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "logcheck"; 11 version = "1.4.7"; 12 _name = "logcheck_${version}"; 13 14 src = fetchurl { 15 url = "mirror://debian/pool/main/l/logcheck/${_name}.tar.xz"; 16 sha256 = "sha256-zBYMvKwo85OI6LluRixOYtAFRTtpV/Hw6qjAk/+c898="; 17 }; 18 19 prePatch = '' 20 # do not set sticky bit in nix store. 21 substituteInPlace Makefile --replace 2750 0750 22 ''; 23 24 preConfigure = '' 25 substituteInPlace src/logtail --replace "/usr/bin/perl" "${perlPackages.perl}/bin/perl" 26 substituteInPlace src/logtail2 --replace "/usr/bin/perl" "${perlPackages.perl}/bin/perl" 27 28 sed -i -e 's|! -f /usr/bin/lockfile|! -f ${lockfileProgs}/bin/lockfile|' \ 29 -e 's|^\([ \t]*\)lockfile-|\1${lockfileProgs}/bin/lockfile-|' \ 30 -e "s|/usr/sbin/logtail2|$out/sbin/logtail2|" \ 31 -e 's|mime-construct|${perlPackages.mimeConstruct}/bin/mime-construct|' \ 32 -e 's|\$(run-parts --list "\$dir")|"$dir"/*|' src/logcheck 33 ''; 34 35 makeFlags = [ 36 "DESTDIR=$(out)" 37 "SBINDIR=sbin" 38 "BINDIR=bin" 39 "SHAREDIR=share/logtail/detectrotate" 40 ]; 41 42 meta = { 43 description = "Mails anomalies in the system logfiles to the administrator"; 44 longDescription = '' 45 Mails anomalies in the system logfiles to the administrator. 46 47 Logcheck helps spot problems and security violations in your logfiles automatically and will send the results to you by e-mail. 48 Logcheck was part of the Abacus Project of security tools, but this version has been rewritten. 49 ''; 50 homepage = "https://salsa.debian.org/debian/logcheck"; 51 license = lib.licenses.gpl2Plus; 52 }; 53}