mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 21:32:23 +03:00
nginx: add lua module
This commit is contained in:
parent
032e93b9ab
commit
2559ea7138
@ -1,10 +1,11 @@
|
||||
{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, expat
|
||||
, gd, geoip
|
||||
, gd, geoip, luajit
|
||||
, rtmp ? false
|
||||
, fullWebDAV ? false
|
||||
, syslog ? false
|
||||
, moreheaders ? false
|
||||
, echo ? false }:
|
||||
, echo ? false
|
||||
, ngx_lua ? false }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
@ -44,6 +45,19 @@ let
|
||||
rev = "refs/tags/v0.53";
|
||||
sha256 = "90d4e3a49c678019f4f335bc18529aa108fcc9cfe0747ea4e2f6084a70da2868";
|
||||
};
|
||||
|
||||
develkit-ext = fetchgit {
|
||||
url = https://github.com/simpl/ngx_devel_kit.git;
|
||||
rev = "refs/tags/v0.2.19";
|
||||
sha256 = "169m6gsa5b6zh1ws8qx2k7dbswld1zmhm4dh57qka0h07gs5dqjg";
|
||||
};
|
||||
|
||||
lua-ext = fetchgit {
|
||||
url = https://github.com/openresty/lua-nginx-module.git;
|
||||
rev = "refs/tags/v0.9.11";
|
||||
sha256 = "0y7238bvb907n7fsz5sivxbhfz2xnf4f0lzwk3k3h9j20fsyvwqq";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -52,7 +66,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs =
|
||||
[ openssl zlib pcre libxml2 libxslt gd geoip
|
||||
] ++ optional fullWebDAV expat;
|
||||
] ++ optional fullWebDAV expat
|
||||
++ optional ngx_lua luajit;
|
||||
|
||||
LUAJIT_LIB = if ngx_lua then "${luajit}/lib" else "";
|
||||
LUAJIT_INC = if ngx_lua then "${luajit}/include/luajit-2.0" else "";
|
||||
|
||||
patches = if syslog then [ "${syslog-ext}/syslog-1.5.6.patch" ] else [];
|
||||
|
||||
@ -83,6 +101,7 @@ stdenv.mkDerivation rec {
|
||||
++ optional syslog "--add-module=${syslog-ext}"
|
||||
++ optional moreheaders "--add-module=${moreheaders-ext}"
|
||||
++ optional echo "--add-module=${echo-ext}"
|
||||
++ optional ngx_lua "--add-module=${develkit-ext} --add-module=${lua-ext}"
|
||||
++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio";
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user