2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, mailutils ? null
|
2021-03-20 04:20:00 +00:00
|
|
|
, aclSupport ? true, acl
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "logrotate";
|
2021-05-29 03:34:57 +00:00
|
|
|
version = "3.18.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "logrotate";
|
|
|
|
repo = "logrotate";
|
|
|
|
rev = version;
|
2021-05-29 03:34:57 +00:00
|
|
|
sha256 = "sha256-OJOV++rtN9ry+l0c0eanpu/Pwu8cOHfyEaDWp3FZjkw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Logrotate wants to access the 'mail' program; to be done.
|
2021-02-19 19:06:45 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-compress-command=${gzip}/bin/gzip"
|
|
|
|
"--with-uncompress-command=${gzip}/bin/gunzip"
|
|
|
|
] ++ lib.optionals (mailutils != null) [
|
|
|
|
"--with-default-mail-command=${mailutils}/bin/mail"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = [ popt ] ++ lib.optionals aclSupport [ acl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://fedorahosted.org/releases/l/o/logrotate/";
|
|
|
|
description = "Rotates and compresses system logs";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.viric ];
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|