2018-08-05 20:19:35 +00:00
|
|
|
{ stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
|
|
|
|
, mailutils ? null
|
|
|
|
}:
|
2010-04-29 17:55:06 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "logrotate";
|
2019-09-27 02:15:47 +00:00
|
|
|
version = "3.15.1";
|
2010-04-29 17:55:06 +00:00
|
|
|
|
2017-08-04 15:14:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "logrotate";
|
|
|
|
repo = "logrotate";
|
|
|
|
rev = version;
|
2019-09-27 02:15:47 +00:00
|
|
|
sha256 = "0l92zarygp34qnw3p5rcwqsvgz7zmmhi7lgh00vj2jb9zkjbldc0";
|
2010-04-29 17:55:06 +00: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 20:19:35 +00: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 17:55:06 +00:00
|
|
|
'';
|
|
|
|
|
2017-08-04 15:14:55 +00:00
|
|
|
autoreconfPhase = ''
|
|
|
|
./autogen.sh
|
2010-04-29 17:55:06 +00:00
|
|
|
'';
|
|
|
|
|
2017-08-04 15:14:55 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2010-04-29 17:55:06 +00:00
|
|
|
buildInputs = [ popt ];
|
|
|
|
|
|
|
|
meta = {
|
2013-01-15 15:46:30 +00:00
|
|
|
homepage = https://fedorahosted.org/releases/l/o/logrotate/;
|
2010-04-29 17:55:06 +00:00
|
|
|
description = "Rotates and compresses system logs";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-01-15 15:46:30 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.viric ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2010-04-29 17:55:06 +00:00
|
|
|
};
|
|
|
|
}
|