diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix index 097b73a2549a..e0298d8f9365 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 31468c6af650..313f61e28ce0 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 7faf0fcc49d7..1a1fd3b409a6 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 e1d985eff540..dd1842e7d477 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 9a56619d8b70..65a2d579d3f7 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 8c1468e065df..605a916c6b4d 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 e26fdfa88e38..ebb34b0a0ce5 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 4880e4a29d72..ddfa999fcc7e 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 8f2d527785dc..0167f09ad5ba 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 f0860f51bca4..4fcccbf97041 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 cbc905cee73d..dea8a56f38d4 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 7fbb4d60f60b..2c99989bc889 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 5a42b66ed9dc..450fdc6024d7 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 6d55d4de58fc..65a5c266ee6a 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 72f9844e9774..b89692bf34d3 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 21b94ba4c268..28b5c3fa85e1 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 b3607c419337..bebfe37f686e 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 3945a8ed2c92..4b7bd0b9fd94 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 fd1b0cc1d062..d680f2cb1e05 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 58f83f3a7ff0..40a27eed934f 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 d3a936040951..b8d4df1128a0 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 2e6db30f2290..3514e9c24d13 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 2d6693667c68..83ac293f8b63 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 6aafa1a7cb3a..ff2579aa8656 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 11bc855feb1f..7329dc7df2ce 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 73725e1f83b7..11f094f72c9d 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 3df66385d761..11fa40ff91bb 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 56d67544af8e..c1d7d4fbd566 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 44ed5b2c8d82..0f788dd9d387 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 603e1c25bd2e..19a128dfc003 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 2e1eb6b53bd0..06fb4aae1a0e 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 1d67a0483cc2..159be4e14b61 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 e23e8b13c126..5e78a1266873 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 3f037755fb06..7547f9b3e476 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 8967b02ed912..2f430dea25c9 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 754bf767d1da..8679a655df9c 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 477850f5d667..9602e197cbfe 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 220e20dcd9e7..31c004986355 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 ed6a409b2696..7db56539bf2e 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 \