diff --git a/pkgs/applications/audio/openmpt123/default.nix b/pkgs/applications/audio/openmpt123/default.nix index 58e0887163d7..0e52d144e51c 100644 --- a/pkgs/applications/audio/openmpt123/default.nix +++ b/pkgs/applications/audio/openmpt123/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation { buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ] ++ stdenv.lib.optional usePulseAudio libpulseaudio; - configureFlags = stdenv.lib.optional (!usePulseAudio) [ "--without-pulseaudio" ]; + configureFlags = stdenv.lib.optional (!usePulseAudio) "--without-pulseaudio"; meta = with stdenv.lib; { description = "A cross-platform command-line based module file player"; diff --git a/pkgs/applications/editors/codeblocks/default.nix b/pkgs/applications/editors/codeblocks/default.nix index 72642cfbe63f..cbed08f317fa 100644 --- a/pkgs/applications/editors/codeblocks/default.nix +++ b/pkgs/applications/editors/codeblocks/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; configureFlags = [ "--enable-pch=no" ] - ++ optional contribPlugins [ "--with-contrib-plugins" "--with-boost-libdir=${boost}/lib" ]; + ++ optionals contribPlugins [ "--with-contrib-plugins" "--with-boost-libdir=${boost}/lib" ]; meta = { maintainers = [ maintainers.linquize ]; diff --git a/pkgs/applications/misc/mlterm/default.nix b/pkgs/applications/misc/mlterm/default.nix index 0c8ad9ae1b3c..b2012801e170 100644 --- a/pkgs/applications/misc/mlterm/default.nix +++ b/pkgs/applications/misc/mlterm/default.nix @@ -61,9 +61,7 @@ stdenv.mkDerivation rec { "--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc" #mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core #and configuring ~/.mlterm/key correctly. - ] ++ stdenv.lib.optional (libssh2 == null) [ - "--disable-ssh2" - ]; + ] ++ stdenv.lib.optional (libssh2 == null) "--disable-ssh2"; postInstall = '' install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg" diff --git a/pkgs/applications/networking/ids/suricata/default.nix b/pkgs/applications/networking/ids/suricata/default.nix index cb45ec3f1e53..24c088f7f2ef 100644 --- a/pkgs/applications/networking/ids/suricata/default.nix +++ b/pkgs/applications/networking/ids/suricata/default.nix @@ -109,12 +109,12 @@ stdenv.mkDerivation rec { "--with-libnet-includes=${libnet}/include" "--with-libnet-libraries=${libnet}/lib" ] - ++ lib.optional hyperscanSupport [ + ++ lib.optionals hyperscanSupport [ "--with-libhs-includes=${hyperscan.dev}/include/hs" "--with-libhs-libraries=${hyperscan}/lib" ] - ++ lib.optional redisSupport [ "--enable-hiredis" ] - ++ lib.optional rustSupport [ + ++ lib.optional redisSupport "--enable-hiredis" + ++ lib.optionals rustSupport [ "--enable-rust" "--enable-rust-experimental" ]; diff --git a/pkgs/applications/networking/mailreaders/sylpheed/default.nix b/pkgs/applications/networking/mailreaders/sylpheed/default.nix index 986ee5fe3c9e..8e1f67201207 100644 --- a/pkgs/applications/networking/mailreaders/sylpheed/default.nix +++ b/pkgs/applications/networking/mailreaders/sylpheed/default.nix @@ -21,10 +21,8 @@ stdenv.mkDerivation rec { ++ optionals gpgSupport [ gpgme ] ++ optionals sslSupport [ openssl ]; - configureFlags = [ - (optional gpgSupport "--enable-gpgme") - (optional sslSupport "--enable-ssl") - ]; + configureFlags = optional gpgSupport "--enable-gpgme" + ++ optional sslSupport "--enable-ssl"; meta = { homepage = http://sylpheed.sraoss.jp/en/; diff --git a/pkgs/development/libraries/libftdi/default.nix b/pkgs/development/libraries/libftdi/default.nix index 08ec1d84a3f0..3dffbd075e93 100644 --- a/pkgs/development/libraries/libftdi/default.nix +++ b/pkgs/development/libraries/libftdi/default.nix @@ -14,7 +14,7 @@ with stdenv; mkDerivation rec { # Hack to avoid TMPDIR in RPATHs. preFixup = ''rm -rf "$(pwd)" ''; - configureFlags = lib.optional (!isDarwin) [ "--with-async-mode" ]; + configureFlags = lib.optional (!isDarwin) "--with-async-mode"; # allow async mode. from ubuntu. see: # https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff diff --git a/pkgs/development/libraries/libjpeg-drop/default.nix b/pkgs/development/libraries/libjpeg-drop/default.nix index 4e9c165e71fb..8ed1c9bf92fe 100644 --- a/pkgs/development/libraries/libjpeg-drop/default.nix +++ b/pkgs/development/libraries/libjpeg-drop/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { ''; configureFlags = [] - ++ optional static [ "--enable-static" "--disable-shared" ]; + ++ optionals static [ "--enable-static" "--disable-shared" ]; outputs = [ "bin" "dev" "out" "man" ]; diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 92b56467aee9..68daece490fa 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { buildInputs = [ libjack2 ] ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib; - configureFlags = [ "--disable-mac-universal --enable-cxx" ]; + configureFlags = [ "--disable-mac-universal" "--enable-cxx" ]; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays"; diff --git a/pkgs/development/tools/misc/srecord/default.nix b/pkgs/development/tools/misc/srecord/default.nix index a76a180741ef..fd8105552967 100644 --- a/pkgs/development/tools/misc/srecord/default.nix +++ b/pkgs/development/tools/misc/srecord/default.nix @@ -10,9 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost libtool groff ghostscript libgcrypt ]; - configureFlags = [ - (stdenv.lib.optional (libgcrypt == null) "--without-gcrypt") - ]; + configureFlags = stdenv.lib.optional (libgcrypt == null) "--without-gcrypt"; meta = with stdenv.lib; { description = "Collection of powerful tools for manipulating EPROM load files"; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index c26536c5c2aa..f286c359e6fc 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -48,7 +48,7 @@ let irrlicht luajit jsoncpp gettext freetype sqlite curl bzip2 ncurses ] ++ optionals buildClient [ libpng libjpeg libGLU libGL openal libogg libvorbis xorg.libX11 libXxf86vm - ] ++ optional buildServer [ + ] ++ optionals buildServer [ leveldb postgresql hiredis ]; diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 2d1b994faab6..990d7c5cf134 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -53,15 +53,15 @@ stdenv.mkDerivation { "--with-http_stub_status_module" "--with-threads" "--with-pcre-jit" - ] ++ optional withDebug [ + ] ++ optionals withDebug [ "--with-debug" - ] ++ optional withStream [ + ] ++ optionals withStream [ "--with-stream" "--with-stream_geoip_module" "--with-stream_realip_module" "--with-stream_ssl_module" "--with-stream_ssl_preread_module" - ] ++ optional withMail [ + ] ++ optionals withMail [ "--with-mail" "--with-mail_ssl_module" ] ++ optional (perl != null) [ diff --git a/pkgs/servers/http/tengine/default.nix b/pkgs/servers/http/tengine/default.nix index 1467b1577f99..1eeb5a8c4dd8 100644 --- a/pkgs/servers/http/tengine/default.nix +++ b/pkgs/servers/http/tengine/default.nix @@ -53,23 +53,23 @@ stdenv.mkDerivation rec { "--with-poll_module" "--with-google_perftools_module" "--with-jemalloc" - ] ++ optional withDebug [ + ] ++ optionals withDebug [ "--with-debug" - ] ++ optional withMail [ + ] ++ optionals withMail [ "--with-mail" "--with-mail_ssl_module" - ] ++ optional (!withMail) [ + ] ++ optionals (!withMail) [ "--without-mail_pop3_module" "--without-mail_imap_module" "--without-mail_smtp_module" - ] ++ optional withStream [ + ] ++ optionals withStream [ "--with-stream" "--with-stream_ssl_module" "--with-stream_realip_module" "--with-stream_geoip_module" "--with-stream_ssl_preread_module" "--with-stream_sni" - ] ++ optional (!withStream) [ + ] ++ optionals (!withStream) [ "--without-stream_limit_conn_module" "--without-stream_access_module" "--without-stream_geo_module" diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index 8711be4b5c00..d68c37e02d91 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -47,9 +47,9 @@ stdenv.mkDerivation rec { "--pid=/run/unit/unit.pid" "--user=unit" "--group=unit" - ] ++ optional withSSL [ "--openssl" ] - ++ optional (!withIPv6) [ "--no-ipv6" ] - ++ optional withDebug [ "--debug" ]; + ] ++ optional withSSL "--openssl" + ++ optional (!withIPv6) "--no-ipv6" + ++ optional withDebug "--debug"; postConfigure = '' ${optionalString withPython2 "./configure python --module=python2 --config=${python2}/bin/python2-config --lib-path=${python2}/lib"} diff --git a/pkgs/servers/mail/opensmtpd/extras.nix b/pkgs/servers/mail/opensmtpd/extras.nix index 5a5fc537d6eb..14d36ad65549 100644 --- a/pkgs/servers/mail/opensmtpd/extras.nix +++ b/pkgs/servers/mail/opensmtpd/extras.nix @@ -48,31 +48,31 @@ stdenv.mkDerivation rec { "--with-scheduler-ram" "--with-scheduler-stub" - ] ++ stdenv.lib.optional enablePython [ + ] ++ stdenv.lib.optionals enablePython [ "--with-python=${python2}" "--with-filter-python" "--with-queue-python" "--with-table-python" "--with-scheduler-python" - ] ++ stdenv.lib.optional enableLua [ + ] ++ stdenv.lib.optionals enableLua [ "--with-lua=${pkgconfig}" "--with-filter-lua" - ] ++ stdenv.lib.optional enablePerl [ + ] ++ stdenv.lib.optionals enablePerl [ "--with-perl=${perl}" "--with-filter-perl" - ] ++ stdenv.lib.optional enableMysql [ + ] ++ stdenv.lib.optionals enableMysql [ "--with-table-mysql" - ] ++ stdenv.lib.optional enablePostgres [ + ] ++ stdenv.lib.optionals enablePostgres [ "--with-table-postgres" - ] ++ stdenv.lib.optional enableSqlite [ + ] ++ stdenv.lib.optionals enableSqlite [ "--with-table-sqlite" - ] ++ stdenv.lib.optional enableRedis [ + ] ++ stdenv.lib.optionals enableRedis [ "--with-table-redis" ]; diff --git a/pkgs/tools/graphics/gifsicle/default.nix b/pkgs/tools/graphics/gifsicle/default.nix index 79b2708cb2b7..9b3836b9decc 100644 --- a/pkgs/tools/graphics/gifsicle/default.nix +++ b/pkgs/tools/graphics/gifsicle/default.nix @@ -11,12 +11,11 @@ stdenv.mkDerivation rec { sha256 = "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas"; }; - buildInputs = optional gifview [ xorgproto libXt libX11 ]; + buildInputs = optionals gifview [ xorgproto libXt libX11 ]; - configureFlags = [] - ++ optional (!gifview) [ "--disable-gifview" ]; + configureFlags = optional (!gifview) "--disable-gifview"; - LDFLAGS = optional static "-static"; + LDFLAGS = optionalString static "-static"; doCheck = true; checkPhase = '' diff --git a/pkgs/tools/graphics/graphviz/base.nix b/pkgs/tools/graphics/graphviz/base.nix index 700bed237bdb..3b9d8a4cca5d 100644 --- a/pkgs/tools/graphics/graphviz/base.nix +++ b/pkgs/tools/graphics/graphviz/base.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation { configureFlags = [ "--with-ltdl-lib=${libtool.lib}/lib" "--with-ltdl-include=${libtool}/include" - ] ++ stdenv.lib.optional (xorg == null) [ "--without-x" ]; + ] ++ stdenv.lib.optional (xorg == null) "--without-x"; inherit patches; diff --git a/pkgs/tools/networking/chrony/default.nix b/pkgs/tools/networking/chrony/default.nix index c0c3281431f5..2ec16aa430a3 100644 --- a/pkgs/tools/networking/chrony/default.nix +++ b/pkgs/tools/networking/chrony/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; configureFlags = [ "--chronyvardir=$(out)/var/lib/chrony" ] - ++ stdenv.lib.optional stdenv.isLinux [ "--enable-scfilter" ]; + ++ stdenv.lib.optional stdenv.isLinux "--enable-scfilter"; meta = with stdenv.lib; { description = "Sets your computer's clock from time servers on the Net"; diff --git a/pkgs/tools/networking/ipv6calc/default.nix b/pkgs/tools/networking/ipv6calc/default.nix index 5de4b8cecb78..35aeb23a9a83 100644 --- a/pkgs/tools/networking/ipv6calc/default.nix +++ b/pkgs/tools/networking/ipv6calc/default.nix @@ -30,13 +30,9 @@ stdenv.mkDerivation rec { "--disable-bundled-md5" "--disable-dynamic-load" "--enable-shared" - ] ++ stdenv.lib.optional (libmaxminddb != null ) [ - "--enable-mmdb" - ] ++ stdenv.lib.optional (geolite-legacy != null) [ - "--with-geoip-db=${geolite-legacy}/share/GeoIP" - ] ++ stdenv.lib.optional (ip2location-c != null ) [ - "--enable-ip2location" - ]; + ] ++ stdenv.lib.optional (libmaxminddb != null) "--enable-mmdb" + ++ stdenv.lib.optional (geolite-legacy != null) "--with-geoip-db=${geolite-legacy}/share/GeoIP" + ++ stdenv.lib.optional (ip2location-c != null) "--enable-ip2location"; enableParallelBuilding = true;