about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/audio/puredata/default.nix13
-rw-r--r--pkgs/applications/editors/nano/default.nix10
-rw-r--r--pkgs/applications/misc/lilyterm/default.nix8
-rw-r--r--pkgs/applications/science/chemistry/octopus/default.nix16
-rw-r--r--pkgs/applications/version-management/subversion/default.nix24
-rw-r--r--pkgs/desktops/gnome-2/desktop/vte/default.nix6
-rw-r--r--pkgs/development/interpreters/scsh/default.nix2
-rw-r--r--pkgs/development/libraries/classads/default.nix6
-rw-r--r--pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix10
-rw-r--r--pkgs/development/libraries/ilixi/default.nix9
-rw-r--r--pkgs/development/libraries/libinfinity/default.nix17
-rw-r--r--pkgs/development/libraries/neon/0.29.nix13
-rw-r--r--pkgs/development/libraries/neon/default.nix13
-rw-r--r--pkgs/development/libraries/tix/default.nix14
-rw-r--r--pkgs/development/tools/misc/dialog/default.nix19
-rw-r--r--pkgs/misc/jackaudio/jack1.nix6
-rw-r--r--pkgs/os-specific/linux/alsa-firmware/default.nix6
-rw-r--r--pkgs/os-specific/linux/ipsec-tools/default.nix26
-rw-r--r--pkgs/os-specific/linux/iptables/default.nix8
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix46
-rw-r--r--pkgs/servers/http/couchdb/default.nix6
-rw-r--r--pkgs/servers/shairport-sync/default.nix10
-rw-r--r--pkgs/tools/misc/urjtag/default.nix12
-rw-r--r--pkgs/tools/networking/p2p/amule/default.nix23
-rw-r--r--pkgs/tools/networking/vtun/default.nix9
-rw-r--r--pkgs/tools/security/fwknop/default.nix29
-rw-r--r--pkgs/tools/security/modsecurity/default.nix22
27 files changed, 193 insertions, 190 deletions
diff --git a/pkgs/applications/audio/puredata/default.nix b/pkgs/applications/audio/puredata/default.nix
index 73f50e45d3df..6aca7e9ce226 100644
--- a/pkgs/applications/audio/puredata/default.nix
+++ b/pkgs/applications/audio/puredata/default.nix
@@ -15,13 +15,12 @@ stdenv.mkDerivation  rec {
 
   buildInputs = [ alsaLib libjack2 fftw ];
 
-  configureFlags = ''
-    --enable-alsa
-    --enable-jack
-    --enable-fftw
-    --disable-portaudio
-
-  '';
+  configureFlags = [
+    "--enable-alsa"
+    "--enable-jack"
+    "--enable-fftw"
+    "--disable-portaudio"
+  ];
 
   # https://github.com/pure-data/pure-data/issues/188
   # --disable-oss
diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix
index 96a9cea09c76..86134687ba31 100644
--- a/pkgs/applications/editors/nano/default.nix
+++ b/pkgs/applications/editors/nano/default.nix
@@ -32,11 +32,11 @@ in stdenv.mkDerivation rec {
 
   outputs = [ "out" "info" ];
 
-  configureFlags = ''
-    --sysconfdir=/etc
-    ${optionalString (!enableNls) "--disable-nls"}
-    ${optionalString enableTiny "--enable-tiny"}
-  '';
+  configureFlags = [
+    "--sysconfdir=/etc"
+    (stdenv.lib.enableFeature enableNls "nls")
+    (stdenv.lib.enableFeature enableTiny "tiny")
+  ];
 
   postInstall = ''
     cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/
diff --git a/pkgs/applications/misc/lilyterm/default.nix b/pkgs/applications/misc/lilyterm/default.nix
index 662ca9761fb2..72cb1e85802a 100644
--- a/pkgs/applications/misc/lilyterm/default.nix
+++ b/pkgs/applications/misc/lilyterm/default.nix
@@ -40,10 +40,10 @@ stdenv.mkDerivation rec {
 
   preConfigure = "sh autogen.sh";
 
-  configureFlags = ''
-    --enable-nls
-    --enable-safe-mode
-  '';
+  configureFlags = [
+    "--enable-nls"
+    "--enable-safe-mode"
+  ];
 
   meta = with stdenv.lib; {
     description = "A fast, lightweight terminal emulator";
diff --git a/pkgs/applications/science/chemistry/octopus/default.nix b/pkgs/applications/science/chemistry/octopus/default.nix
index 0d8ab0d0e191..0ff8aa94c88f 100644
--- a/pkgs/applications/science/chemistry/octopus/default.nix
+++ b/pkgs/applications/science/chemistry/octopus/default.nix
@@ -17,14 +17,14 @@ in stdenv.mkDerivation {
   nativeBuildInputs = [ perl procps fftw.dev ];
   buildInputs = [ libyaml gfortran libxc openblas gsl fftw.out netcdf arpack ];
 
-  configureFlags = ''
-    --with-yaml-prefix=${libyaml}
-    --with-blas=-lopenblas
-    --with-lapack=-lopenblas
-    --with-fftw-prefix=${fftwAll}
-    --with-gsl-prefix=${gsl}
-    --with-libxc-prefix=${libxc}
-  '';
+  configureFlags = [
+    "--with-yaml-prefix=${libyaml}"
+    "--with-blas=-lopenblas"
+    "--with-lapack=-lopenblas"
+    "--with-fftw-prefix=${fftwAll}"
+    "--with-gsl-prefix=${gsl}"
+    "--with-libxc-prefix=${libxc}"
+  ];
 
   doCheck = false;
   checkTarget = "check-short";
diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix
index fc98b398213c..f5bdb0ae62a0 100644
--- a/pkgs/applications/version-management/subversion/default.nix
+++ b/pkgs/applications/version-management/subversion/default.nix
@@ -42,17 +42,19 @@ let
     # https://gcc.gnu.org/gcc-5/porting_to.html
     CPPFLAGS = "-P";
 
-    configureFlags = ''
-      ${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
-      ${if httpServer then "--with-apxs=${apacheHttpd.dev}/bin/apxs" else "--without-apxs"}
-      ${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
-      ${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
-      --disable-keychain
-      ${if saslSupport then "--with-sasl=${sasl}" else "--without-sasl"}
-      ${if httpSupport then "--with-serf=${serf}" else "--without-serf"}
-      --with-zlib=${zlib.dev}
-      --with-sqlite=${sqlite.dev}
-    '';
+    configureFlags = [
+      (stdenv.lib.withFeature bdbSupport "berkeley-db")
+      (stdenv.lib.withFeatureAs httpServer "apxs" "${apacheHttpd.dev}/bin/apxs")
+      (stdenv.lib.withFeatureAs (pythonBindings || perlBindings) "swig" swig)
+      (stdenv.lib.withFeatureAs saslSupport "sasl" sasl)
+      (stdenv.lib.withFeatureAs httpSupport "serf" serf)
+      "--disable-keychain"
+      "--with-zlib=${zlib.dev}"
+      "--with-sqlite=${sqlite.dev}"
+    ] ++ stdenv.lib.optionals javahlBindings [
+      "--enable-javahl"
+      "--with-jdk=${jdk}"
+    ];
 
     preBuild = ''
       makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
diff --git a/pkgs/desktops/gnome-2/desktop/vte/default.nix b/pkgs/desktops/gnome-2/desktop/vte/default.nix
index c7ed90905acd..0c8efc57c71f 100644
--- a/pkgs/desktops/gnome-2/desktop/vte/default.nix
+++ b/pkgs/desktops/gnome-2/desktop/vte/default.nix
@@ -32,9 +32,9 @@ in stdenv.mkDerivation rec {
   buildInputs = [ intltool glib gtk ncurses ] ++
                 stdenv.lib.optionals pythonSupport [python pygtk];
 
-  configureFlags = ''
-    ${if pythonSupport then "--enable-python" else "--disable-python"}
-  '';
+  configureFlags = [
+    (stdenv.lib.enableFeature pythonSupport "python")
+  ];
 
   postInstall = stdenv.lib.optionalString pythonSupport ''
     cd $(toPythonPath $out)/gtk-2.0
diff --git a/pkgs/development/interpreters/scsh/default.nix b/pkgs/development/interpreters/scsh/default.nix
index 8da41ea1a9cb..85c9434f0813 100644
--- a/pkgs/development/interpreters/scsh/default.nix
+++ b/pkgs/development/interpreters/scsh/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ scheme48 ];
-  configureFlags = ''--with-scheme48=${scheme48}'';
+  configureFlags = [ "--with-scheme48=${scheme48}" ];
 
   meta = with stdenv.lib; {
     description = "A Scheme shell";
diff --git a/pkgs/development/libraries/classads/default.nix b/pkgs/development/libraries/classads/default.nix
index 32a4a574ed6c..d329b1945fc7 100644
--- a/pkgs/development/libraries/classads/default.nix
+++ b/pkgs/development/libraries/classads/default.nix
@@ -12,9 +12,9 @@ stdenv.mkDerivation {
 
   buildInputs = [ pcre ];
 
-  configureFlags = ''                                                  
-    --enable-namespace --enable-flexible-member
-  '';
+  configureFlags = [
+    "--enable-namespace" "--enable-flexible-member"
+  ];
   
   meta = {
     homepage = http://www.cs.wisc.edu/condor/classad/;
diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix
index e46ecfb76127..9f1048f2de56 100644
--- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix
+++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix
@@ -26,9 +26,13 @@ stdenv.mkDerivation rec {
     patch -p1 < ${./darwin.patch}
   '';
 
-  configureFlags = ''
-    --disable-examples --enable-failing-tests --localstatedir=/var --disable-gtk-doc --disable-docbook
-  '';
+  configureFlags = [
+    "--disable-examples"
+    "--enable-failing-tests"
+    "--localstatedir=/var"
+    "--disable-gtk-doc"
+    "--disable-docbook"
+  ];
 
   postInstall = ''
     # Hm, apparently --disable-gtk-doc is ignored...
diff --git a/pkgs/development/libraries/ilixi/default.nix b/pkgs/development/libraries/ilixi/default.nix
index 0213148d6930..99f6df9c5f06 100644
--- a/pkgs/development/libraries/ilixi/default.nix
+++ b/pkgs/development/libraries/ilixi/default.nix
@@ -14,9 +14,12 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ directfb libsigcxx libxml2 fontconfig ];
 
-  configureFlags = ''
-    --enable-log-debug --enable-debug --enable-trace --with-examples
-  '';
+  configureFlags = [
+    "--enable-log-debug"
+    "--enable-debug"
+    "--enable-trace"
+    "--with-examples"
+  ];
 
   meta = with stdenv.lib; {
     description = "Lightweight C++ GUI toolkit for embedded Linux systems";
diff --git a/pkgs/development/libraries/libinfinity/default.nix b/pkgs/development/libraries/libinfinity/default.nix
index 208e01110625..dffb9053605d 100644
--- a/pkgs/development/libraries/libinfinity/default.nix
+++ b/pkgs/development/libraries/libinfinity/default.nix
@@ -7,7 +7,6 @@
 , libintl }:
 
 let
-  edf = flag: feature: (if flag then "--with-" else "--without-") + feature;
   optional = cond: elem: assert cond -> elem != null; if cond then [elem] else [];
 
 in stdenv.mkDerivation rec {
@@ -28,14 +27,14 @@ in stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ gnutls ];
 
-  configureFlags = ''
-    ${if documentation then "--enable-gtk-doc" else "--disable-gtk-doc"}
-    ${edf gtkWidgets "inftextgtk"}
-    ${edf gtkWidgets "infgtk"}
-    ${edf daemon "infinoted"}
-    ${edf daemon "libdaemon"}
-    ${edf avahiSupport "avahi"}
-  '';
+  configureFlags = [
+    (stdenv.lib.enableFeature documentation "gtk-doc")
+    (stdenv.lib.withFeature gtkWidgets "inftextgtk")
+    (stdenv.lib.withFeature gtkWidgets "infgtk")
+    (stdenv.lib.withFeature daemon "infinoted")
+    (stdenv.lib.withFeature daemon "libdaemon")
+    (stdenv.lib.withFeature avahiSupport "avahi")
+  ];
 
   passthru = {
     inherit version;
diff --git a/pkgs/development/libraries/neon/0.29.nix b/pkgs/development/libraries/neon/0.29.nix
index dbde83c2d94b..d0f992efb2bc 100644
--- a/pkgs/development/libraries/neon/0.29.nix
+++ b/pkgs/development/libraries/neon/0.29.nix
@@ -28,13 +28,12 @@ stdenv.mkDerivation rec {
   buildInputs = [libxml2 openssl]
     ++ stdenv.lib.optional compressionSupport zlib;
 
-  configureFlags = ''
-    ${if shared then "--enable-shared" else "--disable-shared"}
-    ${if static then "--enable-static" else "--disable-static"}
-    ${if compressionSupport then "--with-zlib" else "--without-zlib"}
-    ${if sslSupport then "--with-ssl" else "--without-ssl"}
-    --enable-shared
-  '';
+  configureFlags = [
+    (stdenv.lib.enableFeature shared "shared")
+    (stdenv.lib.enableFeature static "static")
+    (stdenv.lib.withFeature compressionSupport "zlib")
+    (stdenv.lib.withFeature sslSupport "ssl")
+  ];
 
   passthru = {inherit compressionSupport sslSupport;};
 
diff --git a/pkgs/development/libraries/neon/default.nix b/pkgs/development/libraries/neon/default.nix
index 9c2a3265491a..7aad5be36f70 100644
--- a/pkgs/development/libraries/neon/default.nix
+++ b/pkgs/development/libraries/neon/default.nix
@@ -28,13 +28,12 @@ stdenv.mkDerivation rec {
   buildInputs = [libxml2 openssl]
     ++ stdenv.lib.optional compressionSupport zlib;
 
-  configureFlags = ''
-    ${if shared then "--enable-shared" else "--disable-shared"}
-    ${if static then "--enable-static" else "--disable-static"}
-    ${if compressionSupport then "--with-zlib" else "--without-zlib"}
-    ${if sslSupport then "--with-ssl" else "--without-ssl"}
-    --enable-shared
-  '';
+  configureFlags = [
+    (stdenv.lib.enableFeature shared "shared")
+    (stdenv.lib.enableFeature static "static")
+    (stdenv.lib.withFeature compressionSupport "zlib")
+    (stdenv.lib.withFeature sslSupport "ssl")
+  ];
 
   passthru = {inherit compressionSupport sslSupport;};
 
diff --git a/pkgs/development/libraries/tix/default.nix b/pkgs/development/libraries/tix/default.nix
index 7e18e7402273..232c95e6257e 100644
--- a/pkgs/development/libraries/tix/default.nix
+++ b/pkgs/development/libraries/tix/default.nix
@@ -34,13 +34,13 @@ stdenv.mkDerivation rec {
       ln -s $i private_headers/generic;
     done;
     '';
-  configureFlags = ''
-      --with-tclinclude=${tcl}/include
-      --with-tclconfig=.
-      --with-tkinclude=${tk.dev}/include
-      --with-tkconfig=.
-      --libdir=''${prefix}/lib
-    '';
+  configureFlags = [
+    "--with-tclinclude=${tcl}/include"
+    "--with-tclconfig=."
+    "--with-tkinclude=${tk.dev}/include"
+    "--with-tkconfig=."
+    "--libdir=\${prefix}/lib"
+  ];
 
   meta = with stdenv.lib; {
     description = "A widget library for Tcl/Tk";
diff --git a/pkgs/development/tools/misc/dialog/default.nix b/pkgs/development/tools/misc/dialog/default.nix
index 591254c73f57..a433c4a338cd 100644
--- a/pkgs/development/tools/misc/dialog/default.nix
+++ b/pkgs/development/tools/misc/dialog/default.nix
@@ -1,12 +1,9 @@
 { stdenv, fetchurl, ncurses
 , withLibrary ? false, libtool
 , unicodeSupport ? true
+, enableShared ? !stdenv.isDarwin
 }:
 
-let optStr = stdenv.lib.optionalString;
-    buildShared = !stdenv.isDarwin;
-in
-
 assert withLibrary -> libtool != null;
 assert unicodeSupport -> ncurses.unicode && ncurses != null;
 
@@ -24,14 +21,14 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ ncurses ];
 
-  configureFlags = ''
-    --disable-rpath-hacks
-    ${optStr withLibrary "--with-libtool"}
-    --with-libtool-opts=${optStr buildShared "-shared"}
-    --with-ncurses${optStr unicodeSupport "w"}
-  '';
+  configureFlags = [
+    "--disable-rpath-hacks"
+    (stdenv.lib.withFeature withLibrary "libtool")
+    "--with-ncurses${stdenv.lib.optionalString unicodeSupport "w"}"
+    "--with-libtool-opts=${stdenv.lib.optionalString enableShared "-shared"}"
+  ];
 
-  installTargets = "install${optStr withLibrary "-full"}";
+  installTargets = "install${stdenv.lib.optionalString withLibrary "-full"}";
 
   meta = {
     homepage = http://invisible-island.net/dialog/dialog.html;
diff --git a/pkgs/misc/jackaudio/jack1.nix b/pkgs/misc/jackaudio/jack1.nix
index 848215ae17af..c11be4ad0c0c 100644
--- a/pkgs/misc/jackaudio/jack1.nix
+++ b/pkgs/misc/jackaudio/jack1.nix
@@ -22,9 +22,9 @@ stdenv.mkDerivation rec {
     sha256 = "0i6l25dmfk2ji2lrakqq9icnwjxklgcjzzk65dmsff91z2zva5rm";
   };
   
-  configureFlags = ''
-    ${if (optLibffado != null) then "--enable-firewire" else ""}
-  '';
+  configureFlags = [
+    (stdenv.lib.enableFeature (optLibffado != null) "firewire")
+  ];
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
diff --git a/pkgs/os-specific/linux/alsa-firmware/default.nix b/pkgs/os-specific/linux/alsa-firmware/default.nix
index fb312b6bcb00..53fcf7d68433 100644
--- a/pkgs/os-specific/linux/alsa-firmware/default.nix
+++ b/pkgs/os-specific/linux/alsa-firmware/default.nix
@@ -8,9 +8,9 @@ stdenv.mkDerivation rec {
     sha256 = "0gfcyj5anckjn030wcxx5v2xk2s219nyf99s9m833275b5wz2piw";
   };
 
-  configureFlags = ''
-    --with-hotplug-dir=$(out)/lib/firmware
-  '';
+  configureFlags = [
+    "--with-hotplug-dir=$(out)/lib/firmware"
+  ];
 
   dontStrip = true;
 
diff --git a/pkgs/os-specific/linux/ipsec-tools/default.nix b/pkgs/os-specific/linux/ipsec-tools/default.nix
index e27f380ac3e2..dd7d25716dc4 100644
--- a/pkgs/os-specific/linux/ipsec-tools/default.nix
+++ b/pkgs/os-specific/linux/ipsec-tools/default.nix
@@ -28,19 +28,19 @@ stdenv.mkDerivation rec {
   # fix build with newer gcc versions
   preConfigure = ''substituteInPlace configure --replace "-Werror" "" '';
 
-  configureFlags = ''
-    --sysconfdir=/etc --localstatedir=/var
-    --with-kernel-headers=${linuxHeaders}/include
-    --disable-security-context
-    --enable-adminport
-    --enable-dpd
-    --enable-frag
-    --enable-gssapi
-    --enable-hybrid
-    --enable-natt
-    --enable-shared
-    --enable-stats
-  '';
+  configureFlags = [
+    "--sysconfdir=/etc --localstatedir=/var"
+    "--with-kernel-headers=${linuxHeaders}/include"
+    "--disable-security-context"
+    "--enable-adminport"
+    "--enable-dpd"
+    "--enable-frag"
+    "--enable-gssapi"
+    "--enable-hybrid"
+    "--enable-natt"
+    "--enable-shared"
+    "--enable-stats"
+  ];
 
   meta = {
     homepage = http://ipsec-tools.sourceforge.net/;
diff --git a/pkgs/os-specific/linux/iptables/default.nix b/pkgs/os-specific/linux/iptables/default.nix
index 0c088ac2a4bc..9fa7a2cf0aa7 100644
--- a/pkgs/os-specific/linux/iptables/default.nix
+++ b/pkgs/os-specific/linux/iptables/default.nix
@@ -18,10 +18,10 @@ stdenv.mkDerivation rec {
     export NIX_LDFLAGS="$NIX_LDFLAGS -lmnl -lnftnl"
   '';
 
-  configureFlags = ''
-    --enable-devel
-    --enable-shared
-  '';
+  configureFlags = [
+    "--enable-devel"
+    "--enable-shared"
+  ];
 
   outputs = [ "out" "dev" ];
 
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";
diff --git a/pkgs/servers/shairport-sync/default.nix b/pkgs/servers/shairport-sync/default.nix
index e880e490a6af..d6ea05c9e6d8 100644
--- a/pkgs/servers/shairport-sync/default.nix
+++ b/pkgs/servers/shairport-sync/default.nix
@@ -27,11 +27,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  configureFlags = ''
-    --with-alsa --with-pipe --with-pulseaudio --with-stdout
-    --with-avahi --with-ssl=openssl --with-soxr
-    --without-configfiles --without-initscript
-  '';
+  configureFlags = [
+    "--with-alsa" "--with-pipe" "--with-pulseaudio" "--with-stdout"
+    "--with-avahi" "--with-ssl=openssl" "--with-soxr"
+    "--without-configfiles" "--without-initscript"
+  ];
 
   meta = with stdenv.lib; {
     inherit (src.meta) homepage;
diff --git a/pkgs/tools/misc/urjtag/default.nix b/pkgs/tools/misc/urjtag/default.nix
index 48edb601a43f..60a1ab325b13 100644
--- a/pkgs/tools/misc/urjtag/default.nix
+++ b/pkgs/tools/misc/urjtag/default.nix
@@ -21,12 +21,12 @@ stdenv.mkDerivation rec {
   buildInputs = [ gettext autoconf automake libtool bison flex which
     subversion makeWrapper readline libftdi libusb python3 ];
 
-  configureFlags = ''
-    ${if svfSupport then "--enable-svf" else "--disable-svf"}
-    ${if bsdlSupport then "--enable-bsdl" else "--disable-bsdl"}
-    ${if staplSupport then "--enable-stapl" else "--disable-stapl"}
-    ${if jedecSupport then "--enable-jedec-exp" else "--disable-jedec-exp"}
-  '';
+  configureFlags = [
+    (stdenv.lib.enableFeature svfSupport   "svf")
+    (stdenv.lib.enableFeature bsdlSupport  "bsdl")
+    (stdenv.lib.enableFeature staplSupport "stapl")
+    (stdenv.lib.enableFeature jedecSupport "jedec-exp")
+  ];
 
   preConfigure = "./autogen.sh";
 
diff --git a/pkgs/tools/networking/p2p/amule/default.nix b/pkgs/tools/networking/p2p/amule/default.nix
index ac440fc6d338..a74242ba5e17 100644
--- a/pkgs/tools/networking/p2p/amule/default.nix
+++ b/pkgs/tools/networking/p2p/amule/default.nix
@@ -8,10 +8,7 @@
 assert httpServer -> libpng != null;
 assert client -> libX11 != null;
 with stdenv;
-let
-  # Enable/Disable Feature
-  edf = enabled: flag: if enabled then "--enable-" + flag else "--disable-" + flag;
-in
+
 mkDerivation rec {
   name = "aMule-2.3.2";
 
@@ -27,15 +24,15 @@ mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  configureFlags = ''
-    --with-crypto-prefix=${cryptopp}
-    --disable-debug
-    --enable-optimize
-    ${edf monolithic "monolithic"}
-    ${edf daemon "amule-daemon"}
-    ${edf client "amule-gui"}
-    ${edf httpServer "webserver"}
-  '';
+  configureFlags = [
+    "--with-crypto-prefix=${cryptopp}"
+    "--disable-debug"
+    "--enable-optimize"
+    (stdenv.lib.enableFeature monolithic "monolithic")
+    (stdenv.lib.enableFeature daemon "amule-daemon")
+    (stdenv.lib.enableFeature client "amule-gui")
+    (stdenv.lib.enableFeature httpServer "webserver")
+  ];
 
   postConfigure = ''
     sed -i "src/libs/ec/file_generator.pl"     \
diff --git a/pkgs/tools/networking/vtun/default.nix b/pkgs/tools/networking/vtun/default.nix
index fb0ee64cc2c0..d2cbb5d8a4ee 100644
--- a/pkgs/tools/networking/vtun/default.nix
+++ b/pkgs/tools/networking/vtun/default.nix
@@ -20,10 +20,11 @@ stdenv.mkDerivation rec {
   '';
   buildInputs = [ lzo openssl zlib yacc flex ];
 
-  configureFlags = ''
-    --with-lzo-headers=${lzo}/include/lzo
-    --with-ssl-headers=${openssl.dev}/include/openssl
-    --with-blowfish-headers=${openssl.dev}/include/openssl'';
+  configureFlags = [
+    "--with-lzo-headers=${lzo}/include/lzo"
+    "--with-ssl-headers=${openssl.dev}/include/openssl"
+    "--with-blowfish-headers=${openssl.dev}/include/openssl"
+  ];
 
   meta = with stdenv.lib; {
       description = "Virtual Tunnels over TCP/IP with traffic shaping, compression and encryption";
diff --git a/pkgs/tools/security/fwknop/default.nix b/pkgs/tools/security/fwknop/default.nix
index 04e6d12fe427..5f4fbea9fcd9 100644
--- a/pkgs/tools/security/fwknop/default.nix
+++ b/pkgs/tools/security/fwknop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, lib
+{ stdenv, fetchFromGitHub, autoreconfHook
 , libpcap, texinfo
 , iptables
 , gnupgSupport ? true, gnupg, gpgme # Increases dependencies!
@@ -23,21 +23,18 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional gnupgSupport [ gnupg gpgme.dev ]
     ++ stdenv.lib.optional wgetSupport [ wget ];
 
-  configureFlags = ''
-    --sysconfdir=/etc
-    --localstatedir=/run
-    --with-iptables=${iptables}/sbin/iptables
-    ${lib.optionalString (!buildServer) "--disable-server"}
-    ${lib.optionalString (!buildClient) "--disable-client"}
-    ${lib.optionalString gnupgSupport ''
-      --with-gpgme
-      --with-gpgme-prefix=${gpgme.dev}
-      --with-gpg=${gnupg}
-    ''}
-    ${lib.optionalString wgetSupport ''
-      --with-wget=${wget}/bin/wget
-    ''}
-  '';
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--localstatedir=/run"
+    "--with-iptables=${iptables}/sbin/iptables"
+    (stdenv.lib.enableFeature buildServer "server")
+    (stdenv.lib.enableFeature buildClient "client")
+    (stdenv.lib.withFeatureAs wgetSupport wget "${wget}/bin/wget")
+  ] ++ stdenv.lib.optionalString gnupgSupport [
+    "--with-gpgme"
+    "--with-gpgme-prefix=${gpgme.dev}"
+    "--with-gpg=${gnupg}"
+  ];
 
   # Temporary hack to copy the example configuration files into the nix-store,
   # this'll probably be helpful until there's a NixOS module for that (feel free
diff --git a/pkgs/tools/security/modsecurity/default.nix b/pkgs/tools/security/modsecurity/default.nix
index 2c02a5dd4736..09f8c63973c7 100644
--- a/pkgs/tools/security/modsecurity/default.nix
+++ b/pkgs/tools/security/modsecurity/default.nix
@@ -22,17 +22,17 @@ stdenv.mkDerivation rec {
   buildInputs = [  curl apacheHttpd pcre apr aprutil libxml2 ] ++
     optional luaSupport lua5;
 
-  configureFlags = ''
-    --enable-standalone-module
-    --enable-static
-    --with-curl=${curl.dev}
-    --with-apxs=${apacheHttpd.dev}/bin/apxs
-    --with-pcre=${pcre.dev}
-    --with-apr=${apr.dev}
-    --with-apu=${aprutil.dev}/bin/apu-1-config
-    --with-libxml=${libxml2.dev}
-    --with-lua=${luaValue}
-  '';
+  configureFlags = [
+    "--enable-standalone-module"
+    "--enable-static"
+    "--with-curl=${curl.dev}"
+    "--with-apxs=${apacheHttpd.dev}/bin/apxs"
+    "--with-pcre=${pcre.dev}"
+    "--with-apr=${apr.dev}"
+    "--with-apu=${aprutil.dev}/bin/apu-1-config"
+    "--with-libxml=${libxml2.dev}"
+    "--with-lua=${luaValue}"
+  ];
 
   outputs = ["out" "nginx"];
   # by default modsecurity's install script copies compiled output to httpd's modules folder