2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, openssl, zlib, pcre, postgresql, libxml2, libxslt,
|
2018-03-04 19:52:32 +00:00
|
|
|
gd, geoip, perl }:
|
2014-08-22 10:57:40 +01:00
|
|
|
|
2014-08-20 06:34:29 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "openresty";
|
2019-09-28 00:17:19 +01:00
|
|
|
version = "1.15.8.2";
|
2014-08-20 06:34:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://openresty.org/download/openresty-${version}.tar.gz";
|
2019-09-28 00:17:19 +01:00
|
|
|
sha256 = "05jxrb8hv758nm38jil8n63q1nhrz3d249bsrwc7maa7sn24wss3";
|
2014-08-20 06:34:29 +01:00
|
|
|
};
|
|
|
|
|
2018-03-04 19:52:32 +00:00
|
|
|
buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip postgresql ];
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
2018-03-04 19:52:32 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
2014-08-20 06:34:29 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-pcre-jit"
|
|
|
|
"--with-http_ssl_module"
|
2018-03-04 19:52:32 +00:00
|
|
|
"--with-http_v2_module"
|
2014-08-20 06:34:29 +01:00
|
|
|
"--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"
|
2018-03-04 19:52:32 +00:00
|
|
|
"--with-http_postgres_module"
|
2014-08-20 06:34:29 +01:00
|
|
|
"--with-ipv6"
|
|
|
|
];
|
|
|
|
|
2018-03-04 19:52:32 +00:00
|
|
|
enableParallelBuilding = true;
|
2014-08-20 06:34:29 +01:00
|
|
|
|
2018-03-04 19:52:32 +00:00
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty
|
|
|
|
ln -s $out/nginx/sbin/nginx $out/bin/nginx
|
2014-08-20 06:34:29 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A fast web application server built on Nginx";
|
|
|
|
homepage = http://openresty.org;
|
|
|
|
license = licenses.bsd2;
|
2018-03-04 19:52:32 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice lblasc ];
|
2014-08-20 06:34:29 +01:00
|
|
|
};
|
|
|
|
}
|