nginx: Add optional patch for syslog support.

close #1055.
This commit is contained in:
Jaka Hudoklin 2013-10-10 02:38:47 +02:00 committed by Evgeny Egorochkin
parent aeff0028bf
commit 5de7170aa5

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, expat, fullWebDAV ? false }: { stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, expat, fullWebDAV ? false, syslog ? false }:
let let
dav-ext = fetchgit { dav-ext = fetchgit {
@ -6,6 +6,12 @@ let
rev = "54cebc1f21fc13391aae692c6cce672fa7986f9d"; rev = "54cebc1f21fc13391aae692c6cce672fa7986f9d";
sha256 = "1dvpq1fg5rslnl05z8jc39sgnvh3akam9qxfl033akpczq1bh8nq"; sha256 = "1dvpq1fg5rslnl05z8jc39sgnvh3akam9qxfl033akpczq1bh8nq";
}; };
syslog-ext = fetchgit {
url = https://github.com/yaoweibin/nginx_syslog_patch.git;
rev = "165affd9741f0e30c4c8225da5e487d33832aca3";
sha256 = "14dkkafjnbapp6jnvrjg9ip46j00cr8pqc2g7374z9aj7hrvdvhs";
};
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -18,6 +24,8 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl zlib pcre libxml2 libxslt ] ++ stdenv.lib.optional fullWebDAV expat; buildInputs = [ openssl zlib pcre libxml2 libxslt ] ++ stdenv.lib.optional fullWebDAV expat;
patches = if syslog then [ "${syslog-ext}/syslog_1.4.0.patch" ] else [];
configureFlags = [ configureFlags = [
"--with-http_ssl_module" "--with-http_ssl_module"
"--with-http_xslt_module" "--with-http_xslt_module"
@ -27,7 +35,8 @@ stdenv.mkDerivation rec {
"--with-http_secure_link_module" "--with-http_secure_link_module"
# Install destination problems # Install destination problems
# "--with-http_perl_module" # "--with-http_perl_module"
] ++ stdenv.lib.optional fullWebDAV "--add-module=${dav-ext}"; ] ++ stdenv.lib.optional fullWebDAV "--add-module=${dav-ext}"
++ stdenv.lib.optional syslog "--add-module=${syslog-ext}";
preConfigure = '' preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2"