summary refs log tree commit diff
path: root/pkgs/servers/http/nginx/default.nix
blob: cdf275b585fa538f2cdec5f8aeb9dc7cccc02769 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
args :  
let 
  lib = args.lib;
  fetchurl = args.fetchurl;
  fullDepEntry = args.fullDepEntry;

  version = lib.getAttr ["version"] "0.7.47" args; 
  buildInputs = with args; [
    openssl zlib pcre libxml2 libxslt
  ];
in
rec {
  src = fetchurl {
    url = "http://sysoev.ru/nginx/nginx-${version}.tar.gz";
    sha256 = "0wcb5qmvlp2b9vfz8b897gk783bwp55kprxg4gss1i9r72jdp16a";
  };

  inherit buildInputs;
  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"
  ];

  preConfigure = fullDepEntry ''
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${args.libxml2}/include/libxml2"
  '' [];

  /* doConfigure should be specified separately */
  phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
      
  name = "nginx-" + version;
  meta = {
    description = "nginx - 'engine x' - reverse proxy and lightweight webserver";
  };
}