2013-05-05 23:19:03 +04:00
|
|
|
{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, expat, fullWebDAV ? false }:
|
2012-10-09 22:20:44 +04:00
|
|
|
|
2013-05-05 23:48:07 +04:00
|
|
|
let
|
|
|
|
dav-ext = fetchgit {
|
|
|
|
url = git://github.com/arut/nginx-dav-ext-module.git;
|
|
|
|
rev = "54cebc1f21fc13391aae692c6cce672fa7986f9d";
|
|
|
|
sha256 = "1dvpq1fg5rslnl05z8jc39sgnvh3akam9qxfl033akpczq1bh8nq";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2011-10-31 22:26:20 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2013-07-11 10:23:35 +04:00
|
|
|
name = "nginx-${meta.version}";
|
2012-10-09 22:20:44 +04:00
|
|
|
|
2011-10-31 22:26:20 +04:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://nginx.org/download/${name}.tar.gz";
|
2013-10-18 01:36:21 +04:00
|
|
|
sha256 = "116yfy0k65mwxdkld0w7c3gly77jdqlvga5hpbsw79i3r62kh4mf";
|
2011-10-31 22:26:20 +04:00
|
|
|
};
|
2012-10-09 22:20:44 +04:00
|
|
|
|
2013-05-05 23:19:03 +04:00
|
|
|
buildInputs = [ openssl zlib pcre libxml2 libxslt ] ++ stdenv.lib.optional fullWebDAV expat;
|
2008-11-30 12:06:53 +03:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-http_ssl_module"
|
|
|
|
"--with-http_xslt_module"
|
|
|
|
"--with-http_sub_module"
|
|
|
|
"--with-http_dav_module"
|
|
|
|
"--with-http_gzip_static_module"
|
|
|
|
"--with-http_secure_link_module"
|
2010-04-09 15:26:54 +04:00
|
|
|
# Install destination problems
|
2012-10-09 22:20:44 +04:00
|
|
|
# "--with-http_perl_module"
|
2013-05-05 23:19:03 +04:00
|
|
|
] ++ stdenv.lib.optional fullWebDAV "--add-module=${dav-ext}";
|
2008-11-30 12:06:53 +03:00
|
|
|
|
2011-10-31 22:26:20 +04:00
|
|
|
preConfigure = ''
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2"
|
|
|
|
'';
|
2008-11-30 12:06:53 +03:00
|
|
|
|
2012-02-20 01:36:34 +04:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/sbin $out/bin
|
|
|
|
'';
|
|
|
|
|
2008-11-30 12:06:53 +03:00
|
|
|
meta = {
|
2012-10-09 22:20:44 +04:00
|
|
|
description = "A reverse proxy and lightweight webserver";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2013-10-18 01:36:21 +04:00
|
|
|
version = "1.4.3";
|
2008-11-30 12:06:53 +03:00
|
|
|
};
|
|
|
|
}
|