diff options
author | Richard Marko <srk@48.io> | 2018-08-05 22:19:35 +0200 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-08-05 22:19:35 +0200 |
commit | 97ca78687a2d8bd96ee121610f3044b19e88f8a7 (patch) | |
tree | a8b3921d08116c948532ccd045227d30dd10e067 | |
parent | 8dc20dce0a18b0e76e56f20ba9cc21efbc0e09ee (diff) | |
download | nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.tar nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.tar.gz nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.tar.bz2 nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.tar.lz nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.tar.xz nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.tar.zst nixlib-97ca78687a2d8bd96ee121610f3044b19e88f8a7.zip |
logrotate: make mailutils overridable (#44504)
-rw-r--r-- | pkgs/tools/system/logrotate/default.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/tools/system/logrotate/default.nix b/pkgs/tools/system/logrotate/default.nix index 75e25bcc6730..75f609684406 100644 --- a/pkgs/tools/system/logrotate/default.nix +++ b/pkgs/tools/system/logrotate/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchFromGitHub, mailutils, gzip, popt, autoreconfHook }: +{ stdenv, fetchFromGitHub, gzip, popt, autoreconfHook +, mailutils ? null +}: stdenv.mkDerivation rec { name = "logrotate-${version}"; @@ -14,8 +16,11 @@ stdenv.mkDerivation rec { # 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 + -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac + + ${stdenv.lib.optionalString (mailutils != null) '' + sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac + ''} ''; autoreconfPhase = '' |