summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-25 17:44:21 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-03 17:06:03 -0400
commit85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e (patch)
tree544a86c87280e6870fefe3005d2b9387a6b48581 /pkgs/servers/http
parent632d24f11f51cc1581e921aa0eb8c6669296e8de (diff)
downloadnixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar
nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.gz
nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.bz2
nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.lz
nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.xz
nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.tar.zst
nixlib-85a9913edd50b7ea9b4dfbaedd5d40a739b97d3e.zip
treewide: Make more complicated configureFlags lists
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix46
-rw-r--r--pkgs/servers/http/couchdb/default.nix6
2 files changed, 29 insertions, 23 deletions
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index 4822b5109e81..d7f7660bf61f 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -47,26 +47,32 @@ stdenv.mkDerivation rec {
     configureFlags="$configureFlags --includedir=$dev/include"
   '';
 
-  configureFlags = ''
-    --with-apr=${apr.dev}
-    --with-apr-util=${aprutil.dev}
-    --with-z=${zlib.dev}
-    --with-pcre=${pcre.dev}
-    --disable-maintainer-mode
-    --disable-debugger-mode
-    --enable-mods-shared=all
-    --enable-mpms-shared=all
-    --enable-cern-meta
-    --enable-imagemap
-    --enable-cgi
-    ${optionalString brotliSupport "--enable-brotli --with-brotli=${brotli}"}
-    ${optionalString proxySupport "--enable-proxy"}
-    ${optionalString sslSupport "--enable-ssl"}
-    ${optionalString http2Support "--enable-http2 --with-nghttp2"}
-    ${optionalString luaSupport "--enable-lua --with-lua=${lua5}"}
-    ${optionalString libxml2Support "--with-libxml2=${libxml2.dev}/include/libxml2"}
-    --docdir=$(doc)/share/doc
-  '';
+  configureFlags = [
+    "--with-apr=${apr.dev}"
+    "--with-apr-util=${aprutil.dev}"
+    "--with-z=${zlib.dev}"
+    "--with-pcre=${pcre.dev}"
+    "--disable-maintainer-mode"
+    "--disable-debugger-mode"
+    "--enable-mods-shared=all"
+    "--enable-mpms-shared=all"
+    "--enable-cern-meta"
+    "--enable-imagemap"
+    "--enable-cgi"
+    (stdenv.lib.enableFeature proxySupport "proxy")
+    (stdenv.lib.enableFeature sslSupport "ssl")
+    (stdenv.lib.withFeatureAs libxml2Support "libxml2" "${libxml2.dev}/include/libxml2")
+    "--docdir=$(doc)/share/doc"
+
+    (stdenv.lib.enableFeature brotliSupport "brotli")
+    (stdenv.lib.withFeatureAs brotliSupport "brotli" brotli)
+
+    (stdenv.lib.enableFeature http2Support "http2")
+    (stdenv.lib.withFeature http2Support "nghttp2")
+
+    (stdenv.lib.enableFeature luaSupport "lua")
+    (stdenv.lib.withFeatureAs luaSupport "lua" lua5)
+  ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/servers/http/couchdb/default.nix b/pkgs/servers/http/couchdb/default.nix
index 5a873c7e84b1..5239c027b8fa 100644
--- a/pkgs/servers/http/couchdb/default.nix
+++ b/pkgs/servers/http/couchdb/default.nix
@@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
 
   If you wish to ignore this error pass --enable-js-trunk to ./configure.
   */
-  configureFlags = ''
-    --enable-js-trunk
-  '';
+  configureFlags = [
+    "--enable-js-trunk"
+  ];
 
   meta = with stdenv.lib; {
     description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";