btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / lo / logrotate / package.nix
blobd25f0dd7168b6b8fa5bd25091a1647164a3b832f
1 { lib, stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
2 , aclSupport ? true, acl
3 , nixosTests
4 }:
6 stdenv.mkDerivation rec {
7   pname = "logrotate";
8   version = "3.22.0";
10   src = fetchFromGitHub {
11     owner = "logrotate";
12     repo = "logrotate";
13     rev = version;
14     sha256 = "sha256-D7E2mpC7v2kbsb1EyhR6hLvGbnIvGB2MK1n1gptYyKI=";
15   };
17   # Logrotate wants to access the 'mail' program; to be done.
18   configureFlags = [
19     "--with-compress-command=${gzip}/bin/gzip"
20     "--with-uncompress-command=${gzip}/bin/gunzip"
21   ];
23   nativeBuildInputs = [ autoreconfHook ];
24   buildInputs = [ popt ] ++ lib.optionals aclSupport [ acl ];
26   passthru.tests = {
27     nixos-logrotate = nixosTests.logrotate;
28   };
30   meta = with lib; {
31     homepage = "https://github.com/logrotate/logrotate";
32     description = "Rotates and compresses system logs";
33     license = licenses.gpl2Plus;
34     maintainers = [ maintainers.tobim ];
35     platforms = platforms.all;
36     mainProgram = "logrotate";
37   };