nixpkgs/pkgs/tools/system/logrotate/default.nix
Ryan Mulligan 775ea39f9f logrotate: 3.12.3 -> 3.13.0
Semi-automatic update. These checks were performed:

- built on NixOS
- ran `/nix/store/qjpxc2hbnx8klaj6zxq9zxp29b4afqm1-logrotate-3.13.0/bin/logrotate --help` got 0 exit code
- found 3.13.0 in filename of file in /nix/store/qjpxc2hbnx8klaj6zxq9zxp29b4afqm1-logrotate-3.13.0

cc "@viric"
2018-02-26 21:55:40 -08:00

36 lines
973 B
Nix

{ stdenv, fetchFromGitHub, mailutils, gzip, popt, autoreconfHook }:
stdenv.mkDerivation rec {
name = "logrotate-${version}";
version = "3.13.0";
src = fetchFromGitHub {
owner = "logrotate";
repo = "logrotate";
rev = version;
sha256 = "0b7dnch74pddml3ysavizq26jgwdv0rjmwc8lf6zfvn9fjz19vvs";
};
# 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,' \
-e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac
'';
autoreconfPhase = ''
./autogen.sh
'';
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ popt ];
meta = {
homepage = https://fedorahosted.org/releases/l/o/logrotate/;
description = "Rotates and compresses system logs";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.viric ];
platforms = stdenv.lib.platforms.all;
};
}