summary refs log tree commit diff
path: root/pkgs/servers/http/openresty/default.nix
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2014-08-20 00:34:29 -0500
committerAustin Seipp <aseipp@pobox.com>2014-08-20 00:38:49 -0500
commit47c443bede78fe4571e802d414241b34e873cccb (patch)
tree016d2804fb23427b592fa0ad813510ce9900b9ad /pkgs/servers/http/openresty/default.nix
parent2015aecd44919666377af1f15a36b402624e7f76 (diff)
downloadnixpkgs-47c443bede78fe4571e802d414241b34e873cccb.tar
nixpkgs-47c443bede78fe4571e802d414241b34e873cccb.tar.gz
nixpkgs-47c443bede78fe4571e802d414241b34e873cccb.tar.bz2
nixpkgs-47c443bede78fe4571e802d414241b34e873cccb.tar.lz
nixpkgs-47c443bede78fe4571e802d414241b34e873cccb.tar.xz
nixpkgs-47c443bede78fe4571e802d414241b34e873cccb.tar.zst
nixpkgs-47c443bede78fe4571e802d414241b34e873cccb.zip
nixpkgs: openresty 1.7.4.1rc1
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/servers/http/openresty/default.nix')
-rw-r--r--pkgs/servers/http/openresty/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix
new file mode 100644
index 00000000000..f95272b7e8a
--- /dev/null
+++ b/pkgs/servers/http/openresty/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, gd, geoip
+, perl }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "openresty-${version}";
+  version = "1.7.4.1rc1";
+
+  src = fetchurl {
+    url = "http://openresty.org/download/ngx_openresty-${version}.tar.gz";
+    sha256 = "1j976kmbdv07j3n7bwkpdrjs8hlm13mzzdmfbsfwyxpnk034v0j1";
+  };
+
+  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
+    ln -s $out/bin/nginx $out/bin/openresty
+    mv $out/luajit/bin/luajit-2.1.0-alpha $out/bin/luajit-openresty
+  '';
+
+  preConfigure = ''
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags"
+    export PATH="$PATH:${stdenv.gcc.libc}/sbin"
+  '';
+
+  meta = {
+    description = "A fast web application server built on Nginx";
+    homepage    = http://openresty.org;
+    license     = licenses.bsd2;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}