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