diff options
author | Artturin <Artturin@artturin.com> | 2023-02-20 17:36:06 +0200 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-02-22 21:23:05 +0200 |
commit | 3251013cc149d535d857e6bca6da28a61bf81faa (patch) | |
tree | d12aa6990e978de8c9c1e2fa6e618319955f3299 /pkgs | |
parent | 226e14914512d33cee00543cd947cf74d50a1258 (diff) |
treewide: env.NIX_CFLAGS_COMPILE use toString on result of optionals
env values must be strings
Diffstat (limited to 'pkgs')
39 files changed, 70 insertions, 70 deletions
diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix index 097b73a2549ac..e0298d8f9365b 100644 --- a/pkgs/applications/audio/furnace/default.nix +++ b/pkgs/applications/audio/furnace/default.nix @@ -63,11 +63,11 @@ stdenv.mkDerivation rec { "-DWARNINGS_ARE_ERRORS=ON" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but breaks on darwin (with clang) or aarch64 (old gcc) "-Wno-error=mismatched-new-delete" "-Wno-error=use-after-free" - ]; + ]); postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a diff --git a/pkgs/applications/misc/opencpn/default.nix b/pkgs/applications/misc/opencpn/default.nix index 31468c6af650f..313f61e28ce02 100644 --- a/pkgs/applications/misc/opencpn/default.nix +++ b/pkgs/applications/misc/opencpn/default.nix @@ -117,9 +117,9 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DOCPN_BUNDLE_DOCS=true" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (!stdenv.hostPlatform.isx86) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (!stdenv.hostPlatform.isx86) [ "-DSQUISH_USE_SSE=0" - ]; + ]); postInstall = lib.optionals stdenv.isDarwin '' mkdir -p $out/Applications diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/tdlib-purple/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/tdlib-purple/default.nix index 7faf0fcc49d72..1a1fd3b409a66 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/tdlib-purple/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/tdlib-purple/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DNoVoip=True" ]; # libtgvoip required - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "-U__ARM_NEON__" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "-U__ARM_NEON__" ]); meta = with lib; { homepage = "https://github.com/ars3niy/tdlib-purple"; diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix index e1d985eff540e..dd1842e7d4773 100644 --- a/pkgs/applications/networking/remote/freerdp/default.nix +++ b/pkgs/applications/networking/remote/freerdp/default.nix @@ -175,11 +175,11 @@ stdenv.mkDerivation rec { WITH_X11 = true; }; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-DTARGET_OS_IPHONE=0" "-DTARGET_OS_WATCH=0" "-include AudioToolbox/AudioToolbox.h" - ]; + ]); NIX_LDFLAGS = lib.optionals stdenv.isDarwin [ "-framework AudioToolbox" diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index 9a56619d8b70f..65a2d579d3f7b 100644 --- a/pkgs/applications/office/gnucash/default.nix +++ b/pkgs/applications/office/gnucash/default.nix @@ -80,10 +80,10 @@ stdenv.mkDerivation rec { # guile warning GUILE_AUTO_COMPILE="0"; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but breaks on darwin (with clang) or older gcc "-Wno-error=use-after-free" - ]; + ]); # `make check` target does not define its prerequisites but expects them to # have already been built. The list of targets below was built through trial diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index 8c1468e065df2..605a916c6b4da 100644 --- a/pkgs/applications/radio/freedv/default.nix +++ b/pkgs/applications/radio/freedv/default.nix @@ -69,9 +69,9 @@ stdenv.mkDerivation rec { "-DUNITTEST=ON" ] ++ lib.optionals pulseSupport [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-DAPPLE_OLD_XCODE" - ]; + ]); doCheck = true; diff --git a/pkgs/applications/radio/soapyremote/default.nix b/pkgs/applications/radio/soapyremote/default.nix index e26fdfa88e388..ebb34b0a0ce55 100644 --- a/pkgs/applications/radio/soapyremote/default.nix +++ b/pkgs/applications/radio/soapyremote/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation { cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-include sys/select.h" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-include sys/select.h" ]); meta = with lib; { homepage = "https://github.com/pothosware/SoapyRemote"; diff --git a/pkgs/applications/science/logic/cbmc/default.nix b/pkgs/applications/science/logic/cbmc/default.nix index 4880e4a29d72c..ddfa999fcc7e3 100644 --- a/pkgs/applications/science/logic/cbmc/default.nix +++ b/pkgs/applications/science/logic/cbmc/default.nix @@ -60,13 +60,13 @@ stdenv.mkDerivation rec { --prefix PATH : "$out/share/cbmc" \ ''; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 but breaks on darwin (with clang) "-Wno-error=maybe-uninitialized" ] ++ lib.optionals stdenv.cc.isClang [ # fix "argument unused during compilation" "-Wno-unused-command-line-argument" - ]; + ]); # TODO: add jbmc support cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ]; diff --git a/pkgs/applications/version-management/fnc/default.nix b/pkgs/applications/version-management/fnc/default.nix index 8f2d527785dcb..0167f09ad5ba0 100644 --- a/pkgs/applications/version-management/fnc/default.nix +++ b/pkgs/applications/version-management/fnc/default.nix @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" - ]; + ]); preInstall = '' mkdir -p $out/bin diff --git a/pkgs/development/compilers/sbcl/2.x.nix b/pkgs/development/compilers/sbcl/2.x.nix index f0860f51bca4d..4fcccbf970410 100644 --- a/pkgs/development/compilers/sbcl/2.x.nix +++ b/pkgs/development/compilers/sbcl/2.x.nix @@ -171,7 +171,7 @@ stdenv.mkDerivation rec { optional (!threadSupport) "sb-thread" ++ optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (lib.versionOlder version "2.1.10") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (lib.versionOlder version "2.1.10") [ # Workaround build failure on -fno-common toolchains like upstream # clang-13. Without the change build fails as: # duplicate symbol '_static_code_space_free_pointer' in: alloc.o traceroot.o @@ -179,7 +179,7 @@ stdenv.mkDerivation rec { "-fcommon" ] # Fails to find `O_LARGEFILE` otherwise. - ++ [ "-D_GNU_SOURCE" ]; + ++ [ "-D_GNU_SOURCE" ]); buildPhase = '' runHook preBuild diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix index cbc905cee73da..dea8a56f38d41 100644 --- a/pkgs/development/embedded/openocd/default.nix +++ b/pkgs/development/embedded/openocd/default.nix @@ -36,10 +36,10 @@ stdenv.mkDerivation rec { "--enable-remote-bitbang" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-Wno-error=cpp" "-Wno-error=strict-prototypes" # fixes build failure with hidapi 0.10.0 - ]; + ]); postInstall = lib.optionalString stdenv.isLinux '' mkdir -p "$out/etc/udev/rules.d" diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix index 7fbb4d60f60b1..2c99989bc8892 100644 --- a/pkgs/development/libraries/boringssl/default.nix +++ b/pkgs/development/libraries/boringssl/default.nix @@ -30,10 +30,10 @@ buildGoModule { export GOARCH=$(go env GOHOSTARCH) ''; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 but breaks on darwin (with clang) "-Wno-error=stringop-overflow" - ]; + ]); buildPhase = '' ninjaBuildPhase diff --git a/pkgs/development/libraries/gtk-frdp/default.nix b/pkgs/development/libraries/gtk-frdp/default.nix index 5a42b66ed9dcf..450fdc6024d7e 100644 --- a/pkgs/development/libraries/gtk-frdp/default.nix +++ b/pkgs/development/libraries/gtk-frdp/default.nix @@ -44,10 +44,10 @@ stdenv.mkDerivation rec { }; }; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-DTARGET_OS_IPHONE=0" "-DTARGET_OS_WATCH=0" - ]; + ]); meta = with lib; { homepage = "https://gitlab.gnome.org/GNOME/gtk-frdp"; diff --git a/pkgs/development/libraries/maplibre-gl-native/default.nix b/pkgs/development/libraries/maplibre-gl-native/default.nix index 6d55d4de58fcf..65a5c266ee6a6 100644 --- a/pkgs/development/libraries/maplibre-gl-native/default.nix +++ b/pkgs/development/libraries/maplibre-gl-native/default.nix @@ -56,10 +56,10 @@ mkDerivation rec { "-DMBGL_WITH_QT_HEADLESS=OFF" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but problematic with some old GCCs "-Wno-error=use-after-free" - ]; + ]); meta = with lib; { description = "Open-source alternative to Mapbox GL Native"; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 72f9844e97745..b89692bf34d30 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -323,10 +323,10 @@ self = stdenv.mkDerivation { done ''; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [ "-UPIPE_SEARCH_DIR" "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" - ]; + ]); passthru = { inherit (libglvnd) driverLink; diff --git a/pkgs/development/libraries/precice/default.nix b/pkgs/development/libraries/precice/default.nix index 21b94ba4c268d..28b5c3fa85e13 100644 --- a/pkgs/development/libraries/precice/default.nix +++ b/pkgs/development/libraries/precice/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { "-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-D_GNU_SOURCE" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-D_GNU_SOURCE" ]); nativeBuildInputs = [ cmake gcc ]; buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index b3607c4193374..bebfe37f686eb 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -102,7 +102,7 @@ qtModule { --replace "-Wl,-fatal_warnings" "" '') + postPatch; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit "-Wno-class-memaccess" ] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [ @@ -111,7 +111,7 @@ qtModule { "-march=westmere" ] ++ lib.optionals stdenv.cc.isClang [ "-Wno-elaborated-enum-base" - ]; + ]); preConfigure = '' export NINJAFLAGS=-j$NIX_BUILD_CORES diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index 3945a8ed2c920..4b7bd0b9fd945 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "tools" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" "-Wno-error=pessimizing-move" # Needed with GCC 12 @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-private-field" "-faligned-allocation" - ]; + ]); cmakeFlags = [ "-DPORTABLE=1" diff --git a/pkgs/development/python-modules/levenshtein/default.nix b/pkgs/development/python-modules/levenshtein/default.nix index fd1b0cc1d0624..d680f2cb1e05c 100644 --- a/pkgs/development/python-modules/levenshtein/default.nix +++ b/pkgs/development/python-modules/levenshtein/default.nix @@ -37,9 +37,9 @@ buildPythonPackage rec { rapidfuzz-cpp ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [ "-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098 - ]; + ]); propagatedBuildInputs = [ rapidfuzz diff --git a/pkgs/development/python-modules/rapidfuzz/default.nix b/pkgs/development/python-modules/rapidfuzz/default.nix index 58f83f3a7ff0a..40a27eed934f5 100644 --- a/pkgs/development/python-modules/rapidfuzz/default.nix +++ b/pkgs/development/python-modules/rapidfuzz/default.nix @@ -52,9 +52,9 @@ buildPythonPackage rec { export CMAKE_ARGS="-DCMAKE_CXX_COMPILER_AR=$AR -DCMAKE_CXX_COMPILER_RANLIB=$RANLIB" ''; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [ "-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098 - ]; + ]); propagatedBuildInputs = [ numpy diff --git a/pkgs/development/ruby-modules/gem/default.nix b/pkgs/development/ruby-modules/gem/default.nix index d3a936040951a..b8d4df1128a03 100644 --- a/pkgs/development/ruby-modules/gem/default.nix +++ b/pkgs/development/ruby-modules/gem/default.nix @@ -136,9 +136,9 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // { # As of ruby 3.0, ruby headers require -fdeclspec when building with clang # Introduced in https://github.com/ruby/ruby/commit/0958e19ffb047781fe1506760c7cbd8d7fe74e57 - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isClang && lib.versionAtLeast ruby.version.major "3") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && lib.versionAtLeast ruby.version.major "3") [ "-fdeclspec" - ]; + ]); buildPhase = attrs.buildPhase or '' runHook preBuild diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix index 2e6db30f2290b..3514e9c24d13d 100644 --- a/pkgs/development/tools/mold/default.nix +++ b/pkgs/development/tools/mold/default.nix @@ -41,9 +41,9 @@ stdenv.mkDerivation rec { "-DMOLD_USE_SYSTEM_MIMALLOC:BOOL=ON" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-faligned-allocation" - ]; + ]); passthru.tests.version = testers.testVersion { package = mold; }; diff --git a/pkgs/games/liquidwar/default.nix b/pkgs/games/liquidwar/default.nix index 2d6693667c68a..83ac293f8b63d 100644 --- a/pkgs/games/liquidwar/default.nix +++ b/pkgs/games/liquidwar/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but problematic with some old GCCs "-Wno-error=address" "-Wno-error=use-after-free" @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { "-Wno-error=deprecated-declarations" # Avoid GL_GLEXT_VERSION double definition " -DNO_SDL_GLEXT" - ]; + ]); # To avoid problems finding SDL_types.h. configureFlags = [ "CFLAGS=-I${lib.getDev SDL}/include/SDL" ]; diff --git a/pkgs/misc/logging/pacemaker/default.nix b/pkgs/misc/logging/pacemaker/default.nix index 6aafa1a7cb3a4..ff2579aa86565 100644 --- a/pkgs/misc/logging/pacemaker/default.nix +++ b/pkgs/misc/logging/pacemaker/default.nix @@ -76,9 +76,9 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=${placeholder "out"}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-Wno-error=strict-prototypes" - ]; + ]); enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix index 11bc855feb1f1..7329dc7df2ce6 100644 --- a/pkgs/os-specific/linux/anbox/default.nix +++ b/pkgs/os-specific/linux/anbox/default.nix @@ -86,9 +86,9 @@ stdenv.mkDerivation rec { ]; # Flag needed by GCC 12 but unrecognized by GCC 9 (aarch64-linux default now) - env.NIX_CFLAGS_COMPILE = lib.optionals (with stdenv; cc.isGNU && lib.versionAtLeast cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (with stdenv; cc.isGNU && lib.versionAtLeast cc.version "12") [ "-Wno-error=mismatched-new-delete" - ]; + ]); patchPhase = '' patchShebangs scripts diff --git a/pkgs/os-specific/linux/ocf-resource-agents/default.nix b/pkgs/os-specific/linux/ocf-resource-agents/default.nix index 73725e1f83b74..11f094f72c9dc 100644 --- a/pkgs/os-specific/linux/ocf-resource-agents/default.nix +++ b/pkgs/os-specific/linux/ocf-resource-agents/default.nix @@ -42,10 +42,10 @@ let python3 ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but breaks on darwin (with clang) or older gcc "-Wno-error=maybe-uninitialized" - ]; + ]); meta = with lib; { homepage = "https://github.com/ClusterLabs/resource-agents"; diff --git a/pkgs/servers/dns/pdns/default.nix b/pkgs/servers/dns/pdns/default.nix index 3df66385d7612..11fa40ff91bb9 100644 --- a/pkgs/servers/dns/pdns/default.nix +++ b/pkgs/servers/dns/pdns/default.nix @@ -21,9 +21,9 @@ stdenv.mkDerivation rec { ]; # Configure phase requires 64-bit time_t even on 32-bit platforms. - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.hostPlatform.is32bit [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.is32bit [ "-D_TIME_BITS=64" "-D_FILE_OFFSET_BITS=64" - ]; + ]); configureFlags = [ "--disable-silent-rules" diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index 56d67544af8e2..c1d7d4fbd566e 100644 --- a/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/pkgs/servers/monitoring/grafana-agent/default.nix @@ -38,7 +38,7 @@ buildGoModule rec { # uses go-systemd, which uses libsystemd headers # https://github.com/coreos/go-systemd/issues/351 - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isLinux [ "-I${lib.getDev systemd}/include" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isLinux [ "-I${lib.getDev systemd}/include" ]); # tries to access /sys: https://github.com/grafana/agent/issues/333 preBuild = '' diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 44ed5b2c8d820..0f788dd9d3876 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang [ "-std=c11" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]); # darwin currently lacks a pure `pgrep` which is extensively used here doCheck = !stdenv.isDarwin; diff --git a/pkgs/servers/sql/cockroachdb/default.nix b/pkgs/servers/sql/cockroachdb/default.nix index 603e1c25bd2ea..19a128dfc0038 100644 --- a/pkgs/servers/sql/cockroachdb/default.nix +++ b/pkgs/servers/sql/cockroachdb/default.nix @@ -24,7 +24,7 @@ buildGoPackage rec { sha256 = "0mm3hfr778c7djza8gr1clwa8wca4d3ldh9hlg80avw4x664y5zi"; }; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" "-Wno-error=redundant-move" "-Wno-error=pessimizing-move" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" "-Wno-error=redundant-move" "-Wno-error=pessimizing-move" ]); inherit nativeBuildInputs buildInputs; diff --git a/pkgs/tools/archivers/7zz/default.nix b/pkgs/tools/archivers/7zz/default.nix index 2e1eb6b53bd08..06fb4aae1a0eb 100644 --- a/pkgs/tools/archivers/7zz/default.nix +++ b/pkgs/tools/archivers/7zz/default.nix @@ -64,12 +64,12 @@ stdenv.mkDerivation rec { --replace windres.exe ${stdenv.cc.targetPrefix}windres ''; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-Wno-deprecated-copy-dtor" ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ "-Wno-conversion" "-Wno-unused-macros" - ]; + ]); inherit makefile; diff --git a/pkgs/tools/cd-dvd/vobsub2srt/default.nix b/pkgs/tools/cd-dvd/vobsub2srt/default.nix index 1d67a0483cc24..159be4e14b619 100644 --- a/pkgs/tools/cd-dvd/vobsub2srt/default.nix +++ b/pkgs/tools/cd-dvd/vobsub2srt/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-i6V2Owb8GcTcWowgb/BmdupOSFsYiCF2SbC9hXa26uY="; }; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ "-std=c++11" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-std=c++11" ]); nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libtiff ]; diff --git a/pkgs/tools/filesystems/idsk/default.nix b/pkgs/tools/filesystems/idsk/default.nix index e23e8b13c1263..5e78a1266873d 100644 --- a/pkgs/tools/filesystems/idsk/default.nix +++ b/pkgs/tools/filesystems/idsk/default.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 but breaks on darwin (with clang) "-std=c++14" - ]; + ]); installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/edk2-uefi-shell/default.nix b/pkgs/tools/misc/edk2-uefi-shell/default.nix index 3f037755fb061..7547f9b3e476d 100644 --- a/pkgs/tools/misc/edk2-uefi-shell/default.nix +++ b/pkgs/tools/misc/edk2-uefi-shell/default.nix @@ -14,7 +14,7 @@ edk2.mkDerivation "ShellPkg/ShellPkg.dsc" (finalAttrs: { ++ lib.optionals stdenv.cc.isClang [ llvmPackages.bintools llvmPackages.llvm ]; strictDeps = true; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang [ "-fno-pic" "-Qunused-arguments" ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-fno-pic" "-Qunused-arguments" ]); # Set explicitly to use Python 3 from nixpkgs. Otherwise, the build system will detect and try to # use `/usr/bin/python3` on Darwin when sandboxing is disabled. diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix index 8967b02ed9129..2f430dea25c9b 100644 --- a/pkgs/tools/misc/fluent-bit/default.nix +++ b/pkgs/tools/misc/fluent-bit/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" "-DFLB_OUT_PGSQL=ON" ]; # _FORTIFY_SOURCE requires compiling with optimization (-O) - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ "-O" ] + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-O" ] # Workaround build failure on -fno-common toolchains: # ld: /monkey/mk_tls.h:81: multiple definition of `mk_tls_server_timeout'; # flb_config.c.o:include/monkey/mk_tls.h:81: first defined here # TODO: drop when upstream gets a fix for it: # https://github.com/fluent/fluent-bit/issues/5537 - ++ lib.optionals stdenv.isDarwin [ "-fcommon" ]; + ++ lib.optionals stdenv.isDarwin [ "-fcommon" ]); outputs = [ "out" "dev" ]; diff --git a/pkgs/tools/misc/topgrade/default.nix b/pkgs/tools/misc/topgrade/default.nix index 754bf767d1dab..8679a655df9c4 100644 --- a/pkgs/tools/misc/topgrade/default.nix +++ b/pkgs/tools/misc/topgrade/default.nix @@ -31,10 +31,10 @@ rustPlatform.buildRustPackage rec { Foundation ]; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-framework" "AppKit" - ]; + ]); postInstall = '' installShellCompletion --cmd topgrade \ diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index 477850f5d6672..9602e197cbfe5 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -41,9 +41,9 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; - env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-framework" "AppKit" - ]; + ]); # Requires network access doCheck = false; diff --git a/pkgs/tools/networking/uqmi/default.nix b/pkgs/tools/networking/uqmi/default.nix index 220e20dcd9e7b..31c004986355f 100644 --- a/pkgs/tools/networking/uqmi/default.nix +++ b/pkgs/tools/networking/uqmi/default.nix @@ -18,10 +18,10 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake perl ]; buildInputs = [ libubox json_c ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but breaks on darwin (with clang) or older gcc "-Wno-error=dangling-pointer" - ]; + ]); meta = with lib; { description = "Tiny QMI command line utility"; diff --git a/pkgs/tools/text/qgrep/default.nix b/pkgs/tools/text/qgrep/default.nix index ed6a409b2696c..7db56539bf2e2 100644 --- a/pkgs/tools/text/qgrep/default.nix +++ b/pkgs/tools/text/qgrep/default.nix @@ -21,10 +21,10 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals stdenv.isDarwin [ CoreServices CoreFoundation ]; - env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but breaks on darwin (with clang) or older gcc "-Wno-error=mismatched-new-delete" - ]; + ]); postPatch = lib.optionalString stdenv.isAarch64 '' substituteInPlace Makefile \ |