treewide: configureFlags is a flat list

This commit is contained in:
Robin Gloster 2019-11-20 10:17:54 +01:00 committed by Jan Tojnar
parent e9c27ed5f9
commit 6ca6ac796b
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
18 changed files with 39 additions and 50 deletions

View File

@ -19,7 +19,7 @@ in stdenv.mkDerivation {
buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ] buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ]
++ stdenv.lib.optional usePulseAudio libpulseaudio; ++ stdenv.lib.optional usePulseAudio libpulseaudio;
configureFlags = stdenv.lib.optional (!usePulseAudio) [ "--without-pulseaudio" ]; configureFlags = stdenv.lib.optional (!usePulseAudio) "--without-pulseaudio";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A cross-platform command-line based module file player"; description = "A cross-platform command-line based module file player";

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
configureFlags = [ "--enable-pch=no" ] 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 = { meta = {
maintainers = [ maintainers.linquize ]; maintainers = [ maintainers.linquize ];

View File

@ -61,9 +61,7 @@ stdenv.mkDerivation rec {
"--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc" "--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc"
#mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core #mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core
#and configuring ~/.mlterm/key correctly. #and configuring ~/.mlterm/key correctly.
] ++ stdenv.lib.optional (libssh2 == null) [ ] ++ stdenv.lib.optional (libssh2 == null) "--disable-ssh2";
"--disable-ssh2"
];
postInstall = '' postInstall = ''
install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg" install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg"

View File

@ -109,12 +109,12 @@ stdenv.mkDerivation rec {
"--with-libnet-includes=${libnet}/include" "--with-libnet-includes=${libnet}/include"
"--with-libnet-libraries=${libnet}/lib" "--with-libnet-libraries=${libnet}/lib"
] ]
++ lib.optional hyperscanSupport [ ++ lib.optionals hyperscanSupport [
"--with-libhs-includes=${hyperscan.dev}/include/hs" "--with-libhs-includes=${hyperscan.dev}/include/hs"
"--with-libhs-libraries=${hyperscan}/lib" "--with-libhs-libraries=${hyperscan}/lib"
] ]
++ lib.optional redisSupport [ "--enable-hiredis" ] ++ lib.optional redisSupport "--enable-hiredis"
++ lib.optional rustSupport [ ++ lib.optionals rustSupport [
"--enable-rust" "--enable-rust"
"--enable-rust-experimental" "--enable-rust-experimental"
]; ];

View File

