2014-08-20 05:34:29 +00:00
|
|
|
{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, gd, geoip
|
|
|
|
, perl }:
|
|
|
|
|
2014-08-22 09:57:40 +00:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-08-20 05:34:29 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openresty-${version}";
|
2015-08-31 08:18:13 +00:00
|
|
|
version = "1.9.3.1";
|
2014-08-20 05:34:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://openresty.org/download/ngx_openresty-${version}.tar.gz";
|
2015-08-31 08:18:13 +00:00
|
|
|
sha256 = "1fw8yxjndf5gsk44l4bsixm270fxv7f5cdiwzq9ps6j3hhgx5kyv";
|
2014-08-20 05:34:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-pcre-jit"
|
|
|
|
"--with-http_ssl_module"
|
|
|
|
"--with-http_spdy_module"
|
|
|
|
"--with-http_realip_module"
|
|
|
|
"--with-http_addition_module"
|
|
|
|
"--with-http_xslt_module"
|
|
|
|
"--with-http_image_filter_module"
|
|
|
|
"--with-http_geoip_module"
|
|
|
|
"--with-http_sub_module"
|
|
|
|
"--with-http_dav_module"
|
|
|
|
"--with-http_flv_module"
|
|
|
|
"--with-http_mp4_module"
|
|
|
|
"--with-http_gunzip_module"
|
|
|
|
"--with-http_gzip_static_module"
|
|
|
|
"--with-http_auth_request_module"
|
|
|
|
"--with-http_random_index_module"
|
|
|
|
"--with-http_secure_link_module"
|
|
|
|
"--with-http_degradation_module"
|
|
|
|
"--with-http_stub_status_module"
|
|
|
|
"--with-ipv6"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2015-04-12 16:16:16 +00:00
|
|
|
mv $out/nginx/sbin/nginx $out/bin
|
2014-08-20 05:34:29 +00:00
|
|
|
mv $out/luajit/bin/luajit-2.1.0-alpha $out/bin/luajit-openresty
|
2015-04-12 16:16:16 +00:00
|
|
|
ln -s $out/bin/nginx $out/bin/openresty
|
2014-08-20 05:34:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
2015-10-05 11:23:01 +00:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags"
|
2015-04-26 17:54:51 +00:00
|
|
|
export PATH="$PATH:${stdenv.cc.libc.bin}/bin"
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs .
|
2014-08-20 05:34:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A fast web application server built on Nginx";
|
|
|
|
homepage = http://openresty.org;
|
|
|
|
license = licenses.bsd2;
|
2014-08-22 09:57:40 +00:00
|
|
|
platforms = platforms.linux;
|
2014-08-20 05:34:29 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|