about summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-04-18 13:00:40 +0000
committerRobin Gloster <mail@glob.in>2016-04-18 13:49:22 +0000
commitd020caa5b2eca90ea051403fbb4c52b99ee071b9 (patch)
treeba44ef1e784bca89e0df6b249956fd035b1d86e3 /pkgs/servers/http
parent3e68106afd95df012ddb548575f0133681687a90 (diff)
parent0729f606973870c03d21bb2f21b70d91216943ca (diff)
downloadnixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar
nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.gz
nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.bz2
nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.lz
nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.xz
nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.zst
nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.zip
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/apache-httpd/2.2.nix30
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix27
-rw-r--r--pkgs/servers/http/apache-modules/mod_fastcgi/default.nix2
-rw-r--r--pkgs/servers/http/nginx/default.nix2
-rw-r--r--pkgs/servers/http/nginx/unstable.nix6
-rw-r--r--pkgs/servers/http/nix-binary-cache/default.nix12
-rw-r--r--pkgs/servers/http/openresty/default.nix4
-rw-r--r--pkgs/servers/http/thttpd/default.nix4
8 files changed, 57 insertions, 30 deletions
diff --git a/pkgs/servers/http/apache-httpd/2.2.nix b/pkgs/servers/http/apache-httpd/2.2.nix
index 99d6fe12aa1c..bb4fa9782d6a 100644
--- a/pkgs/servers/http/apache-httpd/2.2.nix
+++ b/pkgs/servers/http/apache-httpd/2.2.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, openssl, perl, zlib
+{ stdenv, fetchurl, pkgconfig, openssl, perl, zlib
 , sslSupport, proxySupport ? true
 , apr, aprutil, pcre
 , ldapSupport ? true, openldap
@@ -20,17 +20,24 @@ stdenv.mkDerivation rec {
     sha256 = "1b165zi7jrrlz5wmyy3b34lcs3dl4g0dymfb0qxwdnimylcrsbzk";
   };
 
-  buildInputs = [perl apr aprutil pcre] ++
-    stdenv.lib.optional sslSupport openssl;
+  # FIXME: -dev depends on -doc
+  outputs = [ "dev" "out" "doc" ];
+  setOutputFlags = false; # it would move $out/modules, etc.
 
-  # An apr-util header file includes an apr header file
-  # through #include "" (quotes)
-  # passing simply CFLAGS did not help, then I go by NIX_CFLAGS_COMPILE
-  NIX_CFLAGS_COMPILE = "-iquote ${apr}/include/apr-1";
+  propagatedBuildInputs = [ apr ]; # otherwise mod_* fail to find includes often
+  buildInputs = [ pkgconfig perl aprutil pcre zlib ] ++
+    stdenv.lib.optional sslSupport openssl;
 
   # Required for ‘pthread_cancel’.
   NIX_LDFLAGS = (if stdenv.isDarwin then "" else "-lgcc_s");
 
+  patchPhase = ''
+    sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
+  '';
+
+  preConfigure = ''
+    configureFlags="$configureFlags --includedir=$dev/include"
+  '';
   configureFlags = ''
     --with-z=${zlib}
     --with-pcre=${pcre}
@@ -44,13 +51,18 @@ stdenv.mkDerivation rec {
     --enable-disk-cache
     --enable-file-cache
     --enable-mem-cache
+    --docdir=$(doc)/share/doc
   '';
 
   enableParallelBuilding = true;
 
+  stripDebugList = "lib modules bin";
+
   postInstall = ''
-    echo "removing manual"
-    rm -rf $out/manual
+    mkdir -p $doc/share/doc/httpd
+    mv $out/manual $doc/share/doc/httpd
+    mkdir -p $dev/bin
+    mv $out/bin/apxs $dev/bin/apxs
   '';
 
   passthru = {
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index a2e039bd399f..a39d0e8e3158 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -24,15 +24,27 @@ stdenv.mkDerivation rec {
     sha256 = "0k7xm6ldzvakzq39nw6b39190ihlkc28all2gkvckxa1vr8b0i06";
   };
 
+  # FIXME: -dev depends on -doc
+  outputs = [ "dev" "out" "doc" ];
+  setOutputFlags = false; # it would move $out/modules, etc.
+
   buildInputs = [perl] ++
+    optional sslSupport openssl ++
     optional ldapSupport openldap ++    # there is no --with-ldap flag
     optional libxml2Support libxml2 ++
     optional http2Support libnghttp2 ++
     optional stdenv.isDarwin libiconv;
 
+  patchPhase = ''
+    sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
+  '';
+
   # Required for ‘pthread_cancel’.
   NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
 
+  preConfigure = ''
+    configureFlags="$configureFlags --includedir=$dev/include"
+  '';
   configureFlags = ''
     --with-apr=${apr}
     --with-apr-util=${aprutil}
@@ -46,19 +58,22 @@ stdenv.mkDerivation rec {
     --enable-imagemap
     --enable-cgi
     ${optionalString proxySupport "--enable-proxy"}
-    ${optionalString sslSupport "--enable-ssl --with-ssl=${openssl}"}
+    ${optionalString sslSupport "--enable-ssl"}
     ${optionalString http2Support "--enable-http2 --with-nghttp2=${libnghttp2}"}
     ${optionalString luaSupport "--enable-lua --with-lua=${lua5}"}
-    ${optionalString libxml2Support "--with-libxml2=${libxml2}/include/libxml2"}
+    ${optionalString libxml2Support "--with-libxml2=${libxml2.dev}/include/libxml2"}
+    --docdir=$(doc)/share/doc
   '';
 
+  enableParallelBuilding = true;
+
   postInstall = ''
-    echo "removing manual"
-    rm -rf $out/manual
+    mkdir -p $doc/share/doc/httpd
+    mv $out/manual $doc/share/doc/httpd
+    mkdir -p $dev/bin
+    mv $out/bin/apxs $dev/bin/apxs
   '';
 
-  enableParallelBuilding = true;
-
   passthru = {
     inherit apr aprutil sslSupport proxySupport ldapSupport;
   };
diff --git a/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix b/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix
index e70c3105408f..178900570d07 100644
--- a/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix
+++ b/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   preBuild = ''
     cp Makefile.AP2 Makefile
-    makeFlags="top_dir=${apacheHttpd} prefix=$out"
+    makeFlags="top_dir=${apacheHttpd}/share prefix=$out"
   '';
 
   meta = {
diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix
index 22ce5e754458..ed13ae0bea7f 100644
--- a/pkgs/servers/http/nginx/default.nix
+++ b/pkgs/servers/http/nginx/default.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
         [ "--with-file-aio" "--with-aio_module" ]
     ++ map (mod: "--add-module=${mod.src}") modules;
 
-  NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
+  NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
 
   preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
 
diff --git a/pkgs/servers/http/nginx/unstable.nix b/pkgs/servers/http/nginx/unstable.nix
index 5adfb55cb2fd..05cc58e41487 100644
--- a/pkgs/servers/http/nginx/unstable.nix
+++ b/pkgs/servers/http/nginx/unstable.nix
@@ -8,10 +8,10 @@
 with stdenv.lib;
 
 let
-  version = "1.9.11";
+  version = "1.9.14";
   mainSrc = fetchurl {
     url = "http://nginx.org/download/nginx-${version}.tar.gz";
-    sha256 = "07x5d2ryf547xrj4wp8w90kz2d93sxjhkfjb0vdscmxgmzs74p3a";
+    sha256 = "1ljpyigqb6sbm4f8mi4fyvwfcvfapzg4z35s9cwb9ri8dl3r6j1b";
   };
 
 in
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
     ++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio"
     ++ map (mod: "--add-module=${mod.src}") modules;
 
-  NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
+  NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
 
   preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
 
diff --git a/pkgs/servers/http/nix-binary-cache/default.nix b/pkgs/servers/http/nix-binary-cache/default.nix
index b007c09b0560..674557d74fc2 100644
--- a/pkgs/servers/http/nix-binary-cache/default.nix
+++ b/pkgs/servers/http/nix-binary-cache/default.nix
@@ -15,11 +15,11 @@ stdenv.mkDerivation rec {
       --replace @coreutils@ "${coreutils}/bin" \
       --replace @findutils@ "${findutils}/bin" \
       --replace @nix@ "${nix}/bin" \
-      --replace @xz@ "${xz}/bin" \
-      --replace @bzip2@ "${bzip2}/bin" \
+      --replace @xz@ "${xz.bin}/bin" \
+      --replace @bzip2@ "${bzip2.bin}/bin" \
       --replace @gnused@ "${gnused}/bin" \
       --replace @gnugrep@ "${gnugrep}/bin" \
-      --replace @openssl@ "${openssl}/bin" \
+      --replace @openssl@ "${openssl.bin}/bin" \
       --replace @lighttpd@ "${lighttpd}/sbin" \
       --replace @iproute@ "${iproute}/sbin" \
       --replace "xXxXx" "xXxXx"
@@ -32,11 +32,11 @@ stdenv.mkDerivation rec {
       --replace @coreutils@ "${coreutils}/bin" \
       --replace @findutils@ "${findutils}/bin" \
       --replace @nix@ "${nix}/bin" \
-      --replace @xz@ "${xz}/bin" \
-      --replace @bzip2@ "${bzip2}/bin" \
+      --replace @xz@ "${xz.bin}/bin" \
+      --replace @bzip2@ "${bzip2.bin}/bin" \
       --replace @gnused@ "${gnused}/bin" \
       --replace @gnugrep@ "${gnugrep}/bin" \
-      --replace @openssl@ "${openssl}/bin" \
+      --replace @openssl@ "${openssl.bin}/bin" \
       --replace @lighttpd@ "${lighttpd}/sbin" \
       --replace @iproute@ "${iproute}/sbin" \
       --replace "xXxXx" "xXxXx"
diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix
index 14f95761cfb1..147e24c014d2 100644
--- a/pkgs/servers/http/openresty/default.nix
+++ b/pkgs/servers/http/openresty/default.nix
@@ -46,8 +46,8 @@ stdenv.mkDerivation rec {
   '';
 
   preConfigure = ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2 $additionalFlags"
-    export PATH="$PATH:${stdenv.cc.libc}/sbin"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags"
+    export PATH="$PATH:${stdenv.cc.libc.bin}/bin"
     patchShebangs .
   '';
 
diff --git a/pkgs/servers/http/thttpd/default.nix b/pkgs/servers/http/thttpd/default.nix
index 706911aeef15..030aa486daa7 100644
--- a/pkgs/servers/http/thttpd/default.nix
+++ b/pkgs/servers/http/thttpd/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "thttpd-${version}";
-  version = "2.26";
+  version = "2.27";
 
   src = fetchurl {
     url = "http://acme.com/software/thttpd/${name}.tar.gz";
-    sha256 = "1idlpnwrd5fpmnfh477h1lzanavx8jxir2d8adax46zy472dg4s6";
+    sha256 = "0ykda5k1zzzag59zbd4bkzj1psavq0xnpy7vpk19rhx7mlvvri5i";
   };
 
   prePatch = ''