From 313da176d35efefbcf36b41ec348c38403581e83 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 30 Oct 2019 12:34:47 +0100 Subject: treewide: NIX_*_FLAGS -> string --- pkgs/servers/amqp/qpid-cpp/default.nix | 2 +- pkgs/servers/computing/torque/default.nix | 4 +--- pkgs/servers/http/openresty/default.nix | 2 +- pkgs/servers/http/tengine/default.nix | 6 ++---- pkgs/servers/mail/opensmtpd/extras.nix | 7 +++---- pkgs/servers/mail/postfix/default.nix | 2 +- pkgs/servers/nosql/mongodb/default.nix | 2 +- 7 files changed, 10 insertions(+), 15 deletions(-) (limited to 'pkgs/servers') diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix index bb7f7def077e..97c1ec90ed12 100644 --- a/pkgs/servers/amqp/qpid-cpp/default.nix +++ b/pkgs/servers/amqp/qpid-cpp/default.nix @@ -33,7 +33,7 @@ let sed -i '/management/d' CMakeLists.txt ''; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" "-Wno-error=int-in-bool-context" "-Wno-error=maybe-uninitialized" diff --git a/pkgs/servers/computing/torque/default.nix b/pkgs/servers/computing/torque/default.nix index 5e78fe742ac3..8eb12a1b8112 100644 --- a/pkgs/servers/computing/torque/default.nix +++ b/pkgs/servers/computing/torque/default.nix @@ -25,9 +25,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # added to fix build with gcc7 - NIX_CFLAGS_COMPILE = [ - "-Wno-error" "-fpermissive" - ]; + NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive"; postPatch = '' substituteInPlace Makefile.am \ diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index 53773302963d..328db9ec9861 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip postgresql ]; nativeBuildInputs = [ perl ]; - NIX_CFLAGS_COMPILE = ["-I${libxml2.dev}/include/libxml2"]; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; preConfigure = '' patchShebangs . diff --git a/pkgs/servers/http/tengine/default.nix b/pkgs/servers/http/tengine/default.nix index 379a5c242f74..1467b1577f99 100644 --- a/pkgs/servers/http/tengine/default.nix +++ b/pkgs/servers/http/tengine/default.nix @@ -84,10 +84,8 @@ stdenv.mkDerivation rec { ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" ++ map (mod: "--add-module=${mod.src}") modules; - NIX_CFLAGS_COMPILE = [ - "-I${libxml2.dev}/include/libxml2" - "-Wno-error=implicit-fallthrough" - ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -Wno-error=implicit-fallthrough" + + optionalString stdenv.isDarwin " -Wno-error=deprecated-declarations"; preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); diff --git a/pkgs/servers/mail/opensmtpd/extras.nix b/pkgs/servers/mail/opensmtpd/extras.nix index f7ed6382a7be..5a5fc537d6eb 100644 --- a/pkgs/servers/mail/opensmtpd/extras.nix +++ b/pkgs/servers/mail/opensmtpd/extras.nix @@ -76,11 +76,10 @@ stdenv.mkDerivation rec { "--with-table-redis" ]; - NIX_CFLAGS_COMPILE = - stdenv.lib.optional enableRedis + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString enableRedis "-I${hiredis}/include/hiredis -lhiredis" - ++ stdenv.lib.optional enableMysql - "-L${libmysqlclient}/lib/mysql"; + + stdenv.lib.optionalString enableMysql + " -L${libmysqlclient}/lib/mysql"; meta = with stdenv.lib; { homepage = https://www.opensmtpd.org/; diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index b3345f9420cb..c0e6252a5518 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -79,7 +79,7 @@ in stdenv.mkDerivation rec { make makefiles CCARGS='${ccargs}' AUXLIBS='${auxlibs}' ''; - NIX_LDFLAGS = lib.optional withLDAP "-llber"; + NIX_LDFLAGS = lib.optionalString withLDAP "-llber"; installTargets = [ "non-interactive-package" ]; diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix index 4c4ac4c5cb63..c2ae83f3e8af 100644 --- a/pkgs/servers/nosql/mongodb/default.nix +++ b/pkgs/servers/nosql/mongodb/default.nix @@ -66,7 +66,7 @@ in stdenv.mkDerivation { --replace 'engine("wiredTiger")' 'engine("mmapv1")' ''; - NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unused-command-line-argument"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; sconsFlags = [ "--release" -- cgit 1.4.1