@ -21,10 +21,8 @@ stdenv.mkDerivation rec {
++ optionals gpgSupport [ gpgme ] ++ optionals gpgSupport [ gpgme ]
++ optionals sslSupport [ openssl ]; ++ optionals sslSupport [ openssl ];
configureFlags = [ configureFlags = optional gpgSupport "--enable-gpgme"
(optional gpgSupport "--enable-gpgme") ++ optional sslSupport "--enable-ssl";
(optional sslSupport "--enable-ssl")
];
meta = { meta = {
homepage = http://sylpheed.sraoss.jp/en/; homepage = http://sylpheed.sraoss.jp/en/;

View File

@ -14,7 +14,7 @@ with stdenv; mkDerivation rec {
# Hack to avoid TMPDIR in RPATHs. # Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" ''; preFixup = ''rm -rf "$(pwd)" '';
configureFlags = lib.optional (!isDarwin) [ "--with-async-mode" ]; configureFlags = lib.optional (!isDarwin) "--with-async-mode";
# allow async mode. from ubuntu. see: # allow async mode. from ubuntu. see:
# https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff # https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation {
''; '';
configureFlags = [] configureFlags = []
++ optional static [ "--enable-static" "--disable-shared" ]; ++ optionals static [ "--enable-static" "--disable-shared" ];
outputs = [ "bin" "dev" "out" "man" ]; outputs = [ "bin" "dev" "out" "man" ];

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
buildInputs = [ libjack2 ] buildInputs = [ libjack2 ]
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib; ++ 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"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays";

View File

@ -10,9 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ boost libtool groff ghostscript libgcrypt ]; buildInputs = [ boost libtool groff ghostscript libgcrypt ];
configureFlags = [ configureFlags = stdenv.lib.optional (libgcrypt == null) "--without-gcrypt";
(stdenv.lib.optional (libgcrypt == null) "--without-gcrypt")
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Collection of powerful tools for manipulating EPROM load files"; description = "Collection of powerful tools for manipulating EPROM load files";

View File

@ -48,7 +48,7 @@ let
irrlicht luajit jsoncpp gettext freetype sqlite curl bzip2 ncurses irrlicht luajit jsoncpp gettext freetype sqlite curl bzip2 ncurses
] ++ optionals buildClient [ ] ++ optionals buildClient [
libpng libjpeg libGLU libGL openal libogg libvorbis xorg.libX11 libXxf86vm libpng libjpeg libGLU libGL openal libogg libvorbis xorg.libX11 libXxf86vm
] ++ optional buildServer [ ] ++ optionals buildServer [
leveldb postgresql hiredis leveldb postgresql hiredis
]; ];

View File

@ -53,15 +53,15 @@ stdenv.mkDerivation {
"--with-http_stub_status_module" "--with-http_stub_status_module"
"--with-threads" "--with-threads"
"--with-pcre-jit" "--with-pcre-jit"
] ++ optional withDebug [ ] ++ optionals withDebug [
"--with-debug" "--with-debug"
] ++ optional withStream [ ] ++ optionals withStream [
"--with-stream" "--with-stream"
"--with-stream_geoip_module" "--with-stream_geoip_module"
"--with-stream_realip_module" "--with-stream_realip_module"
"--with-stream_ssl_module" "--with-stream_ssl_module"
"--with-stream_ssl_preread_module" "--with-stream_ssl_preread_module"
] ++ optional withMail [ ] ++ optionals withMail [
"--with-mail" "--with-mail"
"--with-mail_ssl_module" "--with-mail_ssl_module"
] ++ optional (perl != null) [ ] ++ optional (perl != null) [

View File

@ -53,23 +53,23 @@ stdenv.mkDerivation rec {
"--with-poll_module" "--with-poll_module"
"--with-google_perftools_module" "--with-google_perftools_module"
"--with-jemalloc" "--with-jemalloc"
] ++ optional withDebug [ ] ++ optionals withDebug [
"--with-debug" "--with-debug"
] ++ optional withMail [ ] ++ optionals withMail [
"--with-mail" "--with-mail"
"--with-mail_ssl_module" "--with-mail_ssl_module"
] ++ optional (!withMail) [ ] ++ optionals (!withMail) [
"--without-mail_pop3_module" "--without-mail_pop3_module"
"--without-mail_imap_module" "--without-mail_imap_module"
"--without-mail_smtp_module" "--without-mail_smtp_module"
] ++ optional withStream [ ] ++ optionals withStream [
"--with-stream" "--with-stream"
"--with-stream_ssl_module" "--with-stream_ssl_module"
"--with-stream_realip_module" "--with-stream_realip_module"
"--with-stream_geoip_module" "--with-stream_geoip_module"
"--with-stream_ssl_preread_module" "--with-stream_ssl_preread_module"
"--with-stream_sni" "--with-stream_sni"
] ++ optional (!withStream) [ ] ++ optionals (!withStream) [
"--without-stream_limit_conn_module" "--without-stream_limit_conn_module"
"--without-stream_access_module" "--without-stream_access_module"
"--without-stream_geo_module" "--without-stream_geo_module"

View File

@ -47,9 +47,9 @@ stdenv.mkDerivation rec {
"--pid=/run/unit/unit.pid" "--pid=/run/unit/unit.pid"
"--user=unit" "--user=unit"
"--group=unit" "--group=unit"
] ++ optional withSSL [ "--openssl" ] ] ++ optional withSSL "--openssl"
++ optional (!withIPv6) [ "--no-ipv6" ] ++ optional (!withIPv6) "--no-ipv6"
++ optional withDebug [ "--debug" ]; ++ optional withDebug "--debug";
postConfigure = '' postConfigure = ''
${optionalString withPython2 "./configure python --module=python2 --config=${python2}/bin/python2-config --lib-path=${python2}/lib"} ${optionalString withPython2 "./configure python --module=python2 --config=${python2}/bin/python2-config --lib-path=${python2}/lib"}

View File

@ -48,31 +48,31 @@ stdenv.mkDerivation rec {
"--with-scheduler-ram" "--with-scheduler-ram"
"--with-scheduler-stub" "--with-scheduler-stub"
] ++ stdenv.lib.optional enablePython [ ] ++ stdenv.lib.optionals enablePython [
"--with-python=${python2}" "--with-python=${python2}"
"--with-filter-python" "--with-filter-python"
"--with-queue-python" "--with-queue-python"
"--with-table-python" "--with-table-python"
"--with-scheduler-python" "--with-scheduler-python"
] ++ stdenv.lib.optional enableLua [ ] ++ stdenv.lib.optionals enableLua [
"--with-lua=${pkgconfig}" "--with-lua=${pkgconfig}"
"--with-filter-lua" "--with-filter-lua"
] ++ stdenv.lib.optional enablePerl [ ] ++ stdenv.lib.optionals enablePerl [
"--with-perl=${perl}" "--with-perl=${perl}"
"--with-filter-perl" "--with-filter-perl"
] ++ stdenv.lib.optional enableMysql [ ] ++ stdenv.lib.optionals enableMysql [
"--with-table-mysql" "--with-table-mysql"
] ++ stdenv.lib.optional enablePostgres [ ] ++ stdenv.lib.optionals enablePostgres [
"--with-table-postgres" "--with-table-postgres"
] ++ stdenv.lib.optional enableSqlite [ ] ++ stdenv.lib.optionals enableSqlite [
"--with-table-sqlite" "--with-table-sqlite"
] ++ stdenv.lib.optional enableRedis [ ] ++ stdenv.lib.optionals enableRedis [
"--with-table-redis" "--with-table-redis"
]; ];

View File

@ -11,12 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas"; sha256 = "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas";
}; };
buildInputs = optional gifview [ xorgproto libXt libX11 ]; buildInputs = optionals gifview [ xorgproto libXt libX11 ];
configureFlags = [] configureFlags = optional (!gifview) "--disable-gifview";
++ optional (!gifview) [ "--disable-gifview" ];
LDFLAGS = optional static "-static"; LDFLAGS = optionalString static "-static";
doCheck = true; doCheck = true;
checkPhase = '' checkPhase = ''

