2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
|
2021-03-20 04:20:00 +00:00
|
|
|
, aclSupport ? true, acl
|
2022-03-05 16:20:37 +00:00
|
|
|
, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "logrotate";
|
2022-01-19 23:45:15 +00:00
|
|
|
version = "3.19.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "logrotate";
|
|
|
|
repo = "logrotate";
|
|
|
|
rev = version;
|
2022-01-19 23:45:15 +00:00
|
|
|
sha256 = "sha256-YAoMRLgKPqHsXdXBigl6dPJDkZIAMYK/likhTd/LpkY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Logrotate wants to access the 'mail' program; to be done.
|
2021-02-19 19:06:45 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-compress-command=${gzip}/bin/gzip"
|
|
|
|
"--with-uncompress-command=${gzip}/bin/gunzip"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = [ popt ] ++ lib.optionals aclSupport [ acl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
passthru.tests = {
|
|
|
|
nixos-logrotate = nixosTests.logrotate;
|
|
|
|
};
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
meta = with lib; {
|
2021-10-17 02:12:59 +00:00
|
|
|
homepage = "https://github.com/logrotate/logrotate";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Rotates and compresses system logs";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.viric ];
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|