about summary refs log tree commit diff
path: root/pkgs/servers/http/apache-httpd/2.4.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/apache-httpd/2.4.nix')
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix27
1 files changed, 21 insertions, 6 deletions
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index ddb1ec443a06..9b2d86715bf7 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -22,14 +22,26 @@ 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 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}
@@ -43,18 +55,21 @@ stdenv.mkDerivation rec {
     --enable-imagemap
     --enable-cgi
     ${optionalString proxySupport "--enable-proxy"}
-    ${optionalString sslSupport "--enable-ssl --with-ssl=${openssl}"}
+    ${optionalString sslSupport "--enable-ssl"}
     ${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;
   };