2018-08-05 23:19:35 +03:00
|
|
|
{ stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
|
|
|
|
, mailutils ? null
|
|
|
|
}:
|
2010-04-29 21:55:06 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "logrotate";
|
2020-07-12 11:36:33 +03:00
|
|
|
version = "3.17.0";
|
2010-04-29 21:55:06 +04:00
|
|
|
|
2017-08-04 18:14:55 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "logrotate";
|
|
|
|
repo = "logrotate";
|
|
|
|
rev = version;
|
2020-07-12 11:36:33 +03:00
|
|
|
sha256 = "133k4y24p918v4dva6dh70bdfv13jvwl2vlhq0mybrs3ripvnh4h";
|
2010-04-29 21:55:06 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
# Logrotate wants to access the 'mail' program; to be done.
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's,[a-z/]\+gzip,${gzip}/bin/gzip,' \
|
2018-08-05 23:19:35 +03:00
|
|
|
-e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac
|
|
|
|
|
|
|
|
${stdenv.lib.optionalString (mailutils != null) ''
|
|
|
|
sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac
|
|
|
|
''}
|
2010-04-29 21:55:06 +04:00
|
|
|
'';
|
|
|
|
|
2017-08-04 18:14:55 +03:00
|
|
|
autoreconfPhase = ''
|
|
|
|
./autogen.sh
|
2010-04-29 21:55:06 +04:00
|
|
|
'';
|
|
|
|
|
2017-08-04 18:14:55 +03:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2010-04-29 21:55:06 +04:00
|
|
|
buildInputs = [ popt ];
|
|
|
|
|
|
|
|
meta = {
|
2020-03-05 11:00:03 +03:00
|
|
|
homepage = "https://fedorahosted.org/releases/l/o/logrotate/";
|
2010-04-29 21:55:06 +04:00
|
|
|
description = "Rotates and compresses system logs";
|
2014-06-19 08:19:00 +04:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-01-15 19:46:30 +04:00
|
|
|
maintainers = [ stdenv.lib.maintainers.viric ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2010-04-29 21:55:06 +04:00
|
|
|
};
|
|
|
|
}
|