2021-01-15 10:19:50 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
|
2021-03-22 20:57:57 +01:00
|
|
|
, aclSupport ? true, acl
|
2022-02-11 09:49:52 +01:00
|
|
|
, nixosTests
|
2018-08-05 22:19:35 +02:00
|
|
|
}:
|
2010-04-29 19:55:06 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "logrotate";
|
2022-12-17 19:05:42 +01:00
|
|
|
version = "3.21.0";
|
2010-04-29 19:55:06 +02:00
|
|
|
|
2017-08-04 17:14:55 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "logrotate";
|
|
|
|
repo = "logrotate";
|
|
|
|
rev = version;
|
2022-12-17 19:05:42 +01:00
|
|
|
sha256 = "sha256-w86y6bz/nvH/0mIbn2XrSs5KdOM/xadnlZMQZp4LdGQ=";
|
2010-04-29 19:55:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Logrotate wants to access the 'mail' program; to be done.
|
2021-02-17 14:16:22 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-compress-command=${gzip}/bin/gzip"
|
|
|
|
"--with-uncompress-command=${gzip}/bin/gunzip"
|
|
|
|
];
|
2010-04-29 19:55:06 +02:00
|
|
|
|
2017-08-04 17:14:55 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2021-03-22 20:57:57 +01:00
|
|
|
buildInputs = [ popt ] ++ lib.optionals aclSupport [ acl ];
|
2010-04-29 19:55:06 +02:00
|
|
|
|
2022-02-11 09:49:52 +01:00
|
|
|
passthru.tests = {
|
|
|
|
nixos-logrotate = nixosTests.logrotate;
|
|
|
|
};
|
|
|
|
|
2021-02-17 14:16:22 +01:00
|
|
|
meta = with lib; {
|
2021-10-15 05:11:42 +02:00
|
|
|
homepage = "https://github.com/logrotate/logrotate";
|
2010-04-29 19:55:06 +02:00
|
|
|
description = "Rotates and compresses system logs";
|
2021-02-17 14:16:22 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.viric ];
|
|
|
|
platforms = platforms.all;
|
2023-11-27 02:17:53 +01:00
|
|
|
mainProgram = "logrotate";
|
2010-04-29 19:55:06 +02:00
|
|
|
};
|
|
|
|
}
|