Merge pull request #113400 from aanderse/logrotate

logrotate: minor cleanup
This commit is contained in:
Sandro 2021-02-17 21:06:50 +01:00 committed by GitHub
commit d0dd6b13b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,27 +14,21 @@ stdenv.mkDerivation rec {
};
# Logrotate wants to access the 'mail' program; to be done.
patchPhase = ''
sed -i -e 's,[a-z/]\+gzip,${gzip}/bin/gzip,' \
-e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac
${lib.optionalString (mailutils != null) ''
sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac
''}
'';
autoreconfPhase = ''
./autogen.sh
'';
configureFlags = [
"--with-compress-command=${gzip}/bin/gzip"
"--with-uncompress-command=${gzip}/bin/gunzip"
] ++ lib.optionals (mailutils != null) [
"--with-default-mail-command=${mailutils}/bin/mail"
];
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ popt ];
meta = {
meta = with lib; {
homepage = "https://fedorahosted.org/releases/l/o/logrotate/";
description = "Rotates and compresses system logs";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.viric ];
platforms = lib.platforms.all;
license = licenses.gpl2Plus;
maintainers = [ maintainers.viric ];
platforms = platforms.all;
};
}