From ab0cfd9e036ca83bdffb8790f7cf45179441cd93 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 30 Oct 2019 01:40:49 +0100 Subject: [PATCH] treewide: NIX_*_COMPILE -> string --- pkgs/applications/audio/audacity/default.nix | 2 +- .../applications/graphics/ahoviewer/default.nix | 4 +--- .../graphics/gimp/plugins/default.nix | 4 ++-- .../networking/browsers/firefox/common.nix | 4 ++-- pkgs/applications/science/logic/avy/default.nix | 4 ++-- pkgs/applications/video/aegisub/default.nix | 4 +--- pkgs/applications/video/mplayer/default.nix | 4 ++-- .../core/gnome-settings-daemon/default.nix | 8 +++----- .../libraries/argp-standalone/default.nix | 2 +- .../libraries/aws-c-common/default.nix | 6 ++---- pkgs/development/libraries/glm/default.nix | 4 +--- pkgs/development/libraries/gpgme/default.nix | 4 ++-- pkgs/development/libraries/gsl/default.nix | 2 +- pkgs/development/libraries/gsl/gsl-1_16.nix | 2 +- .../development/libraries/libbluray/default.nix | 2 +- .../development/libraries/libunique/default.nix | 2 +- pkgs/development/libraries/opencv/3.x.nix | 2 +- .../libraries/qt-4.x/4.8/default.nix | 4 ++-- .../development/libraries/qt-5/mkDerivation.nix | 4 ++-- .../libraries/qt-5/modules/qtbase.nix | 17 +++++++---------- pkgs/development/libraries/tinyxml/2.6.2.nix | 2 +- pkgs/development/libraries/usbredir/default.nix | 2 +- .../libraries/wxwidgets/2.8/default.nix | 2 +- pkgs/games/airstrike/default.nix | 4 +--- pkgs/games/armagetronad/default.nix | 2 +- pkgs/servers/mail/archiveopteryx/default.nix | 2 +- pkgs/servers/nosql/arangodb/default.nix | 2 +- pkgs/servers/sql/postgresql/default.nix | 2 +- pkgs/tools/graphics/appleseed/default.nix | 2 +- pkgs/tools/graphics/asymptote/default.nix | 2 +- pkgs/tools/graphics/zbar/default.nix | 2 +- pkgs/tools/networking/altermime/default.nix | 3 ++- pkgs/tools/networking/atinout/default.nix | 2 +- pkgs/tools/video/mjpegtools/default.nix | 2 +- 34 files changed, 51 insertions(+), 65 deletions(-) diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 2fd3e5c27fe7..57e0c52e6406 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ]; # audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually - NIX_LDFLAGS = [ + NIX_LDFLAGS = toString [ # LAME "-lmp3lame" # ffmpeg diff --git a/pkgs/applications/graphics/ahoviewer/default.nix b/pkgs/applications/graphics/ahoviewer/default.nix index fb06266cdc59..87bddf9099ee 100644 --- a/pkgs/applications/graphics/ahoviewer/default.nix +++ b/pkgs/applications/graphics/ahoviewer/default.nix @@ -29,9 +29,7 @@ stdenv.mkDerivation rec { gst_all_1.gst-plugins-base ] ++ stdenv.lib.optional useUnrar unrar; - NIX_LDFLAGS = [ - "-lpthread" - ]; + NIX_LDFLAGS = "-lpthread"; postPatch = ''patchShebangs version.sh''; diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index fa29c979b050..0a06c42b5fc0 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -48,7 +48,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { url = https://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2; sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql"; }; - NIX_LDFLAGS = [ "-lm" ]; + NIX_LDFLAGS = "-lm"; patchPhase = '' sed -e 's,^\(GIMP_PLUGIN_DIR=\).*,\1'"$out/${gimp.name}-plugins", \ -e 's,^\(GIMP_DATA_DIR=\).*,\1'"$out/share/${gimp.name}", -i configure @@ -141,7 +141,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { Filters/Enhance/Wavelet sharpen */ name = "wavelet-sharpen-0.1.2"; - NIX_LDFLAGS = [ "-lm" ]; + NIX_LDFLAGS = "-lm"; src = fetchurl { url = http://registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz; sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw"; diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index d9dc0a4f7887..7b73027f203d 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -156,7 +156,7 @@ stdenv.mkDerivation rec { AVFoundation MediaToolbox CoreLocation Foundation libobjc AddressBook cups ]; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString ([ "-I${glib.dev}/include/gio-unix-2.0" ] ++ lib.optionals (!isTorBrowserLike) [ @@ -164,7 +164,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional (pname == "firefox-esr" && lib.versionAtLeast ffversion "68" && lib.versionOlder ffversion "69") - "-Wno-error=format-security"; + "-Wno-error=format-security"); postPatch = lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) '' substituteInPlace third_party/prio/prio/rand.c --replace 'nspr/prinit.h' 'prinit.h' diff --git a/pkgs/applications/science/logic/avy/default.nix b/pkgs/applications/science/logic/avy/default.nix index 9b59828ddab7..b43e0c6fbf1a 100644 --- a/pkgs/applications/science/logic/avy/default.nix +++ b/pkgs/applications/science/logic/avy/default.nix @@ -12,14 +12,14 @@ stdenv.mkDerivation { }; buildInputs = [ cmake zlib boost.out boost.dev ]; - NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ] + NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ] # Squelch endless stream of warnings on same few things ++ stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-empty-body" "-Wno-tautological-compare" "-Wc++11-compat-deprecated-writable-strings" "-Wno-deprecated" - ]; + ]); prePatch = '' sed -i -e '1i#include ' abc/src/bdd/dsd/dsd.h diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix index 83f7ebc29d19..123308babeae 100644 --- a/pkgs/applications/video/aegisub/default.nix +++ b/pkgs/applications/video/aegisub/default.nix @@ -108,9 +108,7 @@ stdenv.mkDerivation # this is fixed upstream though not yet in an officially released version, # should be fine remove on next release (if one ever happens) - NIX_LDFLAGS = [ - "-lpthread" - ]; + NIX_LDFLAGS = "-lpthread"; postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub"; diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index a75a7a11d67a..f5559e3fb6c0 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -195,11 +195,11 @@ stdenv.mkDerivation rec { echo CONFIG_MPEGAUDIODSP=yes >> config.mak ''; - NIX_LDFLAGS = with stdenv.lib; + NIX_LDFLAGS = with stdenv.lib; toString ( optional fontconfigSupport "-lfontconfig" ++ optional fribidiSupport "-lfribidi" ++ optionals x11Support [ "-lX11" "-lXext" ] - ; + ); installTargets = [ "install" ] ++ stdenv.lib.optional x11Support "install-gui"; diff --git a/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix b/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix index 36da3349c46a..c388c4f7211b 100644 --- a/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix @@ -99,11 +99,9 @@ stdenv.mkDerivation rec { "-Dudev_dir=${placeholder "out"}/lib/udev" ]; - NIX_CFLAGS_COMPILE = [ - # Default for release buildtype but passed manually because - # we're using plain - "-DG_DISABLE_CAST_CHECKS" - ]; + # Default for release buildtype but passed manually because + # we're using plain + NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS"; # So the polkit policy can reference /run/current-system/sw/bin/gnome-settings-daemon/gsd-backlight-helper postFixup = '' diff --git a/pkgs/development/libraries/argp-standalone/default.nix b/pkgs/development/libraries/argp-standalone/default.nix index 8fe3bd287c10..6544c4811875 100644 --- a/pkgs/development/libraries/argp-standalone/default.nix +++ b/pkgs/development/libraries/argp-standalone/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ patch-argp-fmtstream ] ++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [ patch-throw-in-funcdef patch-shared ]; - patchFlags = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "-p0"; + patchFlags = stdenv.lib.optional stdenv.hostPlatform.isDarwin "-p0"; preConfigure = stdenv.lib.optionalString stdenv.hostPlatform.isLinux "export CFLAGS='-fgnu89-inline'"; diff --git a/pkgs/development/libraries/aws-c-common/default.nix b/pkgs/development/libraries/aws-c-common/default.nix index 4286eedc87b2..b10797d3d56f 100644 --- a/pkgs/development/libraries/aws-c-common/default.nix +++ b/pkgs/development/libraries/aws-c-common/default.nix @@ -13,10 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ - "-Wno-nullability-extension" - "-Wno-typedef-redefinition" - ]; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + "-Wno-nullability-extension -Wno-typedef-redefinition"; meta = with lib; { description = "AWS SDK for C common core"; diff --git a/pkgs/development/libraries/glm/default.nix b/pkgs/development/libraries/glm/default.nix index 88b33601ee70..d39d6f0d7a36 100644 --- a/pkgs/development/libraries/glm/default.nix +++ b/pkgs/development/libraries/glm/default.nix @@ -27,9 +27,7 @@ stdenv.mkDerivation rec { cp ${gcc7PlatformPatch} glm/simd/platform.h ''; - NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.isDarwin [ - "-DGLM_COMPILER=0" - ]; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-DGLM_COMPILER=0"; postInstall = '' mkdir -p $doc/share/doc/glm diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 63072273c2ed..ed2b5563bd37 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -47,12 +47,12 @@ stdenv.mkDerivation rec { # fit in the limit. https://github.com/NixOS/nix/pull/1085 ++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ]; - NIX_CFLAGS_COMPILE = + NIX_CFLAGS_COMPILE = toString ( # qgpgme uses Q_ASSERT which retains build inputs at runtime unless # debugging is disabled lib.optional (qtbase != null) "-DQT_NO_DEBUG" # https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html - ++ lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; + ++ lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"); checkInputs = [ which ]; diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix index 1fd086ca23c7..966d6a8ffd5d 100644 --- a/pkgs/development/libraries/gsl/default.nix +++ b/pkgs/development/libraries/gsl/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html) - NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isx86_64 "-mno-fma"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isx86_64 "-mno-fma"; # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux"; diff --git a/pkgs/development/libraries/gsl/gsl-1_16.nix b/pkgs/development/libraries/gsl/gsl-1_16.nix index e5772c8772ec..ae102ac60307 100644 --- a/pkgs/development/libraries/gsl/gsl-1_16.nix +++ b/pkgs/development/libraries/gsl/gsl-1_16.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html) - NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isx86_64 "-mno-fma"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isx86_64 "-mno-fma"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libbluray/default.nix b/pkgs/development/libraries/libbluray/default.nix index 517251e137ef..daa349ca6309 100644 --- a/pkgs/development/libraries/libbluray/default.nix +++ b/pkgs/development/libraries/libbluray/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = optional withAACS libaacs; - NIX_LDFLAGS = [ + NIX_LDFLAGS = toString [ (optionalString withAACS "-L${libaacs}/lib -laacs") (optionalString withBDplus "-L${libbdplus}/lib -lbdplus") ]; diff --git a/pkgs/development/libraries/libunique/default.nix b/pkgs/development/libraries/libunique/default.nix index e0022411221d..d6566978a6bb 100644 --- a/pkgs/development/libraries/libunique/default.nix +++ b/pkgs/development/libraries/libunique/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; # Patches from Gentoo portage patches = [ diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 97df84637ef7..642facf166a6 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -208,7 +208,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake pkgconfig unzip ]; - NIX_CFLAGS_COMPILE = lib.optional enableEXR "-I${ilmbase.dev}/include/OpenEXR"; + NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; # Configure can't find the library without this. OpenBLAS_HOME = lib.optionalString enableOpenblas openblas; diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 632b5fc1fd5e..25953949eb76 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -206,13 +206,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = + NIX_CFLAGS_COMPILE = toString ( # with gcc7 the warnings blow the log over Hydra's limit [ "-Wno-expansion-to-defined" "-Wno-unused-local-typedefs" ] ++ lib.optional stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin ++ lib.optionals (stdenv.isFreeBSD || stdenv.isDarwin) [ "-I${glib.dev}/include/glib-2.0" "-I${glib.out}/lib/glib-2.0/include" ] - ++ lib.optional stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + ++ lib.optional stdenv.isDarwin "-I${libcxx}/include/c++/v1"); NIX_LDFLAGS = lib.optionalString (stdenv.isFreeBSD || stdenv.isDarwin) "-lglib-2.0"; diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix index 95357c096dfd..2c6333cb0204 100644 --- a/pkgs/development/libraries/qt-5/mkDerivation.nix +++ b/pkgs/development/libraries/qt-5/mkDerivation.nix @@ -12,9 +12,9 @@ let qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ] ++ (args.qmakeFlags or []); - NIX_CFLAGS_COMPILE = + NIX_CFLAGS_COMPILE = toString ( optional (!debug) "-DQT_NO_DEBUG" - ++ lib.toList (args.NIX_CFLAGS_COMPILE or []); + ++ lib.toList (args.NIX_CFLAGS_COMPILE or [])); cmakeFlags = (args.cmakeFlags or []) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index c7cb6d509dc2..cd426884d12d 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -200,20 +200,17 @@ stdenv.mkDerivation { done ''; - NIX_CFLAGS_COMPILE = - [ - "-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields - ''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"'' - ''-D${if compareVersion "5.11.0" >= 0 then "LIBRESOLV_SO" else "NIXPKGS_LIBRESOLV"}="${stdenv.cc.libc.out}/lib/libresolv"'' - ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' - ] - - ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"'' + NIX_CFLAGS_COMPILE = toString ([ + "-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields + ''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"'' + ''-D${if compareVersion "5.11.0" >= 0 then "LIBRESOLV_SO" else "NIXPKGS_LIBRESOLV"}="${stdenv.cc.libc.out}/lib/libresolv"'' + ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' + ] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"'' ++ lib.optionals withGtk3 [ ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"'' ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"'' ] - ++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC"; + ++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC"); prefixKey = "-prefix "; diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix index cc7c996f7c3a..0cc4038b64e7 100644 --- a/pkgs/development/libraries/tinyxml/2.6.2.nix +++ b/pkgs/development/libraries/tinyxml/2.6.2.nix @@ -28,7 +28,7 @@ in stdenv.mkDerivation { hardeningDisable = [ "format" ]; NIX_CFLAGS_COMPILE = - stdenv.lib.optional stdenv.isDarwin "-mmacosx-version-min=10.9"; + stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; buildInputs = [ unzip ]; buildPhase = '' diff --git a/pkgs/development/libraries/usbredir/default.nix b/pkgs/development/libraries/usbredir/default.nix index 2eee80a76969..8e43135196c9 100644 --- a/pkgs/development/libraries/usbredir/default.nix +++ b/pkgs/development/libraries/usbredir/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"; }; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libusb ]; diff --git a/pkgs/development/libraries/wxwidgets/2.8/default.nix b/pkgs/development/libraries/wxwidgets/2.8/default.nix index 38ee4376ac2d..73dac47307a9 100644 --- a/pkgs/development/libraries/wxwidgets/2.8/default.nix +++ b/pkgs/development/libraries/wxwidgets/2.8/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { + optionalString withMesa "${libGLU.out}/lib ${libGL.out}/lib "; # Work around a bug in configure. - NIX_CFLAGS_COMPILE = [ "-DHAVE_X11_XLIB_H=1" "-lX11" "-lcairo" "-Wno-narrowing" ]; + NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1 -lX11 -lcairo -Wno-narrowing"; preConfigure = " substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE=' diff --git a/pkgs/games/airstrike/default.nix b/pkgs/games/airstrike/default.nix index 19d2a01b4729..408f2817854a 100644 --- a/pkgs/games/airstrike/default.nix +++ b/pkgs/games/airstrike/default.nix @@ -11,9 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper SDL SDL_image ]; - NIX_LDFLAGS = [ - "-lm" - ]; + NIX_LDFLAGS = "-lm"; installPhase = '' ls -l diff --git a/pkgs/games/armagetronad/default.nix b/pkgs/games/armagetronad/default.nix index edb739125c01..57373d39b54c 100644 --- a/pkgs/games/armagetronad/default.nix +++ b/pkgs/games/armagetronad/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { sha256 = "157pp84wf0q3bdb72rnbm3ck0czwx2ply6lyhj8z7kfdc7csdbr3"; }; - NIX_LDFLAGS = [ "-lSDL_image" ]; + NIX_LDFLAGS = "-lSDL_image"; enableParallelBuilding = true; diff --git a/pkgs/servers/mail/archiveopteryx/default.nix b/pkgs/servers/mail/archiveopteryx/default.nix index 3443a508aea4..55cc4c121f0f 100644 --- a/pkgs/servers/mail/archiveopteryx/default.nix +++ b/pkgs/servers/mail/archiveopteryx/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { ''; # fix build on gcc7+ - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = builtins.toString [ "-Wno-error=builtin-declaration-mismatch" "-Wno-error=implicit-fallthrough" "-Wno-error=deprecated-copy" diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix index ef75dad91517..e41930a2f485 100644 --- a/pkgs/servers/nosql/arangodb/default.nix +++ b/pkgs/servers/nosql/arangodb/default.nix @@ -17,7 +17,7 @@ let # prevent failing with "cmake-3.13.4/nix-support/setup-hook: line 10: ./3rdParty/rocksdb/RocksDBConfig.cmake.in: No such file or directory" dontFixCmake = lib.versionAtLeast version "3.5"; - NIX_CFLAGS_COMPILE = lib.optionals (lib.versionAtLeast version "3.5") [ "-Wno-error" ]; + NIX_CFLAGS_COMPILE = lib.optionalString (lib.versionAtLeast version "3.5") "-Wno-error"; preConfigure = lib.optionalString (lib.versionAtLeast version "3.5") "patchShebangs utils"; postPatch = '' diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 440375db841d..3f05b3e36c19 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -44,7 +44,7 @@ let buildFlags = [ "world" ]; - NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ]; + NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; # Otherwise it retains a reference to compiler and fails; see #44767. TODO: better. preConfigure = "CC=${stdenv.cc.targetPrefix}cc"; diff --git a/pkgs/tools/graphics/appleseed/default.nix b/pkgs/tools/graphics/appleseed/default.nix index d45c28528e72..cafe0bb7b11a 100644 --- a/pkgs/tools/graphics/appleseed/default.nix +++ b/pkgs/tools/graphics/appleseed/default.nix @@ -24,7 +24,7 @@ in stdenv.mkDerivation rec { osl seexpr makeWrapper ]; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-I${openexr.dev}/include/OpenEXR" "-I${ilmbase.dev}/include/OpenEXR" "-I${openimageio.dev}/include/OpenImageIO" diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 14b15686d720..31bdba26783e 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { "--with-context=$out/share/texmf/tex/context/third" ]; - NIX_CFLAGS_COMPILE = [ "-I${boehmgc.dev}/include/gc" ]; + NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; postInstall = '' mv $out/share/info/asymptote/*.info $out/share/info/ diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index 9a071e6150f9..7610b4e56fb0 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ]; # Disable assertions which include -dev QtBase file paths. - NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ]; + NIX_CFLAGS_COMPILE = "-DQT_NO_DEBUG"; configureFlags = [ "--without-python" diff --git a/pkgs/tools/networking/altermime/default.nix b/pkgs/tools/networking/altermime/default.nix index e9091086ed98..b1481b2208c6 100644 --- a/pkgs/tools/networking/altermime/default.nix +++ b/pkgs/tools/networking/altermime/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { sha256 = "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"; }; - NIX_CFLAGS_COMPILE = [ "-Wno-error=format" + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=format" "-Wno-error=format-truncation" "-Wno-error=pointer-compare" "-Wno-error=memset-elt-size" diff --git a/pkgs/tools/networking/atinout/default.nix b/pkgs/tools/networking/atinout/default.nix index 175ba3960eef..16b3ee668da6 100644 --- a/pkgs/tools/networking/atinout/default.nix +++ b/pkgs/tools/networking/atinout/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "atinout-${version}"; version = "0.9.2-alpha"; - NIX_CFLAGS_COMPILE = [ "-Werror=implicit-fallthrough=0" ]; + NIX_CFLAGS_COMPILE = "-Werror=implicit-fallthrough=0"; LANG = "C.UTF-8"; nativeBuildInputs = [ ronn mount ]; diff --git a/pkgs/tools/video/mjpegtools/default.nix b/pkgs/tools/video/mjpegtools/default.nix index 31d26a6c72a3..3e72d8b8af59 100644 --- a/pkgs/tools/video/mjpegtools/default.nix +++ b/pkgs/tools/video/mjpegtools/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ libdv libjpeg libpng ] ++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ]; - NIX_CFLAGS_COMPILE = lib.optional (!withMinimal) "-I${SDL.dev}/include/SDL"; + NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${SDL.dev}/include/SDL"; postPatch = '' sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure