2014-08-20 07:34:29 +02:00
|
|
|
{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, gd, geoip
|
|
|
|
, perl }:
|
|
|
|
|
2014-08-22 11:57:40 +02:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-08-20 07:34:29 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openresty-${version}";
|
2014-09-20 14:58:39 +02:00
|
|
|
version = "1.7.4.1rc2";
|
2014-08-20 07:34:29 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://openresty.org/download/ngx_openresty-${version}.tar.gz";
|
2014-09-20 14:58:39 +02:00
|
|
|
sha256 = "1208snm0g1x2p9ybl8br7mmcl5c4g4xzhm80n5jfjprr85gb7ajx";
|
2014-08-20 07:34:29 +02: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 = ''
|
|
|
|
mv $out/nginx/sbin $out/bin
|
2014-09-20 14:58:39 +02:00
|
|
|
mv $out/bin/sbin $out/sbin
|
|
|
|
|
2014-08-20 07:34:29 +02:00
|
|
|
mv $out/luajit/bin/luajit-2.1.0-alpha $out/bin/luajit-openresty
|
2014-09-20 14:58:39 +02:00
|
|
|
ln -s $out/sbin/nginx $out/sbin/openresty
|
|
|
|
ln -s $out/sbin/nginx $out/bin/openresty
|
|
|
|
ln -s $out/sbin/nginx $out/bin/nginx
|
2014-08-20 07:34:29 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags"
|
|
|
|
export PATH="$PATH:${stdenv.gcc.libc}/sbin"
|
2014-08-21 06:42:00 +02:00
|
|
|
patchShebangs .
|
2014-08-20 07:34:29 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A fast web application server built on Nginx";
|
|
|
|
homepage = http://openresty.org;
|
|
|
|
license = licenses.bsd2;
|
2014-08-22 11:57:40 +02:00
|
|
|
platforms = platforms.linux;
|
2014-08-20 07:34:29 +02:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|