From 981ae25113c13b7989e89b8b57be25d9e186a63e Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 30 Oct 2019 01:12:09 +0100 Subject: treewide: NIX_*_COMPILE -> string --- pkgs/development/compilers/openjdk/8.nix | 8 ++++---- pkgs/development/compilers/rust/rustc.nix | 4 ++-- pkgs/development/interpreters/love/0.10.nix | 2 +- pkgs/development/libraries/gtk/3.x.nix | 5 +---- pkgs/development/libraries/ilmbase/default.nix | 2 +- pkgs/development/libraries/libcaca/default.nix | 4 ++-- pkgs/development/libraries/smpeg/default.nix | 2 +- pkgs/development/python-modules/cffi/default.nix | 3 ++- pkgs/development/tools/documentation/doxygen/default.nix | 2 +- pkgs/tools/misc/timidity/default.nix | 2 +- pkgs/tools/networking/dhcp/default.nix | 2 +- 11 files changed, 17 insertions(+), 19 deletions(-) diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix index 4debf10c0cb40..c6b3644feccab 100644 --- a/pkgs/development/compilers/openjdk/8.nix +++ b/pkgs/development/compilers/openjdk/8.nix @@ -140,7 +140,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString ([ # glibc 2.24 deprecated readdir_r so we need this # See https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg49006.html "-Wno-error=deprecated-declarations" @@ -151,13 +151,13 @@ let "-fno-delete-null-pointer-checks" "-std=gnu++98" "-Wno-error" - ]; + ]); - NIX_LDFLAGS= lib.optionals (!headless) [ + NIX_LDFLAGS= toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" ] ++ lib.optionals (!headless && enableGnome2) [ "-lgtk-x11-2.0" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" - ]; + ]); buildFlags = [ "all" ]; diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 49eaeef0d9c02..44bbd05aec731 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -41,11 +41,11 @@ in stdenv.mkDerivation rec { # See: https://github.com/NixOS/nixpkgs/pull/56540#issuecomment-471624656 stripDebugList = [ "bin" ]; - NIX_LDFLAGS = + NIX_LDFLAGS = toString ( # when linking stage1 libstd: cc: undefined reference to `__cxa_begin_catch' optional (stdenv.isLinux && !withBundledLLVM) "--push-state --as-needed -lstdc++ --pop-state" ++ optional (stdenv.isDarwin && !withBundledLLVM) "-lc++" - ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib"; + ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib"); # Increase codegen units to introduce parallelism within the compiler. RUSTFLAGS = "-Ccodegen-units=10"; diff --git a/pkgs/development/interpreters/love/0.10.nix b/pkgs/development/interpreters/love/0.10.nix index 6a3aa9f648f48..e1ca3ded20833 100644 --- a/pkgs/development/interpreters/love/0.10.nix +++ b/pkgs/development/interpreters/love/0.10.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/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index 7f09b52d51ff2..5a2d9159cac26 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -88,10 +88,7 @@ stdenv.mkDerivation rec { # These are the defines that'd you'd get with --enable-debug=minimum (default). # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options - NIX_CFLAGS_COMPILE = [ - "-DG_ENABLE_DEBUG" - "-DG_DISABLE_CAST_CHECKS" - ]; + NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; postPatch = '' files=( diff --git a/pkgs/development/libraries/ilmbase/default.nix b/pkgs/development/libraries/ilmbase/default.nix index a25a590b37051..00cdda1e57084 100644 --- a/pkgs/development/libraries/ilmbase/default.nix +++ b/pkgs/development/libraries/ilmbase/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ automake autoconf libtool which ]; - NIX_CFLAGS_LINK = [ "-pthread" ]; + NIX_CFLAGS_LINK = "-pthread"; patches = [ ./bootstrap.patch diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix index 8949ea8e390e3..7773fe46c0cea 100644 --- a/pkgs/development/libraries/libcaca/default.nix +++ b/pkgs/development/libraries/libcaca/default.nix @@ -19,12 +19,12 @@ stdenv.mkDerivation rec { (if x11Support then "--enable-x11" else "--disable-x11") ]; - NIX_CFLAGS_COMPILE = stdenv.lib.optional (!x11Support) "-DX_DISPLAY_MISSING"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING"; enableParallelBuilding = true; propagatedBuildInputs = [ ncurses zlib pkgconfig (imlib2.override { inherit x11Support; }) ] - ++ stdenv.lib.optionals x11Support [ libX11 libXext]; + ++ stdenv.lib.optionals x11Support [ libX11 libXext ]; postInstall = '' mkdir -p $dev/bin diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix index a7ffc146f414c..4d74ee7ca063d 100644 --- a/pkgs/development/libraries/smpeg/default.nix +++ b/pkgs/development/libraries/smpeg/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { --prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig" ''; - NIX_LDFLAGS = [ "-lX11" ]; + NIX_LDFLAGS = "-lX11"; meta = { homepage = http://icculus.org/smpeg/; diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 15d15c23a8d29..b05aeebf9d4d5 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -29,7 +29,8 @@ if isPyPy then null else buildPythonPackage rec { ''; # The tests use -Werror but with python3.6 clang detects some unreachable code. - NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ]; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang + "-Wno-unused-command-line-argument -Wno-unreachable-code"; doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate checkPhase = '' diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix index 0e20d690fd727..af73ce25d422b 100644 --- a/pkgs/development/tools/documentation/doxygen/default.nix +++ b/pkgs/development/tools/documentation/doxygen/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { stdenv.lib.optional (qt4 != null) "-Dbuild_wizard=YES"; NIX_CFLAGS_COMPILE = - stdenv.lib.optional stdenv.isDarwin "-mmacosx-version-min=10.9"; + stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; enableParallelBuilding = true; doCheck = false; # fails diff --git a/pkgs/tools/misc/timidity/default.nix b/pkgs/tools/misc/timidity/default.nix index 318ad6e3a9dc0..c307c96199f20 100644 --- a/pkgs/tools/misc/timidity/default.nix +++ b/pkgs/tools/misc/timidity/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { configureFlags = [ "--enable-audio=oss,alsa,jack" "--enable-alsaseq" "--with-default-output=alsa" "--enable-ncurses" ]; - NIX_LDFLAGS = ["-ljack -L${libjack2}/lib"]; + NIX_LDFLAGS = "-ljack -L${libjack2}/lib"; instruments = fetchurl { url = http://www.csee.umbc.edu/pub/midia/instruments.tar.gz; diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index f6c204d26b7dd..5e552da98dfe4 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { (lib.optional stdenv.isLinux "--with-randomdev=/dev/random") ] ++ stdenv.lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ]; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = builtins.toString [ "-Wno-error=pointer-compare" "-Wno-error=format-truncation" "-Wno-error=stringop-truncation" -- cgit 1.4.1