nixpkgs/pkgs/tools/system/logrotate/default.nix
Ryan Mulligan 30116ccd2a logrotate: 3.13.0 -> 3.14.0
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/4y9bpdd23v1jpibrqzpnc4y4qipmz06y-logrotate-3.14.0/bin/logrotate --help` got 0 exit code
- found 3.14.0 in filename of file in /nix/store/4y9bpdd23v1jpibrqzpnc4y4qipmz06y-logrotate-3.14.0
2018-03-14 20:40:12 -07:00

36 lines
973 B
Nix

{ stdenv, fetchFromGitHub, mailutils, gzip, popt, autoreconfHook }:
stdenv.mkDerivation rec {
name = "logrotate-${version}";
version = "3.14.0";
src = fetchFromGitHub {
owner = "logrotate";
repo = "logrotate";
rev = version;
sha256 = "1wdjqbly97y1i11nl6cmlfpld3yqak270ixf29wixjgrjn8p4xzh";
};
# 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;
};
}