View File

@ -52,7 +52,7 @@ stdenv.mkDerivation {
configureFlags = [ configureFlags = [
"--with-ltdl-lib=${libtool.lib}/lib" "--with-ltdl-lib=${libtool.lib}/lib"
"--with-ltdl-include=${libtool}/include" "--with-ltdl-include=${libtool}/include"
] ++ stdenv.lib.optional (xorg == null) [ "--without-x" ]; ] ++ stdenv.lib.optional (xorg == null) "--without-x";
inherit patches; inherit patches;

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
hardeningEnable = [ "pie" ]; hardeningEnable = [ "pie" ];
configureFlags = [ "--chronyvardir=$(out)/var/lib/chrony" ] configureFlags = [ "--chronyvardir=$(out)/var/lib/chrony" ]
++ stdenv.lib.optional stdenv.isLinux [ "--enable-scfilter" ]; ++ stdenv.lib.optional stdenv.isLinux "--enable-scfilter";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Sets your computer's clock from time servers on the Net"; description = "Sets your computer's clock from time servers on the Net";

View File

@ -30,13 +30,9 @@ stdenv.mkDerivation rec {
"--disable-bundled-md5" "--disable-bundled-md5"
"--disable-dynamic-load" "--disable-dynamic-load"
"--enable-shared" "--enable-shared"
] ++ stdenv.lib.optional (libmaxminddb != null ) [ ] ++ stdenv.lib.optional (libmaxminddb != null) "--enable-mmdb"
"--enable-mmdb" ++ stdenv.lib.optional (geolite-legacy != null) "--with-geoip-db=${geolite-legacy}/share/GeoIP"
] ++ stdenv.lib.optional (geolite-legacy != null) [ ++ stdenv.lib.optional (ip2location-c != null) "--enable-ip2location";
"--with-geoip-db=${geolite-legacy}/share/GeoIP"
] ++ stdenv.lib.optional (ip2location-c != null ) [
"--enable-ip2location"
];
enableParallelBuilding = true; enableParallelBuilding = true;