about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/logrotate/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/system/logrotate/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/system/logrotate/default.nix33
1 files changed, 14 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/tools/system/logrotate/default.nix b/nixpkgs/pkgs/tools/system/logrotate/default.nix
index 513b48c66304..b764202a58a6 100644
--- a/nixpkgs/pkgs/tools/system/logrotate/default.nix
+++ b/nixpkgs/pkgs/tools/system/logrotate/default.nix
@@ -1,40 +1,35 @@
 { lib, stdenv, fetchFromGitHub, gzip, popt, autoreconfHook
 , mailutils ? null
+, aclSupport ? true, acl
 }:
 
 stdenv.mkDerivation rec {
   pname = "logrotate";
-  version = "3.17.0";
+  version = "3.18.0";
 
   src = fetchFromGitHub {
     owner = "logrotate";
     repo = "logrotate";
     rev = version;
-    sha256 = "133k4y24p918v4dva6dh70bdfv13jvwl2vlhq0mybrs3ripvnh4h";
+    sha256 = "sha256-OFGXwaTabyuIgeC2ON68m83rzVxomk8QL6xwyrVV654=";
   };
 
   # Logrotate wants to access the 'mail' program; to be done.
-  patchPhase = ''
-    sed -i -e 's,[a-z/]\+gzip,${gzip}/bin/gzip,' \
-           -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac
-
-    ${lib.optionalString (mailutils != null) ''
-    sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac
-    ''}
-  '';
-
-  autoreconfPhase = ''
-    ./autogen.sh
-  '';
+  configureFlags = [
+    "--with-compress-command=${gzip}/bin/gzip"
+    "--with-uncompress-command=${gzip}/bin/gunzip"
+  ] ++ lib.optionals (mailutils != null) [
+    "--with-default-mail-command=${mailutils}/bin/mail"
+  ];
 
   nativeBuildInputs = [ autoreconfHook ];
-  buildInputs = [ popt ];
+  buildInputs = [ popt ] ++ lib.optionals aclSupport [ acl ];
 
-  meta = {
+  meta = with lib; {
     homepage = "https://fedorahosted.org/releases/l/o/logrotate/";
     description = "Rotates and compresses system logs";
-    license = lib.licenses.gpl2Plus;
-    maintainers = [ lib.maintainers.viric ];
-    platforms = lib.platforms.all;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.viric ];
+    platforms = platforms.all;
   };
 }