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