From f9f46dc327c7e659e84d558f1309e16e16e8245a Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 30 Oct 2019 03:23:29 +0100 Subject: [PATCH] treewide: NIX_*_FLAGS -> string --- pkgs/applications/audio/jack-rack/default.nix | 6 +----- pkgs/applications/audio/jamin/default.nix | 2 +- pkgs/applications/audio/lash/default.nix | 6 +----- .../display-managers/lightdm/gtk-greeter.nix | 2 +- pkgs/applications/gis/grass/default.nix | 2 +- pkgs/applications/graphics/gnuclad/default.nix | 2 +- pkgs/applications/graphics/goxel/default.nix | 4 +--- pkgs/applications/graphics/gqview/default.nix | 4 +--- pkgs/applications/graphics/k3d/default.nix | 4 +--- pkgs/applications/misc/golden-cheetah/default.nix | 2 +- pkgs/applications/misc/grip/default.nix | 2 +- pkgs/applications/misc/gxneur/default.nix | 2 +- pkgs/applications/misc/k2pdfopt/default.nix | 4 +--- pkgs/applications/office/gnucash/default.nix | 2 +- pkgs/applications/video/handbrake/default.nix | 4 ++-- pkgs/applications/video/kino/default.nix | 5 +---- pkgs/development/compilers/openjdk/default.nix | 6 +++--- pkgs/development/compilers/openjdk/openjfx/12.nix | 2 +- .../haskell-modules/configuration-nix.nix | 6 +++--- pkgs/development/interpreters/gnu-apl/default.nix | 4 ++-- pkgs/development/interpreters/jimtcl/default.nix | 2 +- pkgs/development/interpreters/love/0.8.nix | 2 +- pkgs/development/interpreters/love/11.1.nix | 2 +- pkgs/development/libraries/libcbor/default.nix | 2 +- pkgs/development/libraries/libdynd/default.nix | 2 +- pkgs/development/libraries/libfakekey/default.nix | 4 +--- pkgs/development/libraries/libfpx/default.nix | 2 +- pkgs/development/libraries/libmatchbox/default.nix | 4 +--- pkgs/development/libraries/libwps/default.nix | 2 +- .../libraries/mediastreamer/default.nix | 2 +- pkgs/development/libraries/mlt/qt-5.nix | 2 +- pkgs/development/libraries/xmlsec/default.nix | 2 +- pkgs/development/tools/misc/hydra/default.nix | 2 +- pkgs/development/tools/parsing/ragel/default.nix | 2 +- pkgs/games/gnujump/default.nix | 4 +--- pkgs/games/gzdoom/default.nix | 2 +- pkgs/misc/emulators/wine/base.nix | 4 ++-- pkgs/os-specific/linux/kernel/perf.nix | 14 +++++++------- pkgs/os-specific/linux/lttng-modules/default.nix | 2 +- pkgs/os-specific/linux/pktgen/default.nix | 2 +- pkgs/os-specific/linux/sysdig/default.nix | 5 +---- pkgs/tools/audio/gvolicon/default.nix | 2 +- pkgs/tools/filesystems/irods/default.nix | 7 ++----- pkgs/tools/misc/ldmtool/default.nix | 2 +- pkgs/tools/security/gpgstats/default.nix | 4 ++-- pkgs/tools/text/sgml/jade/default.nix | 2 +- pkgs/top-level/perl-packages.nix | 4 ++-- 47 files changed, 63 insertions(+), 94 deletions(-) diff --git a/pkgs/applications/audio/jack-rack/default.nix b/pkgs/applications/audio/jack-rack/default.nix index 26a717dbd6e4..41b40223b87f 100644 --- a/pkgs/applications/audio/jack-rack/default.nix +++ b/pkgs/applications/audio/jack-rack/default.nix @@ -7,11 +7,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libjack2 ladspaH gtk2 alsaLib libxml2 librdf ]; - NIX_LDFLAGS = [ - "-ldl" - "-lm" - "-lpthread" - ]; + NIX_LDFLAGS = "-ldl -lm -lpthread"; meta = { description = ''An effects "rack" for the JACK low latency audio API''; diff --git a/pkgs/applications/audio/jamin/default.nix b/pkgs/applications/audio/jamin/default.nix index 3511a08682c3..818630585cfd 100644 --- a/pkgs/applications/audio/jamin/default.nix +++ b/pkgs/applications/audio/jamin/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { buildInputs = [ fftwFloat gtk2 ladspaPlugins libjack2 liblo libxml2 makeWrapper ] ++ (with perlPackages; [ perl XMLParser ]); - NIX_LDFLAGS = [ "-ldl" ]; + NIX_LDFLAGS = "-ldl"; postInstall = '' wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa diff --git a/pkgs/applications/audio/lash/default.nix b/pkgs/applications/audio/lash/default.nix index e96972b0d1b1..0dbe60b6a615 100644 --- a/pkgs/applications/audio/lash/default.nix +++ b/pkgs/applications/audio/lash/default.nix @@ -18,11 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ alsaLib gtk2 libjack2 libxml2 makeWrapper pkgconfig readline ]; propagatedBuildInputs = [ libuuid ]; - NIX_LDFLAGS = [ - "-lm" - "-lpthread" - "-luuid" - ]; + NIX_LDFLAGS = "-lm -lpthread -luuid"; postInstall = '' for i in lash_control lash_panel diff --git a/pkgs/applications/display-managers/lightdm/gtk-greeter.nix b/pkgs/applications/display-managers/lightdm/gtk-greeter.nix index 91fe3e5b22f2..be586bdac9bc 100644 --- a/pkgs/applications/display-managers/lightdm/gtk-greeter.nix +++ b/pkgs/applications/display-managers/lightdm/gtk-greeter.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { configureFlagsArray+=( --enable-at-spi-command="${at-spi2-core}/libexec/at-spi-bus-launcher --launch-immediately" ) ''; - NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ]; + NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; installFlags = [ "localstatedir=\${TMPDIR}" diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 4000c834602b..8734fabfdcf9 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { done ''; - NIX_CFLAGS_COMPILE = [ "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1" ]; + NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; postInstall = '' wrapProgram $out/bin/grass76 \ diff --git a/pkgs/applications/graphics/gnuclad/default.nix b/pkgs/applications/graphics/gnuclad/default.nix index 2535f7514f1d..5b6dd42e09e5 100644 --- a/pkgs/applications/graphics/gnuclad/default.nix +++ b/pkgs/applications/graphics/gnuclad/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "0ka2kscpjff7gflsargv3r9fdaxhkf3nym9mfaln3pnq6q7fwdki"; }; - NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ]; + NIX_CFLAGS_COMPILE = "-Wno-error=catch-value"; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/applications/graphics/goxel/default.nix b/pkgs/applications/graphics/goxel/default.nix index e4ab5639ba66..e870df4bc6ef 100644 --- a/pkgs/applications/graphics/goxel/default.nix +++ b/pkgs/applications/graphics/goxel/default.nix @@ -16,9 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ scons pkgconfig wrapGAppsHook ]; buildInputs = [ glfw3 gtk3 libpng12 ]; - NIX_LDFLAGS = [ - "-lpthread" - ]; + NIX_LDFLAGS = "-lpthread"; buildPhase = '' make release diff --git a/pkgs/applications/graphics/gqview/default.nix b/pkgs/applications/graphics/gqview/default.nix index 205376b1257c..d82238f925b3 100644 --- a/pkgs/applications/graphics/gqview/default.nix +++ b/pkgs/applications/graphics/gqview/default.nix @@ -18,9 +18,7 @@ stdenv.mkDerivation { hardeningDisable = [ "format" ]; - NIX_LDFLAGS = [ - "-lm" - ]; + NIX_LDFLAGS = "-lm"; meta = with stdenv.lib; { description = "A fast image viewer"; diff --git a/pkgs/applications/graphics/k3d/default.nix b/pkgs/applications/graphics/k3d/default.nix index d3bc8deb05e0..31085cd8023d 100644 --- a/pkgs/applications/graphics/k3d/default.nix +++ b/pkgs/applications/graphics/k3d/default.nix @@ -39,9 +39,7 @@ stdenv.mkDerivation rec { #doCheck = false; - NIX_CFLAGS_COMPILE = [ - "-Wno-deprecated-declarations" - ]; + NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; meta = with stdenv.lib; { description = "A 3D editor with support for procedural editing"; diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix index dde1c32e805f..3dffc5c77c2a 100644 --- a/pkgs/applications/misc/golden-cheetah/default.nix +++ b/pkgs/applications/misc/golden-cheetah/default.nix @@ -31,7 +31,7 @@ in mkDerivation rec { ]; nativeBuildInputs = [ flex makeWrapper qmake yacc ]; - NIX_LDFLAGS = [ "-lz" ]; + NIX_LDFLAGS = "-lz"; qtWrapperArgs = [ "--set LD_LIBRARY_PATH ${zlib.out}/lib" ]; diff --git a/pkgs/applications/misc/grip/default.nix b/pkgs/applications/misc/grip/default.nix index 36ca31707c8a..4416e1e62c2d 100644 --- a/pkgs/applications/misc/grip/default.nix +++ b/pkgs/applications/misc/grip/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; meta = { description = "GTK-based audio CD player/ripper"; diff --git a/pkgs/applications/misc/gxneur/default.nix b/pkgs/applications/misc/gxneur/default.nix index 6e6145e79086..c44523a8b751 100644 --- a/pkgs/applications/misc/gxneur/default.nix +++ b/pkgs/applications/misc/gxneur/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { }; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; nativeBuildInputs = [ pkgconfig intltool ]; buildInputs = [ diff --git a/pkgs/applications/misc/k2pdfopt/default.nix b/pkgs/applications/misc/k2pdfopt/default.nix index aedfff40d702..69d78575e2a3 100644 --- a/pkgs/applications/misc/k2pdfopt/default.nix +++ b/pkgs/applications/misc/k2pdfopt/default.nix @@ -65,9 +65,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_C_FLAGS=-I${src}/include_mod" ]; - NIX_LDFLAGS = [ - "-lpthread" - ]; + NIX_LDFLAGS = "-lpthread"; installPhase = '' install -D -m 755 k2pdfopt $out/bin/k2pdfopt diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index d8fbd4392bdb..4373278adab0 100644 --- a/pkgs/applications/office/gnucash/default.nix +++ b/pkgs/applications/office/gnucash/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { propagatedUserEnvPkgs = [ dconf ]; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; patches = [ ./cmake_check_symbol_exists.patch ]; diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix index 4341055d084b..59a8c2377ce9 100644 --- a/pkgs/applications/video/handbrake/default.nix +++ b/pkgs/applications/video/handbrake/default.nix @@ -100,9 +100,9 @@ stdenv.mkDerivation rec { ]; # NOTE: 2018-12-27: Check NixOS HandBrake test if changing - NIX_LDFLAGS = [ + NIX_LDFLAGS = toString [ "-lx265" - # NOTE: The -ldl flag was fixed upstream for a release after 1.3.0 + # NOTE: The -ldl flag was fixed upstream for a release after 1.3.0 "-ldl" ]; diff --git a/pkgs/applications/video/kino/default.nix b/pkgs/applications/video/kino/default.nix index 1b9f0d0997a0..2a0af3ed59e4 100644 --- a/pkgs/applications/video/kino/default.nix +++ b/pkgs/applications/video/kino/default.nix @@ -71,10 +71,7 @@ stdenv.mkDerivation { hardeningDisable = [ "format" ]; - NIX_LDFLAGS = [ - "-lavcodec" - "-lavutil" - ]; + NIX_LDFLAGS = "-lavcodec -lavutil"; patches = [ ./kino-1.3.4-v4l1.patch ./kino-1.3.4-libav-0.7.patch ./kino-1.3.4-libav-0.8.patch ]; #./kino-1.3.4-libavcodec-pkg-config.patch ]; diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix index 03121daf961f..b2d511173c45 100644 --- a/pkgs/development/compilers/openjdk/default.nix +++ b/pkgs/development/compilers/openjdk/default.nix @@ -69,13 +69,13 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + NIX_CFLAGS_COMPILE = "-Wno-error"; - NIX_LDFLAGS = lib.optionals (!headless) [ + NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" ] ++ lib.optionals (!headless && enableGnome2) [ "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" - ]; + ]); buildFlags = [ "all" ]; diff --git a/pkgs/development/compilers/openjdk/openjfx/12.nix b/pkgs/development/compilers/openjdk/openjfx/12.nix index 356ac4800d9f..30c8d36fdfca 100644 --- a/pkgs/development/compilers/openjdk/openjfx/12.nix +++ b/pkgs/development/compilers/openjdk/openjfx/12.nix @@ -84,7 +84,7 @@ in makePackage { ''; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; stripDebugList = [ "." ]; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 6886a35c0a80..9eedb0fed855 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -115,18 +115,18 @@ self: super: builtins.intersectAttrs super { hzk = overrideCabal super.hzk (drv: { preConfigure = "sed -i -e /include-dirs/d hzk.cabal"; - configureFlags = "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper"; + configureFlags = [ "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" ]; }); haskakafka = overrideCabal super.haskakafka (drv: { preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d haskakafka.cabal"; - configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; + configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ]; }); # library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32 hw-kafka-client = dontCheck (overrideCabal super.hw-kafka-client (drv: { preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal"; - configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; + configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ]; })); # Foreign dependency name clashes with another Haskell package. diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix index 94ec02443823..c2a3556cfea2 100644 --- a/pkgs/development/interpreters/gnu-apl/default.nix +++ b/pkgs/development/interpreters/gnu-apl/default.nix @@ -12,12 +12,12 @@ stdenv.mkDerivation rec { buildInputs = [ readline gettext ncurses ]; # Needed with GCC 8 - NIX_CFLAGS_COMPILE = with stdenv.lib; (optionals stdenv.cc.isGNU [ + NIX_CFLAGS_COMPILE = with stdenv.lib; toString ((optionals stdenv.cc.isGNU [ "-Wno-error=int-in-bool-context" "-Wno-error=class-memaccess" "-Wno-error=restrict" "-Wno-error=format-truncation" - ]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference"; + ]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference"); patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h" diff --git a/pkgs/development/interpreters/jimtcl/default.nix b/pkgs/development/interpreters/jimtcl/default.nix index 09d7fa622fc1..d803fe43fd7a 100644 --- a/pkgs/development/interpreters/jimtcl/default.nix +++ b/pkgs/development/interpreters/jimtcl/default.nix @@ -35,7 +35,7 @@ in stdenv.mkDerivation rec { "--ipv6" ]; - NIX_CFLAGS_COMPILE = makeSDLFlags [ SDL SDL_gfx ]; + NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ SDL SDL_gfx ]); enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/love/0.8.nix b/pkgs/development/interpreters/love/0.8.nix index 57c1a6ce5641..3a6c385ee5fc 100644 --- a/pkgs/development/interpreters/love/0.8.nix +++ b/pkgs/development/interpreters/love/0.8.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { } || true ''; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-I${SDL.dev}/include/SDL" "-I${freetype.dev}include/freetype2" "-DGL_GLEXT_PROTOTYPES" # https://community.khronos.org/t/glgenbuffers-was-not-declared-in-this-scope/59283/2 diff --git a/pkgs/development/interpreters/love/11.1.nix b/pkgs/development/interpreters/love/11.1.nix index 0a60a4cacfe7..3629345baf6a 100644 --- a/pkgs/development/interpreters/love/11.1.nix +++ b/pkgs/development/interpreters/love/11.1.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { "--with-lua=luajit" ]; - NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3 + NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 meta = { homepage = http://love2d.org; diff --git a/pkgs/development/libraries/libcbor/default.nix b/pkgs/development/libraries/libcbor/default.nix index 4d56c0f1403b..4949d657669b 100644 --- a/pkgs/development/libraries/libcbor/default.nix +++ b/pkgs/development/libraries/libcbor/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error - NIX_CFLAGS_COMPILE = [ "-fno-lto" ]; + NIX_CFLAGS_COMPILE = "-fno-lto"; meta = with stdenv.lib; { description = "CBOR protocol implementation for C and others"; diff --git a/pkgs/development/libraries/libdynd/default.nix b/pkgs/development/libraries/libdynd/default.nix index bc4928153397..c02a6f9a5025 100644 --- a/pkgs/development/libraries/libdynd/default.nix +++ b/pkgs/development/libraries/libdynd/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { ]; # added to fix build with gcc7+ - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = builtins.toString [ "-Wno-error=implicit-fallthrough" "-Wno-error=nonnull" "-Wno-error=tautological-compare" diff --git a/pkgs/development/libraries/libfakekey/default.nix b/pkgs/development/libraries/libfakekey/default.nix index 196f0e50bef8..3c2431915433 100644 --- a/pkgs/development/libraries/libfakekey/default.nix +++ b/pkgs/development/libraries/libfakekey/default.nix @@ -11,9 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libX11 libXi libXtst xorgproto ]; - NIX_LDFLAGS = [ - "-lX11" - ]; + NIX_LDFLAGS = "-lX11"; meta = with stdenv.lib; { description = "X virtual keyboard library"; diff --git a/pkgs/development/libraries/libfpx/default.nix b/pkgs/development/libraries/libfpx/default.nix index f4863eb33f26..97df5107409a 100644 --- a/pkgs/development/libraries/libfpx/default.nix +++ b/pkgs/development/libraries/libfpx/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # Darwin gets misdetected as Windows without this - NIX_CFLAGS_COMPILE = if stdenv.isDarwin then "-D__unix" else null; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-D__unix"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libmatchbox/default.nix b/pkgs/development/libraries/libmatchbox/default.nix index 3786c5e77d3a..98875e48f57f 100644 --- a/pkgs/development/libraries/libmatchbox/default.nix +++ b/pkgs/development/libraries/libmatchbox/default.nix @@ -6,9 +6,7 @@ stdenv.mkDerivation rec { buildInputs = [ libXft libICE pango libjpeg ]; propagatedBuildInputs = [ libX11 libXext libpng ]; - NIX_LDFLAGS = [ - "-lX11" - ]; + NIX_LDFLAGS = "-lX11"; src = fetchurl { url = "https://downloads.yoctoproject.org/releases/matchbox/libmatchbox/${version}/libmatchbox-${version}.tar.bz2"; diff --git a/pkgs/development/libraries/libwps/default.nix b/pkgs/development/libraries/libwps/default.nix index e8f397548853..61b777a52433 100644 --- a/pkgs/development/libraries/libwps/default.nix +++ b/pkgs/development/libraries/libwps/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ boost librevenge zlib ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; # newly detected by gcc-7 + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough"; meta = with stdenv.lib; { homepage = http://libwps.sourceforge.net/; diff --git a/pkgs/development/libraries/mediastreamer/default.nix b/pkgs/development/libraries/mediastreamer/default.nix index ca62391e7815..0204223d127c 100644 --- a/pkgs/development/libraries/mediastreamer/default.nix +++ b/pkgs/development/libraries/mediastreamer/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { ortp libv4l libpcap srtp bctoolbox libXext libmatroska ]; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-DGIT_VERSION=\"v${version}\"" "-Wno-error=deprecated-declarations" "-Wno-error=cast-function-type" diff --git a/pkgs/development/libraries/mlt/qt-5.nix b/pkgs/development/libraries/mlt/qt-5.nix index f017e4452a64..0e3750df415a 100644 --- a/pkgs/development/libraries/mlt/qt-5.nix +++ b/pkgs/development/libraries/mlt/qt-5.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { # mlt is unable to cope with our multi-prefix Qt build # because it does not use CMake or qmake. - NIX_CFLAGS_COMPILE = [ "-I${getDev qtsvg}/include/QtSvg" ]; + NIX_CFLAGS_COMPILE = "-I${getDev qtsvg}/include/QtSvg"; CXXFLAGS = "-std=c++11"; diff --git a/pkgs/development/libraries/xmlsec/default.nix b/pkgs/development/libraries/xmlsec/default.nix index 25c5bf458887..a8c751330b7c 100644 --- a/pkgs/development/libraries/xmlsec/default.nix +++ b/pkgs/development/libraries/xmlsec/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation { configureFlags = [ "--enable-soap" ]; # otherwise libxmlsec1-gnutls.so won't find libgcrypt.so, after #909 - NIX_LDFLAGS = [ "-lgcrypt" ]; + NIX_LDFLAGS = "-lgcrypt"; postInstall = '' moveToOutput "bin/xmlsec1-config" "$dev" diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index e0ebba4c0516..3e5c12e183aa 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -102,7 +102,7 @@ in stdenv.mkDerivation rec { configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; - NIX_CFLAGS_COMPILE = [ "-pthread" ]; + NIX_CFLAGS_COMPILE = "-pthread"; shellHook = '' PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix index 2f4db7982b71..12c9b9d57f8f 100644 --- a/pkgs/development/tools/parsing/ragel/default.nix +++ b/pkgs/development/tools/parsing/ragel/default.nix @@ -21,7 +21,7 @@ let configureFlags = [ "--with-colm=${colm}" ]; - NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isGNU "-std=gnu++98"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-std=gnu++98"; doCheck = true; diff --git a/pkgs/games/gnujump/default.nix b/pkgs/games/gnujump/default.nix index 4bf460836d98..af2e924960a1 100644 --- a/pkgs/games/gnujump/default.nix +++ b/pkgs/games/gnujump/default.nix @@ -9,9 +9,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ SDL SDL_image SDL_mixer ]; - NIX_LDFLAGS = [ - "-lm" - ]; + NIX_LDFLAGS = "-lm"; meta = with stdenv.lib; { homepage = https://jump.gnu.sinusoid.es/index.php?title=Main_Page; diff --git a/pkgs/games/gzdoom/default.nix b/pkgs/games/gzdoom/default.nix index 288d3369dfb7..5cafe045fa6a 100644 --- a/pkgs/games/gzdoom/default.nix +++ b/pkgs/games/gzdoom/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ]; + NIX_CFLAGS_LINK = "-lopenal -lfluidsynth"; preConfigure = '' sed -i \ diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index 057615a79a14..0b6eab70263f 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -71,12 +71,12 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { # Wine locates a lot of libraries dynamically through dlopen(). Add # them to the RPATH so that the user doesn't have to set them in # LD_LIBRARY_PATH. - NIX_LDFLAGS = map (path: "-rpath " + path) ( + NIX_LDFLAGS = toString (map (path: "-rpath " + path) ( map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ] ++ buildInputs) # libpulsecommon.so is linked but not found otherwise ++ lib.optionals supportFlags.pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio") (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ]))) - ); + )); # Don't shrink the ELF RPATHs in order to keep the extra RPATH # elements specified above. diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index faf6dabc2276..9f32e3e37ddb 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -46,13 +46,13 @@ stdenv.mkDerivation { # Note: we don't add elfutils to buildInputs, since it provides a # bad `ld' and other stuff. - NIX_CFLAGS_COMPILE = - [ "-Wno-error=cpp" - "-Wno-error=bool-compare" - "-Wno-error=deprecated-declarations" - "-DOBJDUMP_PATH=\"${binutils}/bin/objdump\"" - "-Wno-error=stringop-truncation" - ]; + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=cpp" + "-Wno-error=bool-compare" + "-Wno-error=deprecated-declarations" + "-DOBJDUMP_PATH=\"${binutils}/bin/objdump\"" + "-Wno-error=stringop-truncation" + ]; doCheck = false; # requires "sparse" doInstallCheck = false; # same diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index d4b3f374c5bc..46c8dec8889f 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-function-declaration" ]; + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; preConfigure = '' export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index fd57fa6e37ce..aec347ff3751 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { RTE_TARGET = "x86_64-native-linuxapp-gcc"; GUI = stdenv.lib.optionalString withGtk "true"; - NIX_CFLAGS_COMPILE = [ "-msse3" ]; + NIX_CFLAGS_COMPILE = "-msse3"; postPatch = let dpdkMajor = lib.versions.major dpdk.version; in '' substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 0d85e6e3a57f..4008045938ee 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -28,10 +28,7 @@ stdenv.mkDerivation rec { ] ++ optional (kernel == null) "-DBUILD_DRIVER=OFF"; # needed since luajit-2.1.0-beta3 - NIX_CFLAGS_COMPILE = [ - "-DluaL_reg=luaL_Reg" - "-DluaL_getn(L,i)=((int)lua_objlen(L,i))" - ]; + NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))"; preConfigure = '' cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl") diff --git a/pkgs/tools/audio/gvolicon/default.nix b/pkgs/tools/audio/gvolicon/default.nix index c66c6bc1f7e0..9029eb38b06f 100644 --- a/pkgs/tools/audio/gvolicon/default.nix +++ b/pkgs/tools/audio/gvolicon/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { makeFlags = [ "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = [ "-D_POSIX_C_SOURCE" ]; + NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE"; meta = { description = "A simple and lightweight volume icon that sits in your system tray"; diff --git a/pkgs/tools/filesystems/irods/default.nix b/pkgs/tools/filesystems/irods/default.nix index 56fc2e40ba2f..b6099c099f32 100644 --- a/pkgs/tools/filesystems/irods/default.nix +++ b/pkgs/tools/filesystems/irods/default.nix @@ -30,11 +30,8 @@ in rec { # but we don't use /usr with nix, so remove only 2 items. patches = [ ./irods_root_path.patch ]; - NIX_CFLAGS_COMPILE = [ - # fix build with recent llvm versions - "-Wno-deprecated-register" - "-Wno-deprecated-declarations" - ]; + # fix build with recent llvm versions + NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations"; preConfigure = common.preConfigure + '' patchShebangs ./test diff --git a/pkgs/tools/misc/ldmtool/default.nix b/pkgs/tools/misc/ldmtool/default.nix index d1d3996bd620..734586fb1ab3 100644 --- a/pkgs/tools/misc/ldmtool/default.nix +++ b/pkgs/tools/misc/ldmtool/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; configureScript = "sh autogen.sh"; diff --git a/pkgs/tools/security/gpgstats/default.nix b/pkgs/tools/security/gpgstats/default.nix index 34e8c7bd6796..c3a14f62c766 100644 --- a/pkgs/tools/security/gpgstats/default.nix +++ b/pkgs/tools/security/gpgstats/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { cp gpgstats $out/bin ''; - NIX_CFLAGS_COMPILE = stdenv.lib.optionals (!stdenv.is64bit) - [ "-D_FILE_OFFSET_BITS=64" "-DLARGEFILE_SOURCE=1" ]; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.is64bit) + "-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1"; meta = with stdenv.lib; { description = "Calculates statistics on the keys in your gpg key-ring"; diff --git a/pkgs/tools/text/sgml/jade/default.nix b/pkgs/tools/text/sgml/jade/default.nix index b7f8bd6df381..2cc40510121b 100644 --- a/pkgs/tools/text/sgml/jade/default.nix +++ b/pkgs/tools/text/sgml/jade/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ gnum4 ]; - NIX_CFLAGS_COMPILE = [ "-Wno-deprecated" ]; + NIX_CFLAGS_COMPILE = "-Wno-deprecated"; preInstall = '' install -d -m755 "$out"/lib diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index a9571032053f..48d368c92ca7 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -19245,7 +19245,7 @@ let sha256 = "0avk50kia78kxryh2whmaj5l18q2wvmkdyqyjsf6kwr4kgy6x3i7"; }; # https://rt.cpan.org/Public/Bug/Display.html?id=124815 - NIX_CFLAGS_COMPILE = [ "-DHAS_VPRINTF" ]; + NIX_CFLAGS_COMPILE = "-DHAS_VPRINTF"; }; TextUnidecode = buildPerlPackage { @@ -20332,7 +20332,7 @@ let AUTOMATED_TESTING = false; buildInputs = [ pkgs.xorg.libxcb pkgs.xorg.xcbproto pkgs.xorg.xcbutil pkgs.xorg.xcbutilwm ExtUtilsDepends ExtUtilsPkgConfig TestDeep TestException XSObjectMagic ]; propagatedBuildInputs = [ DataDump MouseXNativeTraits XMLDescent XMLSimple ]; - NIX_CFLAGS_LINK = [ "-lxcb" "-lxcb-util" "-lxcb-xinerama" "-lxcb-icccm" ]; + NIX_CFLAGS_LINK = "-lxcb -lxcb-util -lxcb-xinerama -lxcb-icccm"; doCheck = false; # requires an X server meta = { description = "XCB bindings for X";