diff --git a/doc/languages-frameworks/emscripten.section.md b/doc/languages-frameworks/emscripten.section.md index ff622cfb0b5..67c8ed42bfd 100644 --- a/doc/languages-frameworks/emscripten.section.md +++ b/doc/languages-frameworks/emscripten.section.md @@ -60,7 +60,7 @@ See the `zlib` example: (old: rec { buildInputs = old.buildInputs ++ [ pkg-config ]; # we need to reset this setting! - NIX_CFLAGS_COMPILE=""; + env = (old.env or { }) // { NIX_CFLAGS_COMPILE = ""; }; configurePhase = '' # FIXME: Some tests require writing at $HOME HOME=$TMPDIR diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index 1488a09982a..b3f9f681da4 100644 --- a/doc/stdenv/stdenv.chapter.md +++ b/doc/stdenv/stdenv.chapter.md @@ -1329,7 +1329,7 @@ bin/blib.a(bios_console.o): In function `bios_handle_cup': Adds the `-O2 -D_FORTIFY_SOURCE=2` compiler options. During code generation the compiler knows a great deal of information about buffer sizes (where possible), and attempts to replace insecure unlimited length buffer function calls with length-limited ones. This is especially useful for old, crufty code. Additionally, format strings in writable memory that contain `%n` are blocked. If an application depends on such a format string, it will need to be worked around. -Additionally, some warnings are enabled which might trigger build failures if compiler warnings are treated as errors in the package build. In this case, set `NIX_CFLAGS_COMPILE` to `-Wno-error=warning-type`. +Additionally, some warnings are enabled which might trigger build failures if compiler warnings are treated as errors in the package build. In this case, set `env.NIX_CFLAGS_COMPILE` to `-Wno-error=warning-type`. This needs to be turned off or fixed for errors similar to: diff --git a/pkgs/applications/audio/aacgain/default.nix b/pkgs/applications/audio/aacgain/default.nix index 62a72fea62a..4d45de86f3a 100644 --- a/pkgs/applications/audio/aacgain/default.nix +++ b/pkgs/applications/audio/aacgain/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { libtool ]; - NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; meta = with lib; { description = "ReplayGain for AAC files"; diff --git a/pkgs/applications/audio/adlplug/default.nix b/pkgs/applications/audio/adlplug/default.nix index a0f5b48a632..a5d82b6e00d 100644 --- a/pkgs/applications/audio/adlplug/default.nix +++ b/pkgs/applications/audio/adlplug/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { "-DADLplug_Jack=${if withJack then "ON" else "OFF"}" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ # "fp.h" file not found "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers" ]); diff --git a/pkgs/applications/audio/aether-lv2/default.nix b/pkgs/applications/audio/aether-lv2/default.nix index 179c656968c..6710aaa87f4 100644 --- a/pkgs/applications/audio/aether-lv2/default.nix +++ b/pkgs/applications/audio/aether-lv2/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { lv2 libX11 libGL libGLU mesa ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" "-Wno-error=stringop-overflow" diff --git a/pkgs/applications/audio/audio-recorder/default.nix b/pkgs/applications/audio/audio-recorder/default.nix index bb89cb45672..aaf6777533f 100644 --- a/pkgs/applications/audio/audio-recorder/default.nix +++ b/pkgs/applications/audio/audio-recorder/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; # https://bugs.launchpad.net/audio-recorder/+bug/1784622 - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ]; diff --git a/pkgs/applications/audio/bespokesynth/default.nix b/pkgs/applications/audio/bespokesynth/default.nix index 7fc921e59fb..919768d58ed 100644 --- a/pkgs/applications/audio/bespokesynth/default.nix +++ b/pkgs/applications/audio/bespokesynth/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation rec { CoreAudioKit ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ # Fails to find fp.h on its own "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Versions/Current/Headers/" ]); diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix index 6099895a0f2..39227fd0652 100644 --- a/pkgs/applications/audio/bristol/default.nix +++ b/pkgs/applications/audio/bristol/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: brightonCLI.o:/build/bristol-0.60.11/brighton/brightonCLI.c:139: multiple definition of # `event'; brightonMixerMenu.o:/build/bristol-0.60.11/brighton/brightonMixerMenu.c:1182: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preInstall = '' sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol diff --git a/pkgs/applications/audio/fire/default.nix b/pkgs/applications/audio/fire/default.nix index 54d5bba4466..93536944d96 100644 --- a/pkgs/applications/audio/fire/default.nix +++ b/pkgs/applications/audio/fire/default.nix @@ -103,7 +103,7 @@ stdenv.mkDerivation rec { ''; # Fails to find fp.h on its own - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Versions/Current/Headers/"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Versions/Current/Headers/"; doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; diff --git a/pkgs/applications/audio/freewheeling/default.nix b/pkgs/applications/audio/freewheeling/default.nix index 08afe21763e..531352d0ed9 100644 --- a/pkgs/applications/audio/freewheeling/default.nix +++ b/pkgs/applications/audio/freewheeling/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { configureFlags = oldAttrs.configureFlags ++ [ "--enable-openssl-compatibility" ]; })) ]; - NIX_CFLAGS_COMPILE = toString + env.NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ SDL SDL_ttf SDL_gfx ] ++ [ "-I${libxml2.dev}/include/libxml2" ]); hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix index f0bb039a79c..e0298d8f936 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" ]; - 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/audio/giada/default.nix b/pkgs/applications/audio/giada/default.nix index 15eccc46943..c5dcec05a9d 100644 --- a/pkgs/applications/audio/giada/default.nix +++ b/pkgs/applications/audio/giada/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-w" "-Wno-error" ]; diff --git a/pkgs/applications/audio/gnaural/default.nix b/pkgs/applications/audio/gnaural/default.nix index 42b28eacc4f..e7753ef28e6 100644 --- a/pkgs/applications/audio/gnaural/default.nix +++ b/pkgs/applications/audio/gnaural/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: src/net/../gnauralnet.h:233: multiple definition of `GN_ScheduleFingerprint'; # src/net/../../src/gnauralnet.h:233: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; postInstall = '' mkdir -p $out/share/applications diff --git a/pkgs/applications/audio/grandorgue/default.nix b/pkgs/applications/audio/grandorgue/default.nix index 0bbe0b1f0da..f988e5cd1d4 100644 --- a/pkgs/applications/audio/grandorgue/default.nix +++ b/pkgs/applications/audio/grandorgue/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { "-DINSTALL_DEPEND=OFF" ] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF"; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; postInstall = lib.optionalString stdenv.isDarwin '' mkdir -p $out/{Applications,bin,lib} diff --git a/pkgs/applications/audio/gtkpod/default.nix b/pkgs/applications/audio/gtkpod/default.nix index 220d2d38e14..a16ad3c9320 100644 --- a/pkgs/applications/audio/gtkpod/default.nix +++ b/pkgs/applications/audio/gtkpod/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: .libs/autodetection.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: multiple definition of # `gtkpod_app'; .libs/gtkpod_app_iface.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; enableParallelBuilding = true; diff --git a/pkgs/applications/audio/guitarix/default.nix b/pkgs/applications/audio/guitarix/default.nix index 870f4b216f5..3033888996a 100644 --- a/pkgs/applications/audio/guitarix/default.nix +++ b/pkgs/applications/audio/guitarix/default.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation rec { "--install-roboto-font" ] ++ optional optimizationSupport "--optimization"; - NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ]; meta = with lib; { description = "A virtual guitar amplifier for Linux running with JACK"; diff --git a/pkgs/applications/audio/jamin/default.nix b/pkgs/applications/audio/jamin/default.nix index f4a5e58c5e1..e130d9a642d 100644 --- a/pkgs/applications/audio/jamin/default.nix +++ b/pkgs/applications/audio/jamin/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: jamin-preferences.o:/build/jamin-0.95.0/src/hdeq.h:64: multiple definition of # `l_notebook1'; jamin-callbacks.o:/build/jamin-0.95.0/src/hdeq.h:64: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; postInstall = '' wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa diff --git a/pkgs/applications/audio/klystrack/default.nix b/pkgs/applications/audio/klystrack/default.nix index 362c76a0d4d..9ea5f40be14 100644 --- a/pkgs/applications/audio/klystrack/default.nix +++ b/pkgs/applications/audio/klystrack/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { # ld: libengine_gui.a(gui_menu.o):(.bss+0x0): multiple definition of # `menu_t'; objs.release/action.o:(.bss+0x20): first defined here # TODO: remove it for 1.7.7+ release as it was fixed upstream. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildFlags = [ "PREFIX=${placeholder "out"}" "CFG=release" ]; diff --git a/pkgs/applications/audio/littlegptracker/default.nix b/pkgs/applications/audio/littlegptracker/default.nix index abeaa7dff42..846936e65f6 100644 --- a/pkgs/applications/audio/littlegptracker/default.nix +++ b/pkgs/applications/audio/littlegptracker/default.nix @@ -35,8 +35,8 @@ stdenv.mkDerivation rec { ++ lib.optionals stdenv.isLinux [ "PLATFORM=DEB" ] ++ lib.optionals stdenv.isDarwin [ "PLATFORM=OSX" ]; - NIX_CFLAGS_COMPILE = [ "-fpermissive" ] ++ - lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"; + env.NIX_CFLAGS_COMPILE = toString ([ "-fpermissive" ] ++ + lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"); NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework Foundation"; diff --git a/pkgs/applications/audio/lsp-plugins/default.nix b/pkgs/applications/audio/lsp-plugins/default.nix index 4e4612ef922..c3d8671b26d 100644 --- a/pkgs/applications/audio/lsp-plugins/default.nix +++ b/pkgs/applications/audio/lsp-plugins/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "PREFIX=${placeholder "out"}" ]; - NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL"; + env.NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL"; configurePhase = '' make config PREFIX=${placeholder "out"} diff --git a/pkgs/applications/audio/mi2ly/default.nix b/pkgs/applications/audio/mi2ly/default.nix index 9a046a2e11a..2ba12575543 100644 --- a/pkgs/applications/audio/mi2ly/default.nix +++ b/pkgs/applications/audio/mi2ly/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = [ "-fgnu89-inline" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-fgnu89-inline" ]; buildPhase = "./cc"; installPhase = '' diff --git a/pkgs/applications/audio/mimic/default.nix b/pkgs/applications/audio/mimic/default.nix index 47e043f5d46..2819e288ec1 100644 --- a/pkgs/applications/audio/mimic/default.nix +++ b/pkgs/applications/audio/mimic/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { pcre2 ] ++ lib.optional pulseaudioSupport libpulseaudio; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=free-nonheap-object" ]; diff --git a/pkgs/applications/audio/mp3blaster/default.nix b/pkgs/applications/audio/mp3blaster/default.nix index 0d65fe813ec..8d4a63f3b9e 100644 --- a/pkgs/applications/audio/mp3blaster/default.nix +++ b/pkgs/applications/audio/mp3blaster/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { libvorbis ] ++ lib.optional stdenv.isDarwin SDL; - NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ] ++ lib.optionals stdenv.cc.isClang [ "-Wno-reserved-user-defined-literal" diff --git a/pkgs/applications/audio/mpc123/default.nix b/pkgs/applications/audio/mpc123/default.nix index 9a693c0eaa3..7746d1c63fa 100644 --- a/pkgs/applications/audio/mpc123/default.nix +++ b/pkgs/applications/audio/mpc123/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: /build/cc566Cj9.o:(.bss+0x0): multiple definition of `mpc123_file_reader'; ao.o:(.bss+0x40): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildInputs = [ gettext libmpcdec libao ]; diff --git a/pkgs/applications/audio/mpg321/default.nix b/pkgs/applications/audio/mpg321/default.nix index 4a73ddf03c8..e00b6722f38 100644 --- a/pkgs/applications/audio/mpg321/default.nix +++ b/pkgs/applications/audio/mpg321/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: volume.o:/build/mpg321-0.3.2-orig/mpg321.h:119: multiple definition of # `loop_remaining'; mpg321.o:/build/mpg321-0.3.2-orig/mpg321.h:119: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configureFlags = [ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ] diff --git a/pkgs/applications/audio/muse/default.nix b/pkgs/applications/audio/muse/default.nix index 065c943764e..5663070d7df 100644 --- a/pkgs/applications/audio/muse/default.nix +++ b/pkgs/applications/audio/muse/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { libsamplerate libsndfile lilv lrdf lv2 qtsvg rtaudio rubberband sord ]; - NIX_CFLAGS_COMPILE = [ "-I${lib.getDev serd}/include/serd-0" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getDev serd}/include/serd-0" ]; meta = with lib; { homepage = "https://muse-sequencer.github.io/"; diff --git a/pkgs/applications/audio/oxefmsynth/default.nix b/pkgs/applications/audio/oxefmsynth/default.nix index 59ed1ce21f5..81cdc29be7a 100644 --- a/pkgs/applications/audio/oxefmsynth/default.nix +++ b/pkgs/applications/audio/oxefmsynth/default.nix @@ -22,7 +22,7 @@ in stdenv.mkDerivation rec { sha256 = "1rk71ls33a38wx8i22plsi7d89cqqxrfxknq5i4f9igsw1ipm4gn"; }; - NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-narrowing" ]; buildFlags = [ "VSTSDK_PATH=${vst-sdk}/VST2_SDK" ]; diff --git a/pkgs/applications/audio/picoloop/default.nix b/pkgs/applications/audio/picoloop/default.nix index bd956963a46..8f11ec809c3 100644 --- a/pkgs/applications/audio/picoloop/default.nix +++ b/pkgs/applications/audio/picoloop/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ]; - NIX_CFLAGS_COMPILE = [ "-I${SDL2.dev}/include/SDL2" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${SDL2.dev}/include/SDL2" ]; hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/audio/pragha/default.nix b/pkgs/applications/audio/pragha/default.nix index da5a64f708e..8e039f05927 100644 --- a/pkgs/applications/audio/pragha/default.nix +++ b/pkgs/applications/audio/pragha/default.nix @@ -83,7 +83,7 @@ mkDerivation rec { CFLAGS = [ "-DHAVE_PARANOIA_NEW_INCLUDES" ]; - NIX_CFLAGS_COMPILE = "-I${lib.getDev gst_all_1.gst-plugins-base}/include/gstreamer-1.0"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev gst_all_1.gst-plugins-base}/include/gstreamer-1.0"; postInstall = '' qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") diff --git a/pkgs/applications/audio/sayonara/default.nix b/pkgs/applications/audio/sayonara/default.nix index d578a4f3078..e7efb7896be 100644 --- a/pkgs/applications/audio/sayonara/default.nix +++ b/pkgs/applications/audio/sayonara/default.nix @@ -56,7 +56,7 @@ mkDerivation rec { ]; # gstreamer cannot otherwise be found - NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"; + env.NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"; postInstall = '' qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") diff --git a/pkgs/applications/audio/soundscape-renderer/default.nix b/pkgs/applications/audio/soundscape-renderer/default.nix index 3ec2cda4280..7a6399ff3c6 100644 --- a/pkgs/applications/audio/soundscape-renderer/default.nix +++ b/pkgs/applications/audio/soundscape-renderer/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation { # Without it doesn't find all of the boost libraries. BOOST_LIB_DIR = "${boost}/lib"; # uses the deprecated get_generic_category() in boost_system - NIX_CFLAGS_COMPILE = "-DBOOST_SYSTEM_ENABLE_DEPRECATED=1"; + env.NIX_CFLAGS_COMPILE = "-DBOOST_SYSTEM_ENABLE_DEPRECATED=1"; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/applications/audio/tenacity/default.nix b/pkgs/applications/audio/tenacity/default.nix index 525a743965c..c27e3864d27 100644 --- a/pkgs/applications/audio/tenacity/default.nix +++ b/pkgs/applications/audio/tenacity/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" ''; - NIX_CFLAGS_COMPILE = "-D GIT_DESCRIBE=\"\""; + env.NIX_CFLAGS_COMPILE = "-D GIT_DESCRIBE=\"\""; # tenacity only looks for ffmpeg at runtime, so we need to link it in manually NIX_LDFLAGS = toString [ diff --git a/pkgs/applications/audio/transcode/default.nix b/pkgs/applications/audio/transcode/default.nix index da149db0753..55883a4f70e 100644 --- a/pkgs/applications/audio/transcode/default.nix +++ b/pkgs/applications/audio/transcode/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: tcextract-extract_pcm.o:/build/transcode-1.1.7/import/extract_pcm.c:36: multiple definition of # `audio'; tcextract-extract_ac3.o:/build/transcode-1.1.7/import/extract_ac3.c:337: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "Suite of command line utilities for transcoding video and audio codecs, and for converting between different container formats"; diff --git a/pkgs/applications/audio/ympd/default.nix b/pkgs/applications/audio/ympd/default.nix index 218204d690a..83ce36a5958 100644 --- a/pkgs/applications/audio/ympd/default.nix +++ b/pkgs/applications/audio/ympd/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # ld: CMakeFiles/ympd.dir/src/mpd_client.c.o:(.bss+0x0): multiple definition of `mpd'; # CMakeFiles/ympd.dir/src/ympd.c.o:(.bss+0x20): first defined here # Should be fixed by pending https://github.com/notandy/ympd/pull/191 (does not apply as is). - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libmpdclient openssl ]; diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix index 797b4624b96..f490e452b51 100644 --- a/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix +++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { # Force optimization to fix: # warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) - NIX_CFLAGS_COMPILE = "-O3"; + env.NIX_CFLAGS_COMPILE = "-O3"; # Remove pre-built y.tab.c to generate with nixpkgs bison preBuild = '' diff --git a/pkgs/applications/blockchains/cgminer/default.nix b/pkgs/applications/blockchains/cgminer/default.nix index 48a8d3ad930..7d2dbe92085 100644 --- a/pkgs/applications/blockchains/cgminer/default.nix +++ b/pkgs/applications/blockchains/cgminer/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { # ld: cgminer-driver-modminer.o:/build/source/miner.h:285: # multiple definition of `bitforce_drv'; cgminer-cgminer.o:/build/source/miner.h:285: # first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "CPU/GPU miner in c for bitcoin"; diff --git a/pkgs/applications/display-managers/greetd/gtkgreet.nix b/pkgs/applications/display-managers/greetd/gtkgreet.nix index e0ebbb3bc4c..77ddda93371 100644 --- a/pkgs/applications/display-managers/greetd/gtkgreet.nix +++ b/pkgs/applications/display-managers/greetd/gtkgreet.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { ]; # G_APPLICATION_FLAGS_NONE is deprecated in GLib 2.73.3+. - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; meta = with lib; { description = "GTK based greeter for greetd, to be run under cage or similar"; diff --git a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix index 6ce924adf11..172f54bcd2a 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix @@ -266,7 +266,7 @@ let irony = super.irony.overrideAttrs (old: { cmakeFlags = old.cmakeFlags or [ ] ++ [ "-DCMAKE_INSTALL_BINDIR=bin" ]; - NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR"; + env.NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR"; preConfigure = '' cd server ''; diff --git a/pkgs/applications/editors/gnome-latex/default.nix b/pkgs/applications/editors/gnome-latex/default.nix index 573b8cdfee9..e0b7bc9524f 100644 --- a/pkgs/applications/editors/gnome-latex/default.nix +++ b/pkgs/applications/editors/gnome-latex/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { doCheck = true; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; passthru.updateScript = gnome.updateScript { packageName = pname; diff --git a/pkgs/applications/editors/hexcurse/default.nix b/pkgs/applications/editors/hexcurse/default.nix index 9adce387f40..715693770c5 100644 --- a/pkgs/applications/editors/hexcurse/default.nix +++ b/pkgs/applications/editors/hexcurse/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "17ckkxfzbqvvfdnh10if4aqdcq98q3vl6dn1v6f4lhr4ifnyjdlk"; }; buildInputs = [ ncurses ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-overflow" "-Wno-error=stringop-truncation" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=stringop-overflow" "-Wno-error=stringop-truncation" ]; patches = [ # gcc7 compat (fetchpatch { diff --git a/pkgs/applications/editors/ht/default.nix b/pkgs/applications/editors/ht/default.nix index 0460065fe87..42b3f1495a3 100644 --- a/pkgs/applications/editors/ht/default.nix +++ b/pkgs/applications/editors/ht/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { patches = [ ./gcc7.patch ]; - NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-narrowing" ]; meta = with lib; { description = "File editor/viewer/analyzer for executables"; diff --git a/pkgs/applications/editors/nedit/default.nix b/pkgs/applications/editors/nedit/default.nix index b49fbc14fad..41c72cc51ea 100644 --- a/pkgs/applications/editors/nedit/default.nix +++ b/pkgs/applications/editors/nedit/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # the linux config works fine on darwin too! buildFlags = lib.optional (stdenv.isLinux || stdenv.isDarwin) "linux"; - NIX_CFLAGS_COMPILE="-DBUILD_UNTESTED_NEDIT -L${motif}/lib"; + env.NIX_CFLAGS_COMPILE = "-DBUILD_UNTESTED_NEDIT -L${motif}/lib"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/editors/texmaker/default.nix b/pkgs/applications/editors/texmaker/default.nix index 693362f95f6..d4bfdebd6a5 100644 --- a/pkgs/applications/editors/texmaker/default.nix +++ b/pkgs/applications/editors/texmaker/default.nix @@ -11,7 +11,7 @@ mkDerivation rec { buildInputs = [ qtbase qtscript poppler zlib qtwebengine ]; nativeBuildInputs = [ pkg-config poppler qmake ]; - NIX_CFLAGS_COMPILE="-I${poppler.dev}/include/poppler"; + env.NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler"; qmakeFlags = [ "DESKTOPDIR=${placeholder "out"}/share/applications" diff --git a/pkgs/applications/emulators/bsnes/ares/default.nix b/pkgs/applications/emulators/bsnes/ares/default.nix index 36d2dfe1ff3..9914e6e691c 100644 --- a/pkgs/applications/emulators/bsnes/ares/default.nix +++ b/pkgs/applications/emulators/bsnes/ares/default.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { "-C desktop-ui" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.14"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.14"; meta = with lib; { homepage = "https://ares-emu.net"; diff --git a/pkgs/applications/emulators/dosbox-staging/default.nix b/pkgs/applications/emulators/dosbox-staging/default.nix index f26fb7c9d76..baa283d1178 100644 --- a/pkgs/applications/emulators/dosbox-staging/default.nix +++ b/pkgs/applications/emulators/dosbox-staging/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { speexdsp ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${SDL2_image}/include/SDL2" "-I${SDL2_net}/include/SDL2" ]; diff --git a/pkgs/applications/emulators/gens-gs/default.nix b/pkgs/applications/emulators/gens-gs/default.nix index 0fbd12fc365..66c4eb8ada2 100644 --- a/pkgs/applications/emulators/gens-gs/default.nix +++ b/pkgs/applications/emulators/gens-gs/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # Work around build failures on recent GTK. # See http://ubuntuforums.org/showthread.php?p=10535837 - NIX_CFLAGS_COMPILE = "-UGTK_DISABLE_DEPRECATED -UGSEAL_ENABLE"; + env.NIX_CFLAGS_COMPILE = "-UGTK_DISABLE_DEPRECATED -UGSEAL_ENABLE"; meta = with lib; { homepage = "https://segaretro.org/Gens/GS"; diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index aedf42ee126..93348862104 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -117,7 +117,7 @@ stdenv.mkDerivation rec { --subst-var-by mamePath "$out/opt/mame" ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=use-after-free" ]; diff --git a/pkgs/applications/emulators/np2kai/default.nix b/pkgs/applications/emulators/np2kai/default.nix index 4e2f01ade36..4a0ed1d519f 100644 --- a/pkgs/applications/emulators/np2kai/default.nix +++ b/pkgs/applications/emulators/np2kai/default.nix @@ -157,7 +157,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # TODO Remove when bumping past rev22 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; buildPhase = optionalString enableSDL '' cd sdl2 diff --git a/pkgs/applications/emulators/pcsxr/default.nix b/pkgs/applications/emulators/pcsxr/default.nix index 1c0fba3df1c..88a058865ea 100644 --- a/pkgs/applications/emulators/pcsxr/default.nix +++ b/pkgs/applications/emulators/pcsxr/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: AboutDlg.o:/build/pcsxr/gui/Linux.h:42: multiple definition of `cfgfile'; # LnxMain.o:/build/pcsxr/gui/Linux.h:42: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; dynarecTarget = if stdenv.isx86_64 then "x86_64" diff --git a/pkgs/applications/emulators/simh/default.nix b/pkgs/applications/emulators/simh/default.nix index 6f3409ec063..b0cae68ed21 100644 --- a/pkgs/applications/emulators/simh/default.nix +++ b/pkgs/applications/emulators/simh/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # Workaround to build against upstream gcc-10 and clang-11. # Can be removed when next release contains # https://github.com/simh/simh/issues/794 - NIX_CFLAGS_COMPILE = [ "-fcommon" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-fcommon" ]; makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ]; diff --git a/pkgs/applications/emulators/tilem/default.nix b/pkgs/applications/emulators/tilem/default.nix index bde706e2304..c9ba0067ee7 100644 --- a/pkgs/applications/emulators/tilem/default.nix +++ b/pkgs/applications/emulators/tilem/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; buildInputs = [ glib gtk2 libticonv libtifiles2 libticables2 libticalcs2 ]; - NIX_CFLAGS_COMPILE = [ "-lm" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-lm" ]; meta = with lib; { homepage = "http://lpg.ticalc.org/prj_tilem/"; description = "Emulator and debugger for Texas Instruments Z80-based graphing calculators"; diff --git a/pkgs/applications/emulators/uae/default.nix b/pkgs/applications/emulators/uae/default.nix index aeceb0dc6f8..105729f6282 100644 --- a/pkgs/applications/emulators/uae/default.nix +++ b/pkgs/applications/emulators/uae/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: bsdsocket.o:(.bss+0x0): multiple definition of # `socketbases'; main.o:(.bss+0x2792c0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; LDFLAGS = [ "-lm" ]; meta = { diff --git a/pkgs/applications/emulators/zsnes/2.x.nix b/pkgs/applications/emulators/zsnes/2.x.nix index fdb4ad9fa13..c11edd325d3 100644 --- a/pkgs/applications/emulators/zsnes/2.x.nix +++ b/pkgs/applications/emulators/zsnes/2.x.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { dontConfigure = true; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Until upstream fixes the issues... "-Wp,-D_FORTIFY_SOURCE=0" ]; diff --git a/pkgs/applications/emulators/zsnes/default.nix b/pkgs/applications/emulators/zsnes/default.nix index b9dd0f77a4f..1583777a058 100644 --- a/pkgs/applications/emulators/zsnes/default.nix +++ b/pkgs/applications/emulators/zsnes/default.nix @@ -35,7 +35,7 @@ in stdenv.mkDerivation { # Workaround build failure on -fno-common toolchains: # ld: initc.o:(.bss+0x28): multiple definition of `HacksDisable'; cfg.o:(.bss+0x59e3): first defined here # Use pre-c++17 standard (c++17 forbids throw annotations) - NIX_CFLAGS_COMPILE = "-fcommon -std=c++14"; + env.NIX_CFLAGS_COMPILE = "-fcommon -std=c++14"; preConfigure = '' cd src diff --git a/pkgs/applications/file-managers/nnn/default.nix b/pkgs/applications/file-managers/nnn/default.nix index d9ff3b15c79..befbffb46e7 100644 --- a/pkgs/applications/file-managers/nnn/default.nix +++ b/pkgs/applications/file-managers/nnn/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; buildInputs = [ readline ncurses ] ++ lib.optional stdenv.hostPlatform.isMusl musl-fts; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include"; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; makeFlags = [ "PREFIX=$(out)" ] diff --git a/pkgs/applications/file-managers/spacefm/default.nix b/pkgs/applications/file-managers/spacefm/default.nix index 605340cbc85..1cab33edb94 100644 --- a/pkgs/applications/file-managers/spacefm/default.nix +++ b/pkgs/applications/file-managers/spacefm/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # `xsets'; vfs/spacefm-vfs-file-info.o:src/settings.h:123: first defined here # TODO: can be removed once https://github.com/IgnorantGuru/spacefm/pull/772 # or equivalent is merged upstream. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configureFlags = [ "--with-bash-path=${pkgs.bash}/bin/bash" diff --git a/pkgs/applications/graphics/foxotron/default.nix b/pkgs/applications/graphics/foxotron/default.nix index ca2aa96bea1..5f28236b54e 100644 --- a/pkgs/applications/graphics/foxotron/default.nix +++ b/pkgs/applications/graphics/foxotron/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsa-lib fontconfig libGLU ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/applications/graphics/freepv/default.nix b/pkgs/applications/graphics/freepv/default.nix index c69c9af184b..def7e3e9dd8 100644 --- a/pkgs/applications/graphics/freepv/default.nix +++ b/pkgs/applications/graphics/freepv/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { --replace png_set_gray_1_2_4_to_8 png_set_expand_gray_1_2_4_to_8 ''; - NIX_CFLAGS_COMPILE = "-fpermissive -Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-fpermissive -Wno-narrowing"; meta = { description = "Open source panorama viewer using GL"; diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 3ce6c56d94b..8ffc0a0424e 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -154,7 +154,7 @@ in stdenv.mkDerivation rec { doCheck = true; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16"; # Check if librsvg was built with --disable-pixbuf-loader. PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 5f75d2770ac..2077fabc35d 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -236,7 +236,7 @@ in # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: interface.o:(.bss+0xe0): multiple definition of `fimg'; plugin.o:(.bss+0x40): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lm"; src = fetchurl { url = "https://github.com/pixlsus/registry.gimp.org_static/raw/master/registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz"; diff --git a/pkgs/applications/graphics/gnuclad/default.nix b/pkgs/applications/graphics/gnuclad/default.nix index 0ac22106b98..b90735d8508 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 = lib.optional stdenv.cc.isGNU "-Wno-error=catch-value"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=catch-value"; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/applications/graphics/goxel/default.nix b/pkgs/applications/graphics/goxel/default.nix index 8f70d9273b7..8236af42956 100644 --- a/pkgs/applications/graphics/goxel/default.nix +++ b/pkgs/applications/graphics/goxel/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ scons pkg-config wrapGAppsHook ]; buildInputs = [ glfw3 gtk3 libpng12 ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=format-truncation" ]; diff --git a/pkgs/applications/graphics/gqview/default.nix b/pkgs/applications/graphics/gqview/default.nix index 359cfac72dc..847fa9ea5f6 100644 --- a/pkgs/applications/graphics/gqview/default.nix +++ b/pkgs/applications/graphics/gqview/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lm"; meta = with lib; { diff --git a/pkgs/applications/graphics/grafx2/default.nix b/pkgs/applications/graphics/grafx2/default.nix index 48e97e7dbb3..db297f70095 100644 --- a/pkgs/applications/graphics/grafx2/default.nix +++ b/pkgs/applications/graphics/grafx2/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: ../obj/unix/tiles.o:/build/grafx2/src/global.h:306: multiple definition of # `Main_selector'; ../obj/unix/main.o:/build/grafx2/src/global.h:306: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preInstall = '' mkdir -p "$out" ''; diff --git a/pkgs/applications/graphics/hugin/default.nix b/pkgs/applications/graphics/hugin/default.nix index f4d424b3fc3..204cfa387dd 100644 --- a/pkgs/applications/graphics/hugin/default.nix +++ b/pkgs/applications/graphics/hugin/default.nix @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { # disable installation of the python scripting interface cmakeFlags = [ "-DBUILD_HSI:BOOl=OFF" ]; - NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; + env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; postInstall = '' for p in $out/bin/*; do diff --git a/pkgs/applications/graphics/imgcat/default.nix b/pkgs/applications/graphics/imgcat/default.nix index b904dec0856..5d56dbe86d7 100644 --- a/pkgs/applications/graphics/imgcat/default.nix +++ b/pkgs/applications/graphics/imgcat/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-EkVE6BgoA1lo4oqlNETTxLILIVvGXspFyXykxpmYk8M="; }; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; meta = with lib; { description = "It's like cat, but for images"; diff --git a/pkgs/applications/graphics/jpeg-archive/default.nix b/pkgs/applications/graphics/jpeg-archive/default.nix index bd4a580cc46..b8cf63b1887 100644 --- a/pkgs/applications/graphics/jpeg-archive/default.nix +++ b/pkgs/applications/graphics/jpeg-archive/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation { # gcc-10. Otherwise build fails as: # ld: src/util.o:(.bss+0x0): multiple definition of `progname'; /build/ccBZT2Za.o:(.bss+0x20): first defined here # https://github.com/danielgtaylor/jpeg-archive/issues/119 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" diff --git a/pkgs/applications/graphics/krita/generic.nix b/pkgs/applications/graphics/krita/generic.nix index 86d8de46f99..4adedcaffe7 100644 --- a/pkgs/applications/graphics/krita/generic.nix +++ b/pkgs/applications/graphics/krita/generic.nix @@ -33,8 +33,8 @@ mkDerivation rec { xsimd ]; - NIX_CFLAGS_COMPILE = [ "-I${ilmbase.dev}/include/OpenEXR" ] - ++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy"; + env.NIX_CFLAGS_COMPILE = toString ([ "-I${ilmbase.dev}/include/OpenEXR" ] + ++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy"); # Krita runs custom python scripts in CMake with custom PYTHONPATH which krita determined in their CMake script. # Patch the PYTHONPATH so python scripts can import sip successfully. diff --git a/pkgs/applications/graphics/luminance-hdr/default.nix b/pkgs/applications/graphics/luminance-hdr/default.nix index d0cf9af97d2..97d889c285c 100644 --- a/pkgs/applications/graphics/luminance-hdr/default.nix +++ b/pkgs/applications/graphics/luminance-hdr/default.nix @@ -15,7 +15,7 @@ mkDerivation rec { sha256 = "1izmgjjp8mgyxv57sjjr05z7g7059ykb5wchlcn4wrnnb6aslnvn"; }; - NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; + env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; buildInputs = [ qtbase qtdeclarative qttools qtwebengine eigen diff --git a/pkgs/applications/graphics/photoflare/default.nix b/pkgs/applications/graphics/photoflare/default.nix index c3207eb6c57..4e9f33621ff 100644 --- a/pkgs/applications/graphics/photoflare/default.nix +++ b/pkgs/applications/graphics/photoflare/default.nix @@ -17,7 +17,7 @@ mkDerivation rec { qmakeFlags = [ "PREFIX=${placeholder "out"}" ]; - NIX_CFLAGS_COMPILE = "-I${graphicsmagick}/include/GraphicsMagick"; + env.NIX_CFLAGS_COMPILE = "-I${graphicsmagick}/include/GraphicsMagick"; meta = with lib; { description = "A cross-platform image editor with a powerful features and a very friendly graphical user interface"; diff --git a/pkgs/applications/kde/print-manager.nix b/pkgs/applications/kde/print-manager.nix index 2ea662419b1..5fa20097835 100644 --- a/pkgs/applications/kde/print-manager.nix +++ b/pkgs/applications/kde/print-manager.nix @@ -22,5 +22,5 @@ mkDerivation { outputs = [ "out" "dev" ]; # Fix build with cups deprecations etc. # See: https://github.com/NixOS/nixpkgs/issues/73334 - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=format-security"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=format-security"; } diff --git a/pkgs/applications/misc/apvlv/default.nix b/pkgs/applications/misc/apvlv/default.nix index d7dde2a77ff..78d353ce2a8 100644 --- a/pkgs/applications/misc/apvlv/default.nix +++ b/pkgs/applications/misc/apvlv/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "1n4xiic8lqnv3mqi7wpdv866gyyakax71gffv3n9427rmcld465i"; }; - NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler"; + env.NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler"; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/misc/bb/default.nix b/pkgs/applications/misc/bb/default.nix index 94775b97bae..97bd2a1f21c 100644 --- a/pkgs/applications/misc/bb/default.nix +++ b/pkgs/applications/misc/bb/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ''; # error: 'regparm' is not valid on this platform - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-D__STRICT_ANSI__"; meta = with lib; { diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 9bb2a11b7cd..01374737f58 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -132,7 +132,7 @@ stdenv.mkDerivation rec { "-DOPTIX_ROOT_DIR=${optix}" ]; - NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}"; + env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}"; # Since some dependencies are built with gcc 6, we need gcc 6's # libstdc++ in our RPATH. Sigh. diff --git a/pkgs/applications/misc/cataract/build.nix b/pkgs/applications/misc/cataract/build.nix index 2c369e64b5d..9576ee2ebc6 100644 --- a/pkgs/applications/misc/cataract/build.nix +++ b/pkgs/applications/misc/cataract/build.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation { # avoid build failures like: # ld: stats.o:/build/cataract-675e647/src/stats.h:24: multiple definition of # `stats_images'; cgg.o:/build/cataract-675e647/src/stats.h:24: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' mkdir $out/{bin,share} -p diff --git a/pkgs/applications/misc/getxbook/default.nix b/pkgs/applications/misc/getxbook/default.nix index 6ac5f2327f0..dd091563fde 100644 --- a/pkgs/applications/misc/getxbook/default.nix +++ b/pkgs/applications/misc/getxbook/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs"; }; - NIX_CFLAGS_COMPILE = builtins.toString ( + env.NIX_CFLAGS_COMPILE = builtins.toString ( [ "-Wno-error=deprecated-declarations" ] ++ lib.optionals (!stdenv.cc.isClang) [ "-Wno-error=format-truncation" diff --git a/pkgs/applications/misc/gmtp/default.nix b/pkgs/applications/misc/gmtp/default.nix index 953aad85ae8..a8465538b50 100644 --- a/pkgs/applications/misc/gmtp/default.nix +++ b/pkgs/applications/misc/gmtp/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { # ld: gmtp-preferences.o:src/main.h:72: multiple definition of # `scrolledwindowMain'; gmtp-about.o:src/main.h:72: first defined here # TODO: can be removed when 1.4.0 is released. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preFixup = '' gappsWrapperArgs+=(--add-flags "--datapath $out/share"); diff --git a/pkgs/applications/misc/gpsbabel/default.nix b/pkgs/applications/misc/gpsbabel/default.nix index 888672b5fa0..60a1e40a614 100644 --- a/pkgs/applications/misc/gpsbabel/default.nix +++ b/pkgs/applications/misc/gpsbabel/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { # Floating point behavior on i686 causes nmea.test failures. Preventing # extended precision fixes this problem. - NIX_CFLAGS_COMPILE = lib.optional stdenv.isi686 "-ffloat-store"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-ffloat-store"; doCheck = true; diff --git a/pkgs/applications/misc/gxneur/default.nix b/pkgs/applications/misc/gxneur/default.nix index 7c32cec7219..53873af2b07 100644 --- a/pkgs/applications/misc/gxneur/default.nix +++ b/pkgs/applications/misc/gxneur/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; nativeBuildInputs = [ pkg-config intltool ]; buildInputs = [ diff --git a/pkgs/applications/misc/keepassxc/default.nix b/pkgs/applications/misc/keepassxc/default.nix index fd37735c64c..1870c21bed1 100644 --- a/pkgs/applications/misc/keepassxc/default.nix +++ b/pkgs/applications/misc/keepassxc/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-amedKK9nplLVJTldeabN3/c+g/QesrdH+qx+rba2/4s="; }; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang [ "-Wno-old-style-cast" "-Wno-error" "-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}" diff --git a/pkgs/applications/misc/klayout/default.nix b/pkgs/applications/misc/klayout/default.nix index 4348afb0205..2e98be7b558 100644 --- a/pkgs/applications/misc/klayout/default.nix +++ b/pkgs/applications/misc/klayout/default.nix @@ -45,7 +45,7 @@ mkDerivation rec { mv $out/lib/klayout $out/bin/ ''; - NIX_CFLAGS_COMPILE = [ "-Wno-parentheses" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ]; dontInstall = true; # Installation already happens as part of "build.sh" diff --git a/pkgs/applications/misc/lsd2dsl/default.nix b/pkgs/applications/misc/lsd2dsl/default.nix index eceb9308fc0..b46c6ea2afa 100644 --- a/pkgs/applications/misc/lsd2dsl/default.nix +++ b/pkgs/applications/misc/lsd2dsl/default.nix @@ -17,7 +17,7 @@ mkDerivation rec { buildInputs = [ boost libvorbis libsndfile minizip gtest qtwebkit ]; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=missing-braces"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=missing-braces"; desktopItems = lib.singleton (makeDesktopItem { name = "lsd2dsl"; diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index e5e0f92ed1d..4ba4d992835 100644 --- a/pkgs/applications/misc/mysql-workbench/default.nix +++ b/pkgs/applications/misc/mysql-workbench/default.nix @@ -140,7 +140,7 @@ in stdenv.mkDerivation rec { patchShebangs tools/get_wb_version.sh ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ # error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated "-Wno-error=deprecated-declarations" ] ++ lib.optionals stdenv.isAarch64 [ @@ -149,7 +149,7 @@ in stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but problematic with some old GCCs "-Wno-error=maybe-uninitalized" - ]; + ]); cmakeFlags = [ "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config" diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix index 4a3025cec55..31adb54ac71 100644 --- a/pkgs/applications/misc/nut/default.nix +++ b/pkgs/applications/misc/nut/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; meta = with lib; { description = "Network UPS Tools"; diff --git a/pkgs/applications/misc/opencpn/default.nix b/pkgs/applications/misc/opencpn/default.nix index 357f4fcd87e..313f61e28ce 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" ]; - 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/misc/opentrack/aruco.nix b/pkgs/applications/misc/opentrack/aruco.nix index 2c28d0e8d39..dddbfe78bea 100644 --- a/pkgs/applications/misc/opentrack/aruco.nix +++ b/pkgs/applications/misc/opentrack/aruco.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { buildInputs = [ opencv4 ]; - NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3"; + env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3"; preInstall = '' mkdir -p $out/include/aruco diff --git a/pkgs/applications/misc/opentrack/default.nix b/pkgs/applications/misc/opentrack/default.nix index 7be07093cd1..b4c455c0ce0 100644 --- a/pkgs/applications/misc/opentrack/default.nix +++ b/pkgs/applications/misc/opentrack/default.nix @@ -42,7 +42,7 @@ in nativeBuildInputs = [cmake pkg-config ninja copyDesktopItems]; buildInputs = [qtbase qttools opencv4 procps eigen libXdmcp libevdev aruco]; - NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3"; + env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3"; dontWrapQtApps = true; cmakeFlags = [ diff --git a/pkgs/applications/misc/osm2xmap/default.nix b/pkgs/applications/misc/osm2xmap/default.nix index ef31ed2f033..545ea498002 100644 --- a/pkgs/applications/misc/osm2xmap/default.nix +++ b/pkgs/applications/misc/osm2xmap/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { "INSTALL_MANDIR=${placeholder "out"}/share/man/man1" ]; - NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"; + env.NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"; buildInputs = [ libroxml proj_7 yaml-cpp_0_3 boost ]; diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index c0a1e7e0217..702a7769200 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -115,7 +115,7 @@ stdenv.mkDerivation rec { # Disable compiler warnings that clutter the build log. # It seems to be a known issue for Eigen: # http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221 - NIX_CFLAGS_COMPILE = "-Wno-ignored-attributes"; + env.NIX_CFLAGS_COMPILE = "-Wno-ignored-attributes"; # prusa-slicer uses dlopen on `libudev.so` at runtime NIX_LDFLAGS = lib.optionalString withSystemd "-ludev"; diff --git a/pkgs/applications/misc/pw-viz/default.nix b/pkgs/applications/misc/pw-viz/default.nix index f32f60bac1a..6d63ccd05ee 100644 --- a/pkgs/applications/misc/pw-viz/default.nix +++ b/pkgs/applications/misc/pw-viz/default.nix @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec { # enables pipewire API deprecated in 0.3.64 # fixes error caused by https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55 - NIX_CFLAGS_COMPILE = [ "-DPW_ENABLE_DEPRECATED" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DPW_ENABLE_DEPRECATED" ]; meta = with lib; { description = "A simple and elegant pipewire graph editor "; diff --git a/pkgs/applications/misc/qlcplus/default.nix b/pkgs/applications/misc/qlcplus/default.nix index 9096a56a421..e27f2a0bdca 100644 --- a/pkgs/applications/misc/qlcplus/default.nix +++ b/pkgs/applications/misc/qlcplus/default.nix @@ -29,7 +29,7 @@ mkDerivation rec { qmakeFlags = [ "INSTALLROOT=$(out)" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; postPatch = '' patchShebangs . diff --git a/pkgs/applications/misc/sdcv/default.nix b/pkgs/applications/misc/sdcv/default.nix index 22356ac1a8d..5e2381ccfab 100644 --- a/pkgs/applications/misc/sdcv/default.nix +++ b/pkgs/applications/misc/sdcv/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { mkdir locale ''; - NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"; + env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"; meta = with lib; { homepage = "https://dushistov.github.io/sdcv/"; diff --git a/pkgs/applications/misc/slade/default.nix b/pkgs/applications/misc/slade/default.nix index 3682325caff..a62812a73d1 100644 --- a/pkgs/applications/misc/slade/default.nix +++ b/pkgs/applications/misc/slade/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { "-DwxWidgets_LIBRARIES=${wxGTK}/lib" ]; - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; meta = with lib; { description = "Doom editor"; diff --git a/pkgs/applications/misc/slade/git.nix b/pkgs/applications/misc/slade/git.nix index d336d460d7c..1df734af5e0 100644 --- a/pkgs/applications/misc/slade/git.nix +++ b/pkgs/applications/misc/slade/git.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { "-DwxWidgets_LIBRARIES=${wxGTK}/lib" ]; - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; meta = with lib; { description = "Doom editor"; diff --git a/pkgs/applications/misc/syncthingtray/default.nix b/pkgs/applications/misc/syncthingtray/default.nix index 11273fd14d8..5d583181ce6 100644 --- a/pkgs/applications/misc/syncthingtray/default.nix +++ b/pkgs/applications/misc/syncthingtray/default.nix @@ -41,7 +41,7 @@ mkDerivation rec { # Hence we use a C definition with NIX_CFLAGS_COMPILE ./use-nix-path-in-autostart.patch ]; - NIX_CFLAGS_COMPILE = "-DEXEC_NIX_PATH=\"${placeholder "out"}/bin/syncthingtray\""; + env.NIX_CFLAGS_COMPILE = "-DEXEC_NIX_PATH=\"${placeholder "out"}/bin/syncthingtray\""; buildInputs = [ qtbase diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index 401d4e00db1..90fbdb87fc8 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { ]; # Silences many warnings - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-inconsistent-missing-override"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-inconsistent-missing-override"; cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF" # NSFilenamesPboardType is deprecated in 10.14+ diff --git a/pkgs/applications/misc/tilemaker/default.nix b/pkgs/applications/misc/tilemaker/default.nix index dd05604501e..a158badc884 100644 --- a/pkgs/applications/misc/tilemaker/default.nix +++ b/pkgs/applications/misc/tilemaker/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DPROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"; - NIX_CFLAGS_COMPILE = [ "-DTM_VERSION=${finalAttrs.version}" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DTM_VERSION=${finalAttrs.version}" ]; postInstall = '' installManPage ../docs/man/tilemaker.1 diff --git a/pkgs/applications/misc/vp/default.nix b/pkgs/applications/misc/vp/default.nix index d133331a0a7..5d280292134 100644 --- a/pkgs/applications/misc/vp/default.nix +++ b/pkgs/applications/misc/vp/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ SDL SDL_image ]; - NIX_CFLAGS_COMPILE="-I${SDL}/include/SDL -I${SDL_image}/include/SDL"; + env.NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL -I${SDL_image}/include/SDL"; meta = with lib; { homepage = "https://brlcad.org/~erik/"; diff --git a/pkgs/applications/misc/xmr-stak/default.nix b/pkgs/applications/misc/xmr-stak/default.nix index 5fffac0c777..823d17ba366 100644 --- a/pkgs/applications/misc/xmr-stak/default.nix +++ b/pkgs/applications/misc/xmr-stak/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { sha256 = "0ilx5mhh91ks7dwvykfyynh53l6vkkignjpwkkss8ss6b2k8gdbj"; }; - NIX_CFLAGS_COMPILE = "-O3"; + env.NIX_CFLAGS_COMPILE = "-O3"; patches = [ (fetchpatch { name = "fix-libmicrohttpd-0-9-71.patch"; diff --git a/pkgs/applications/misc/xsw/default.nix b/pkgs/applications/misc/xsw/default.nix index a664aec45e1..5248ed2f604 100644 --- a/pkgs/applications/misc/xsw/default.nix +++ b/pkgs/applications/misc/xsw/default.nix @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { buildInputs = [ SDL SDL_image SDL_ttf SDL_gfx ]; - NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ SDL SDL_image SDL_ttf SDL_gfx ]); + env.NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ SDL SDL_image SDL_ttf SDL_gfx ]); patches = [ ./parse.patch # Fixes compilation error by avoiding redundant definitions. diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index b79c69275ad..0da93d03624 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -324,7 +324,7 @@ let # Don't spam warnings about unknown warning options. This is useful because # our Clang is always older than Chromium's and the build logs have a size # of approx. 25 MB without this option (and this saves e.g. 66 %). - NIX_CFLAGS_COMPILE = "-Wno-unknown-warning-option"; + env.NIX_CFLAGS_COMPILE = "-Wno-unknown-warning-option"; buildPhase = let buildCommand = target: '' diff --git a/pkgs/applications/networking/browsers/dillo/default.nix b/pkgs/applications/networking/browsers/dillo/default.nix index aff0042ded3..ab79c1bd8f9 100644 --- a/pkgs/applications/networking/browsers/dillo/default.nix +++ b/pkgs/applications/networking/browsers/dillo/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation { # Workaround build failure on -fno-common toolchains: # ld: main.o:/build/dillo-3.0.5/dpid/dpid.h:64: multiple definition of `sock_set'; # dpid.o:/build/dillo-3.0.5/dpid/dpid.h:64: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configureFlags = [ "--enable-ssl=yes" ]; diff --git a/pkgs/applications/networking/browsers/dillong/default.nix b/pkgs/applications/networking/browsers/dillong/default.nix index 7fc7cc07121..41c72fddef4 100644 --- a/pkgs/applications/networking/browsers/dillong/default.nix +++ b/pkgs/applications/networking/browsers/dillong/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { # Workaround build failure on -fno-common toolchains: # ld: main.o:/build/dillo-3.0.5/dpid/dpid.h:64: multiple definition of `sock_set'; # dpid.o:/build/dillo-3.0.5/dpid/dpid.h:64: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "Fork of Dillo, a lightweight web browser"; diff --git a/pkgs/applications/networking/browsers/ladybird/default.nix b/pkgs/applications/networking/browsers/ladybird/default.nix index 0683b5210cb..da5f1838679 100644 --- a/pkgs/applications/networking/browsers/ladybird/default.nix +++ b/pkgs/applications/networking/browsers/ladybird/default.nix @@ -49,13 +49,13 @@ stdenv.mkDerivation { "-DENABLE_UNICODE_DATABASE_DOWNLOAD=false" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error" ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.0") [ # error: use of undeclared identifier 'aligned_alloc' "-include mm_malloc.h" "-Daligned_alloc=_mm_malloc" - ]; + ]); # https://github.com/NixOS/nixpkgs/issues/201254 NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc"; diff --git a/pkgs/applications/networking/browsers/netsurf/libcss.nix b/pkgs/applications/networking/browsers/netsurf/libcss.nix index 7777bb243fa..db5a39f2285 100644 --- a/pkgs/applications/networking/browsers/netsurf/libcss.nix +++ b/pkgs/applications/networking/browsers/netsurf/libcss.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { "NSSHARED=${buildsystem}/share/netsurf-buildsystem" ]; - NIX_CFLAGS_COMPILE= [ "-Wno-error=implicit-fallthrough" "-Wno-error=maybe-uninitialized" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-fallthrough" "-Wno-error=maybe-uninitialized" ]; meta = with lib; { homepage = "https://www.netsurf-browser.org/projects/${libname}/"; diff --git a/pkgs/applications/networking/browsers/netsurf/libwapcaplet.nix b/pkgs/applications/networking/browsers/netsurf/libwapcaplet.nix index 318885bd272..6a2918fa7d9 100644 --- a/pkgs/applications/networking/browsers/netsurf/libwapcaplet.nix +++ b/pkgs/applications/networking/browsers/netsurf/libwapcaplet.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { "NSSHARED=${buildsystem}/share/netsurf-buildsystem" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type"; meta = with lib; { homepage = "https://www.netsurf-browser.org/projects/${libname}/"; diff --git a/pkgs/applications/networking/calls/default.nix b/pkgs/applications/networking/calls/default.nix index 557754ac50f..6475480b219 100644 --- a/pkgs/applications/networking/calls/default.nix +++ b/pkgs/applications/networking/calls/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { xvfb-run ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; mesonFlags = [ "-Dgtk_doc=true" diff --git a/pkgs/applications/networking/freefilesync/default.nix b/pkgs/applications/networking/freefilesync/default.nix index 49bc342724e..dab4de6f2fe 100644 --- a/pkgs/applications/networking/freefilesync/default.nix +++ b/pkgs/applications/networking/freefilesync/default.nix @@ -57,7 +57,7 @@ gcc12Stdenv.mkDerivation rec { wxGTK32 ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Undef g_object_ref on GLib 2.56+ "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_54" "-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_54" diff --git a/pkgs/applications/networking/ids/snort/default.nix b/pkgs/applications/networking/ids/snort/default.nix index f83a0757b26..9a6dd217e5d 100644 --- a/pkgs/applications/networking/ids/snort/default.nix +++ b/pkgs/applications/networking/ids/snort/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper pkg-config ]; buildInputs = [ luajit openssl libpcap pcre libdnet daq zlib flex bison libtirpc ]; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/instant-messengers/baresip/default.nix b/pkgs/applications/networking/instant-messengers/baresip/default.nix index f9756594c5c..d0fe18e1538 100644 --- a/pkgs/applications/networking/instant-messengers/baresip/default.nix +++ b/pkgs/applications/networking/instant-messengers/baresip/default.nix @@ -107,7 +107,7 @@ stdenv.mkDerivation rec { ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ; - NIX_CFLAGS_COMPILE = '' -I${librem}/include/rem -I${gsm}/include/gsm + env.NIX_CFLAGS_COMPILE = '' -I${librem}/include/rem -I${gsm}/include/gsm -DHAVE_INTTYPES_H -D__GLIBC__ -D__need_timeval -D__need_timespec -D__need_time_t ''; diff --git a/pkgs/applications/networking/instant-messengers/fractal-next/default.nix b/pkgs/applications/networking/instant-messengers/fractal-next/default.nix index 9203850b638..360234ba3c6 100644 --- a/pkgs/applications/networking/instant-messengers/fractal-next/default.nix +++ b/pkgs/applications/networking/instant-messengers/fractal-next/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { # enables pipewire API deprecated in 0.3.64 # fixes error caused by https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55 - NIX_CFLAGS_COMPILE = [ "-DPW_ENABLE_DEPRECATED" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DPW_ENABLE_DEPRECATED" ]; meta = with lib; { description = "Matrix group messaging app (development version)"; diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix index 9845491f235..0b51d172b74 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1gjm0z4wa5vi9x1xk43rany5pffrwg958n180ahdj9a7sa8a4hpm"; }; - NIX_CFLAGS_COMPILE = builtins.toString [ + env.NIX_CFLAGS_COMPILE = builtins.toString [ # glib-2.62 deprecations "-DGLIB_DISABLE_DEPRECATION_WARNINGS" # override "-O0 -Werror" set by build system 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 36a5a0a7c90..1a1fd3b409a 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 - 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/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index 2023997aa81..d3700a66be7 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix @@ -18,7 +18,7 @@ let unwrapped = stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper intltool ]; - NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"; + env.NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"; buildInputs = let python-with-dbus = python3.withPackages (pp: with pp; [ dbus-python ]); diff --git a/pkgs/applications/networking/irc/bip/default.nix b/pkgs/applications/networking/irc/bip/default.nix index c144b4bf585..f6341a4d744 100644 --- a/pkgs/applications/networking/irc/bip/default.nix +++ b/pkgs/applications/networking/irc/bip/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { }) ]; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=duplicate-decl-specifier"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=duplicate-decl-specifier"; meta = { description = "An IRC proxy (bouncer)"; diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix index 4bc930b12d0..02927d870c9 100644 --- a/pkgs/applications/networking/irc/quassel/default.nix +++ b/pkgs/applications/networking/irc/quassel/default.nix @@ -43,7 +43,7 @@ in (if !buildClient then stdenv.mkDerivation else mkDerivation) rec { }; # Prevent ``undefined reference to `qt_version_tag''' in SSL check - NIX_CFLAGS_COMPILE = "-DQT_NO_VERSION_TAGGING=1"; + env.NIX_CFLAGS_COMPILE = "-DQT_NO_VERSION_TAGGING=1"; nativeBuildInputs = [ cmake makeWrapper ]; buildInputs = [ qtbase boost zlib ] diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 478b28190ae..ad460fe6c77 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -65,7 +65,7 @@ let ++ concatMap (p: p.buildInputs) enabledPlugins ++ extraBuildInputs; - NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}" + env.NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}" # Fix '_res_9_init: undefined symbol' error + (lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv"); diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index 6a705959a11..c9b6ac807a0 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -71,7 +71,7 @@ let ++ lib.optional (!pipewireSupport) "-D pipewire=OFF" ++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON"; - NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher"; + env.NIX_CFLAGS_COMPILE = lib.optionalString speechdSupport "-I${speechd}/include/speech-dispatcher"; postFixup = '' wrapProgram $out/bin/mumble \ diff --git a/pkgs/applications/networking/offrss/default.nix b/pkgs/applications/networking/offrss/default.nix index cad7339fe08..773ec444edf 100644 --- a/pkgs/applications/networking/offrss/default.nix +++ b/pkgs/applications/networking/offrss/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: serve_pdf.o:offrss.h:75: multiple definition of `cgi_url_path'; # offrss.o:offrss.h:75: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configurePhase = '' substituteInPlace Makefile \ diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix index 840cd97cda2..dd1842e7d47 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; }; - 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/networking/remote/putty/default.nix b/pkgs/applications/networking/remote/putty/default.nix index 6249cce973e..4d8c1ee9dc4 100644 --- a/pkgs/applications/networking/remote/putty/default.nix +++ b/pkgs/applications/networking/remote/putty/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; preConfigure = lib.optionalString stdenv.hostPlatform.isUnix '' perl mkfiles.pl diff --git a/pkgs/applications/networking/sniffers/ettercap/default.nix b/pkgs/applications/networking/sniffers/ettercap/default.nix index a3c79fd9560..a51f88ad5f7 100644 --- a/pkgs/applications/networking/sniffers/ettercap/default.nix +++ b/pkgs/applications/networking/sniffers/ettercap/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ]; # TODO: Remove after the next release (0.8.4 should work without this): - NIX_CFLAGS_COMPILE = [ "-I${harfbuzz.dev}/include/harfbuzz" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${harfbuzz.dev}/include/harfbuzz" ]; meta = with lib; { description = "Comprehensive suite for man in the middle attacks"; diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 1dabe93728c..47687bb544c 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -34,7 +34,7 @@ in stdenv.mkDerivation { ]; # Avoid referencing -dev paths because of debug assertions. - NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DQT_NO_DEBUG" ]; nativeBuildInputs = [ asciidoctor bison cmake flex makeWrapper pkg-config python3 perl ] ++ lib.optionals withQt [ qt5.wrapQtAppsHook wrapGAppsHook ]; diff --git a/pkgs/applications/office/calligra/default.nix b/pkgs/applications/office/calligra/default.nix index 57b23ea95d1..302419fdcef 100644 --- a/pkgs/applications/office/calligra/default.nix +++ b/pkgs/applications/office/calligra/default.nix @@ -69,7 +69,7 @@ mkDerivation rec { propagatedUserEnvPkgs = [ kproperty ]; - NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; + env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; qtWrapperArgs = [ "--prefix PATH : ${lib.getBin pstoedit}/bin" diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index f9e9ec57704..65a2d579d3f 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"; - 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/office/kmymoney/default.nix b/pkgs/applications/office/kmymoney/default.nix index dfab08ace2d..3b39f88add7 100644 --- a/pkgs/applications/office/kmymoney/default.nix +++ b/pkgs/applications/office/kmymoney/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ]; # Hidden dependency that wasn't included in CMakeLists.txt: - NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5"; + env.NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5"; nativeBuildInputs = [ doxygen extra-cmake-modules graphviz kdoctools diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index 6590e625577..8fa7d6d78a7 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -176,7 +176,7 @@ in outputs = [ "out" "dev" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${librdf_rasqal}/include/rasqal" # librdf_redland refers to rasqal.h instead of rasqal/rasqal.h "-fno-visibility-inlines-hidden" # https://bugs.documentfoundation.org/show_bug.cgi?id=78174#c10 ]; diff --git a/pkgs/applications/office/mmex/default.nix b/pkgs/applications/office/mmex/default.nix index b84502170bf..4846279569f 100644 --- a/pkgs/applications/office/mmex/default.nix +++ b/pkgs/applications/office/mmex/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { libobjc ]; - NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-Wno-old-style-cast" ]); diff --git a/pkgs/applications/office/teapot/default.nix b/pkgs/applications/office/teapot/default.nix index d2d44511bc6..209fa7c4556 100644 --- a/pkgs/applications/office/teapot/default.nix +++ b/pkgs/applications/office/teapot/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ]; # By no known reason libtirpc is not detected - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-ltirpc" ]; cmakeConfigureFlags = [ diff --git a/pkgs/applications/office/treesheets/default.nix b/pkgs/applications/office/treesheets/default.nix index 4ddbd42259d..6b318e7a7d6 100644 --- a/pkgs/applications/office/treesheets/default.nix +++ b/pkgs/applications/office/treesheets/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { Cocoa ]; - NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\""; + env.NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\""; postInstall = lib.optionalString stdenv.isDarwin '' shopt -s extglob diff --git a/pkgs/applications/office/wordgrinder/default.nix b/pkgs/applications/office/wordgrinder/default.nix index 0b086160e50..3647d8ea8e2 100644 --- a/pkgs/applications/office/wordgrinder/default.nix +++ b/pkgs/applications/office/wordgrinder/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { ]; # To be able to find - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-I${libXft.dev}/include/X11"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-I${libXft.dev}/include/X11"; # Binaries look for LuaFileSystem library (lfs.so) at runtime postInstall = '' diff --git a/pkgs/applications/radio/dump1090/default.nix b/pkgs/applications/radio/dump1090/default.nix index a67b48c840b..defed4dc431 100644 --- a/pkgs/applications/radio/dump1090/default.nix +++ b/pkgs/applications/radio/dump1090/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { hackrf ] ++ lib.optional stdenv.isLinux limesuite; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-implicit-function-declaration -Wno-int-conversion"; buildFlags = [ "dump1090" "view1090" ]; diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index 06cb2776a0b..605a916c6b4 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" ]; - 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/sdrpp/default.nix b/pkgs/applications/radio/sdrpp/default.nix index f2bb7920ea4..b539426d967 100644 --- a/pkgs/applications/radio/sdrpp/default.nix +++ b/pkgs/applications/radio/sdrpp/default.nix @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { OPT_BUILD_RIGCTL_SERVER = rigctl_server; }; - NIX_CFLAGS_COMPILE = "-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; hardeningDisable = lib.optional stdenv.cc.isClang "format"; diff --git a/pkgs/applications/radio/soapyremote/default.nix b/pkgs/applications/radio/soapyremote/default.nix index 95f429aef43..ebb34b0a0ce 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/" ]; - 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/radio/xlog/default.nix b/pkgs/applications/radio/xlog/default.nix index d47bd418f51..fe2b915e93a 100644 --- a/pkgs/applications/radio/xlog/default.nix +++ b/pkgs/applications/radio/xlog/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ glib gtk2 hamlib ]; diff --git a/pkgs/applications/science/astronomy/astrolog/default.nix b/pkgs/applications/science/astronomy/astrolog/default.nix index 26d0639ae67..743a58e9e05 100644 --- a/pkgs/applications/science/astronomy/astrolog/default.nix +++ b/pkgs/applications/science/astronomy/astrolog/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ''; buildInputs = [ xorg.libX11 ]; - NIX_CFLAGS_COMPILE = "-Wno-format-security"; + env.NIX_CFLAGS_COMPILE = "-Wno-format-security"; installPhase = let diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index 50eee7d3aa3..64e3f8713b2 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; NIX_LDFLAGS = lib.optionalString stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks"); diff --git a/pkgs/applications/science/astronomy/xplanet/default.nix b/pkgs/applications/science/astronomy/xplanet/default.nix index d284171831b..94aa92a1b71 100644 --- a/pkgs/applications/science/astronomy/xplanet/default.nix +++ b/pkgs/applications/science/astronomy/xplanet/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { }) ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; meta = with lib; { description = "Renders an image of the earth or other planets into the X root window"; diff --git a/pkgs/applications/science/biology/bayescan/default.nix b/pkgs/applications/science/biology/bayescan/default.nix index cd5bb321036..e715ff4b45b 100644 --- a/pkgs/applications/science/biology/bayescan/default.nix +++ b/pkgs/applications/science/biology/bayescan/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { cp -r ../*pdf ../input_examples ../"R functions" $out/share/doc/bayescan ''; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; meta = with lib; { description = "Detecting natural selection from population-based genetic data"; diff --git a/pkgs/applications/science/biology/cmtk/default.nix b/pkgs/applications/science/biology/cmtk/default.nix index 42ce5f934e8..3eef6483725 100644 --- a/pkgs/applications/science/biology/cmtk/default.nix +++ b/pkgs/applications/science/biology/cmtk/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" (lib.optional stdenv.cc.isClang "-Wno-error=c++11-narrowing") ]; diff --git a/pkgs/applications/science/biology/freebayes/default.nix b/pkgs/applications/science/biology/freebayes/default.nix index 5c2f09a4fae..0ceaab4ab46 100644 --- a/pkgs/applications/science/biology/freebayes/default.nix +++ b/pkgs/applications/science/biology/freebayes/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: foomatic_rip-options.o:/build/foomatic-filters-4.0.17/options.c:49: multiple definition of `cupsfilter'; # foomatic_rip-foomaticrip.o:/build/foomatic-filters-4.0.17/foomaticrip.c:158: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' install -vD bin/freebayes bin/bamleftalign scripts/* -t $out/bin diff --git a/pkgs/applications/science/biology/minia/default.nix b/pkgs/applications/science/biology/minia/default.nix index 6b6bc300e0d..023a05d7504 100644 --- a/pkgs/applications/science/biology/minia/default.nix +++ b/pkgs/applications/science/biology/minia/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { patches = [ ./no-bundle.patch ]; - NIX_CFLAGS_COMPILE = [ "-Wformat" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wformat" ]; nativeBuildInputs = [ cmake ]; buildInputs = [ hdf5 boost ]; diff --git a/pkgs/applications/science/biology/niftyreg/default.nix b/pkgs/applications/science/biology/niftyreg/default.nix index d5f625893e9..0be59bcd726 100644 --- a/pkgs/applications/science/biology/niftyreg/default.nix +++ b/pkgs/applications/science/biology/niftyreg/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "07v9v9s41lvw72wpb1jgh2nzanyc994779bd35p76vg8mzifmprl"; }; - NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=narrowing" ]; nativeBuildInputs = [ cmake ]; buildInputs = [ zlib ]; diff --git a/pkgs/applications/science/biology/octopus/default.nix b/pkgs/applications/science/biology/octopus/default.nix index b7c8c138cb8..c2948087d8e 100644 --- a/pkgs/applications/science/biology/octopus/default.nix +++ b/pkgs/applications/science/biology/octopus/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY="; }) ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=deprecated-declarations" ]; diff --git a/pkgs/applications/science/biology/paml/default.nix b/pkgs/applications/science/biology/paml/default.nix index 66ba244cacd..871c76dc6e3 100644 --- a/pkgs/applications/science/biology/paml/default.nix +++ b/pkgs/applications/science/biology/paml/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: /build/ccKomtcd.o:(.bss+0x4544): multiple definition of `SeqTypes'; # /build/ccx7EsgU.o:(.bss+0x2a0dfdc): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preBuild = '' cd ./src/ diff --git a/pkgs/applications/science/biology/strelka/default.nix b/pkgs/applications/science/biology/strelka/default.nix index 8585f3770fb..9730601e4e7 100644 --- a/pkgs/applications/science/biology/strelka/default.nix +++ b/pkgs/applications/science/biology/strelka/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ zlib python2 ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" "-Wno-error=pessimizing-move" ]; diff --git a/pkgs/applications/science/biology/svaba/default.nix b/pkgs/applications/science/biology/svaba/default.nix index b1a174aaf88..441c7ed6dcc 100644 --- a/pkgs/applications/science/biology/svaba/default.nix +++ b/pkgs/applications/science/biology/svaba/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: ./libfml.a(rle.o):/build/source/SeqLib/fermi-lite/rle.h:33: multiple definition of # `rle_auxtab'; ./libfml.a(misc.o):/build/source/SeqLib/fermi-lite/rle.h:33: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' runHook preInstall diff --git a/pkgs/applications/science/chemistry/avogadro/default.nix b/pkgs/applications/science/chemistry/avogadro/default.nix index c6339bab122..547123b6795 100644 --- a/pkgs/applications/science/chemistry/avogadro/default.nix +++ b/pkgs/applications/science/chemistry/avogadro/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config doxygen ]; - NIX_CFLAGS_COMPILE = "-include ${libGLU.dev}/include/GL/glu.h"; + env.NIX_CFLAGS_COMPILE = "-include ${libGLU.dev}/include/GL/glu.h"; patches = [ (fetchurl { diff --git a/pkgs/applications/science/chemistry/chemtool/default.nix b/pkgs/applications/science/chemistry/chemtool/default.nix index 37057e1c604..fe2d658b5a4 100644 --- a/pkgs/applications/science/chemistry/chemtool/default.nix +++ b/pkgs/applications/science/chemistry/chemtool/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { # Otherwise built fails as: # ld: inout.o:/build/chemtool-1.6.14/ct1.h:279: multiple definition of # `outtype'; draw.o:/build/chemtool-1.6.14/ct1.h:279: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preFixup = '' gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}") diff --git a/pkgs/applications/science/chemistry/pymol/default.nix b/pkgs/applications/science/chemistry/pymol/default.nix index 4ad0380ef1e..15a1e315823 100644 --- a/pkgs/applications/science/chemistry/pymol/default.nix +++ b/pkgs/applications/science/chemistry/pymol/default.nix @@ -48,7 +48,7 @@ python3Packages.buildPythonApplication rec { nativeBuildInputs = [ qt5.wrapQtAppsHook ]; buildInputs = [ python3Packages.numpy python3Packages.pyqt5 glew glm libpng libxml2 freetype msgpack netcdf ]; - NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2"; hardeningDisable = [ "format" ]; installPhase = '' diff --git a/pkgs/applications/science/computer-architecture/timeloop/default.nix b/pkgs/applications/science/computer-architecture/timeloop/default.nix index 9b277ac650b..4e794aaa29e 100644 --- a/pkgs/applications/science/computer-architecture/timeloop/default.nix +++ b/pkgs/applications/science/computer-architecture/timeloop/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { #link-time optimization fails on darwin #see https://github.com/NixOS/nixpkgs/issues/19098 - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-fno-lto"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto"; postPatch = '' # use nix ar/ranlib diff --git a/pkgs/applications/science/electronics/fped/default.nix b/pkgs/applications/science/electronics/fped/default.nix index b1244b79a89..138d45c787c 100644 --- a/pkgs/applications/science/electronics/fped/default.nix +++ b/pkgs/applications/science/electronics/fped/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { # Workaround build failure on -fno-common toolchains: # ld: postscript.o:postscript.h:29: multiple definition of # `postscript_params'; fped.o:postscript.h:29: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # This uses '/bin/bash', '/usr/local' and 'lex' by default makeFlags = [ diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix index 22b65f2da31..fdda4b2b0af 100644 --- a/pkgs/applications/science/electronics/fritzing/default.nix +++ b/pkgs/applications/science/electronics/fritzing/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { cp -a ${parts}/* parts/ ''; - NIX_CFLAGS_COMPILE = "-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip"; qmakeFlags = [ "phoenix.pro" diff --git a/pkgs/applications/science/electronics/magic-vlsi/default.nix b/pkgs/applications/science/electronics/magic-vlsi/default.nix index edee5946d94..fc68969bd49 100644 --- a/pkgs/applications/science/electronics/magic-vlsi/default.nix +++ b/pkgs/applications/science/electronics/magic-vlsi/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { patchShebangs scripts/* ''; - NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration"; patches = [ ./0001-strip-bin-prefix.patch diff --git a/pkgs/applications/science/logic/avy/default.nix b/pkgs/applications/science/logic/avy/default.nix index f6f43f1b0bb..38fef51c56e 100644 --- a/pkgs/applications/science/logic/avy/default.nix +++ b/pkgs/applications/science/logic/avy/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ zlib boost.out boost.dev ]; - NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ] + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ] # Squelch endless stream of warnings on same few things ++ lib.optionals stdenv.cc.isClang [ "-Wno-empty-body" diff --git a/pkgs/applications/science/logic/cbmc/default.nix b/pkgs/applications/science/logic/cbmc/default.nix index d61a9893942..ddfa999fcc7 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" \ ''; - 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/science/logic/klee/default.nix b/pkgs/applications/science/logic/klee/default.nix index 024e6e526c4..898e344f2a4 100644 --- a/pkgs/applications/science/logic/klee/default.nix +++ b/pkgs/applications/science/logic/klee/default.nix @@ -96,7 +96,7 @@ in stdenv.mkDerivation rec { ]; # Silence various warnings during the compilation of fortified bitcode. - NIX_CFLAGS_COMPILE = ["-Wno-macro-redefined"]; + env.NIX_CFLAGS_COMPILE = toString ["-Wno-macro-redefined"]; prePatch = '' patchShebangs . diff --git a/pkgs/applications/science/logic/satallax/default.nix b/pkgs/applications/science/logic/satallax/default.nix index 5e5fe992537..af11cd0d6d8 100644 --- a/pkgs/applications/science/logic/satallax/default.nix +++ b/pkgs/applications/science/logic/satallax/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ''; # error: invalid suffix on literal; C++11 requires a space between literal and identifier - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-reserved-user-defined-literal"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-reserved-user-defined-literal"; installPhase = '' mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax" diff --git a/pkgs/applications/science/math/calculix/default.nix b/pkgs/applications/science/math/calculix/default.nix index 4b0ae6f8ac9..7a89fdd73c8 100644 --- a/pkgs/applications/science/math/calculix/default.nix +++ b/pkgs/applications/science/math/calculix/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ arpack spooles blas lapack ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${spooles}/include/spooles" "-std=legacy" ]; diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix index bffd208f9ef..f885dae444b 100644 --- a/pkgs/applications/science/math/cntk/default.nix +++ b/pkgs/applications/science/math/cntk/default.nix @@ -60,7 +60,7 @@ in stdenv.mkDerivation rec { OMPI_CXX = "g++"; # Uses some deprecated tensorflow functions - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; buildInputs = [ openblas opencv3 libzip boost protobuf mpi ] ++ lib.optional cudaSupport cudatoolkit diff --git a/pkgs/applications/science/math/eukleides/default.nix b/pkgs/applications/science/math/eukleides/default.nix index 507fa081529..42e17c70673 100644 --- a/pkgs/applications/science/math/eukleides/default.nix +++ b/pkgs/applications/science/math/eukleides/default.nix @@ -36,7 +36,7 @@ lib.fix (eukleides: stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: eukleides_build/triangle.o:(.bss+0x28): multiple definition of `A'; # eukleides_build/quadrilateral.o:(.bss+0x18): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preInstall = '' mkdir -p $out/bin diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix index 021593124a3..a5c0ebc85b1 100644 --- a/pkgs/applications/science/math/mxnet/default.nix +++ b/pkgs/applications/science/math/mxnet/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { ] else [ "-DUSE_CUDA=OFF" ]) ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF"; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" "-Wno-error=uninitialized" diff --git a/pkgs/applications/science/math/perseus/default.nix b/pkgs/applications/science/math/perseus/default.nix index d9921e68edb..bbfc8aed442 100644 --- a/pkgs/applications/science/math/perseus/default.nix +++ b/pkgs/applications/science/math/perseus/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { }; sourceRoot = "."; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; buildPhase = '' g++ Pers.cpp -O3 -fpermissive -o perseus ''; diff --git a/pkgs/applications/science/misc/fityk/default.nix b/pkgs/applications/science/misc/fityk/default.nix index a4aa6457d60..5ec7973065d 100644 --- a/pkgs/applications/science/misc/fityk/default.nix +++ b/pkgs/applications/science/misc/fityk/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { swig3 ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; diff --git a/pkgs/applications/science/physics/dawncut/default.nix b/pkgs/applications/science/physics/dawncut/default.nix index 8c0bc1ae639..5c17837d2e9 100644 --- a/pkgs/applications/science/physics/dawncut/default.nix +++ b/pkgs/applications/science/physics/dawncut/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { dontConfigure = true; - NIX_CFLAGS_COMPILE="-std=c++98"; + env.NIX_CFLAGS_COMPILE = "-std=c++98"; installPhase = '' runHook preInstall diff --git a/pkgs/applications/science/physics/xfitter/default.nix b/pkgs/applications/science/physics/xfitter/default.nix index 31df19b539a..1852ef3ff1c 100644 --- a/pkgs/applications/science/physics/xfitter/default.nix +++ b/pkgs/applications/science/physics/xfitter/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc ; - NIX_CFLAGS_COMPILE = lib.optional (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc"; NIX_LDFLAGS = lib.optional (stdenv.hostPlatform.libc == "glibc") "-ltirpc"; # workaround wrong library IDs diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 09ad299d10d..56d68fcd474 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -57,7 +57,7 @@ mkDerivation rec { "--without-inotify" ]); - NIX_CFLAGS_COMPILE = [ "-DNIXPKGS" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DNIXPKGS" ]; patches = [ # fix "No/bad main configuration file" error diff --git a/pkgs/applications/version-management/fnc/default.nix b/pkgs/applications/version-management/fnc/default.nix index b74200a6919..0167f09ad5b 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)" ]; - 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/applications/version-management/rapidsvn/default.nix b/pkgs/applications/version-management/rapidsvn/default.nix index 0027af3defe..5c1499139ca 100644 --- a/pkgs/applications/version-management/rapidsvn/default.nix +++ b/pkgs/applications/version-management/rapidsvn/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ wxGTK30 subversion apr aprutil python3 ]; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; configureFlags = [ "--with-svn-include=${subversion.dev}/include" diff --git a/pkgs/applications/version-management/rcs/default.nix b/pkgs/applications/version-management/rcs/default.nix index 5f2f9aab2b3..40d909c8e02 100644 --- a/pkgs/applications/version-management/rcs/default.nix +++ b/pkgs/applications/version-management/rcs/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.diffutils buildPackages.ed ]; - NIX_CFLAGS_COMPILE = "-std=c99"; + env.NIX_CFLAGS_COMPILE = "-std=c99"; hardeningDisable = lib.optional stdenv.cc.isClang "format"; diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix index 079fb1792e1..bb2d5822a22 100644 --- a/pkgs/applications/video/aegisub/default.nix +++ b/pkgs/applications/video/aegisub/default.nix @@ -133,7 +133,7 @@ stdenv.mkDerivation rec { --replace "NSUInteger" "size_t" ''; - NIX_CFLAGS_COMPILE = "-I${luajit52}/include"; + env.NIX_CFLAGS_COMPILE = "-I${luajit52}/include"; NIX_CFLAGS_LINK = "-L${luajit52}/lib"; configurePhase = '' diff --git a/pkgs/applications/video/byzanz/default.nix b/pkgs/applications/video/byzanz/default.nix index d7ad9846306..e3a97197d10 100644 --- a/pkgs/applications/video/byzanz/default.nix +++ b/pkgs/applications/video/byzanz/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { ./autogen.sh --prefix=$out ''; - NIX_CFLAGS_COMPILE = builtins.concatStringsSep " " [ + env.NIX_CFLAGS_COMPILE = builtins.concatStringsSep " " [ "-Wno-error=deprecated-declarations" "-Wno-error=incompatible-pointer-types" ]; diff --git a/pkgs/applications/video/coriander/default.nix b/pkgs/applications/video/coriander/default.nix index 540339f05a5..d4e35ac4841 100644 --- a/pkgs/applications/video/coriander/default.nix +++ b/pkgs/applications/video/coriander/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: subtitles.o:src/coriander.h:110: multiple definition of # `main_window'; main.o:src/coriander.h:110: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' cp ${automake}/share/automake-*/mkinstalldirs . diff --git a/pkgs/applications/video/gnome-mplayer/default.nix b/pkgs/applications/video/gnome-mplayer/default.nix index a63671accec..bab41b11bee 100644 --- a/pkgs/applications/video/gnome-mplayer/default.nix +++ b/pkgs/applications/video/gnome-mplayer/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: mpris-interface.o:src/playlist.h:32: multiple definition of # `plclose'; gui.o:src/playlist.h:32: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "Gnome MPlayer, a simple GUI for MPlayer"; diff --git a/pkgs/applications/video/obs-studio/plugins/looking-glass-obs.nix b/pkgs/applications/video/obs-studio/plugins/looking-glass-obs.nix index cd7548846fa..b581dc44022 100644 --- a/pkgs/applications/video/obs-studio/plugins/looking-glass-obs.nix +++ b/pkgs/applications/video/obs-studio/plugins/looking-glass-obs.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; buildInputs = [ obs-studio libbfd SDL2 ]; - NIX_CFLAGS_COMPILE = "-mavx"; + env.NIX_CFLAGS_COMPILE = "-mavx"; installPhase = '' mkdir -p $out/lib/obs-plugins/ diff --git a/pkgs/applications/video/ogmtools/default.nix b/pkgs/applications/video/ogmtools/default.nix index 48f1b98f6e5..d910383bf95 100644 --- a/pkgs/applications/video/ogmtools/default.nix +++ b/pkgs/applications/video/ogmtools/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ libogg libvorbis libdvdread ]; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; meta = { description = "Tools for modifying and inspecting OGG media streams"; diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix index e268b05094e..5abc6c47a13 100644 --- a/pkgs/applications/video/shotcut/default.nix +++ b/pkgs/applications/video/shotcut/default.nix @@ -47,7 +47,7 @@ mkDerivation rec { qtgraphicaleffects ]; - NIX_CFLAGS_COMPILE = "-I${mlt.dev}/include/mlt++ -I${mlt.dev}/include/mlt"; + env.NIX_CFLAGS_COMPILE = "-I${mlt.dev}/include/mlt++ -I${mlt.dev}/include/mlt"; qmakeFlags = [ "QMAKE_LRELEASE=${lib.getDev qttools}/bin/lrelease" "SHOTCUT_VERSION=${version}" diff --git a/pkgs/applications/video/vokoscreen/default.nix b/pkgs/applications/video/vokoscreen/default.nix index 2bb9437f1b0..82c23b4892e 100644 --- a/pkgs/applications/video/vokoscreen/default.nix +++ b/pkgs/applications/video/vokoscreen/default.nix @@ -32,7 +32,7 @@ mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: alsa_device.o:(.bss+0x8): multiple definition of `rc'; QvkAlsaDevice.o:(.bss+0x8): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' sed -i 's/lrelease-qt5/lrelease/g' vokoscreen.pro diff --git a/pkgs/applications/video/w_scan/default.nix b/pkgs/applications/video/w_scan/default.nix index 9c07eb1a636..1a8c6f2d3ad 100644 --- a/pkgs/applications/video/w_scan/default.nix +++ b/pkgs/applications/video/w_scan/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: char-coding.o:/build/w_scan-20170107/si_types.h:117: multiple definition of # `service_t'; countries.o:/build/w_scan-20170107/si_types.h:117: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = { description = "Small CLI utility to scan DVB and ATSC transmissions"; diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 837e86082f9..7350765ab5d 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -46,7 +46,7 @@ edk2.mkDerivation projectDscPath (finalAttrs: { ++ lib.optionals httpSupport [ "-D NETWORK_HTTP_ENABLE=TRUE" "-D NETWORK_HTTP_BOOT_ENABLE=TRUE" ] ++ lib.optionals tpmSupport [ "-D TPM_ENABLE" "-D TPM2_ENABLE" "-D TPM2_CONFIG_ENABLE"]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.cc.isClang "-Qunused-arguments"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Qunused-arguments"; postPatch = lib.optionalString csmSupport '' cp ${seabios}/Csm16.bin OvmfPkg/Csm/Csm16/Csm16.bin diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 1aa5071938a..17b3982a1f7 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -68,7 +68,7 @@ rec { buildInputs = [ glibc glibc.static ]; - NIX_CFLAGS_COMPILE = "-DMINIMAL=ON"; + env.NIX_CFLAGS_COMPILE = "-DMINIMAL=ON"; }); moby-src = fetchFromGitHub { diff --git a/pkgs/applications/virtualization/libgovirt/default.nix b/pkgs/applications/virtualization/libgovirt/default.nix index c93f8a68973..18d88b54685 100644 --- a/pkgs/applications/virtualization/libgovirt/default.nix +++ b/pkgs/applications/virtualization/libgovirt/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # https://gitlab.gnome.org/GNOME/libgovirt/-/issues/9 ./auto-disable-incompatible-compiler-warnings.patch ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (lib.concatStringsSep " " [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (lib.concatStringsSep " " [ "-Wno-typedef-redefinition" "-Wno-missing-field-initializers" "-Wno-cast-align" diff --git a/pkgs/applications/virtualization/libnvidia-container/default.nix b/pkgs/applications/virtualization/libnvidia-container/default.nix index d718c61066f..6cbed6f41f6 100644 --- a/pkgs/applications/virtualization/libnvidia-container/default.nix +++ b/pkgs/applications/virtualization/libnvidia-container/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { HOME="$(mktemp -d)" ''; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-L${libtirpc.dev}/lib" "-ltirpc" ]; nativeBuildInputs = [ pkg-config go rpcsvc-proto makeWrapper removeReferencesTo ]; diff --git a/pkgs/applications/virtualization/spice-vdagent/default.nix b/pkgs/applications/virtualization/spice-vdagent/default.nix index 2b27e3a7875..5390a4fb662 100644 --- a/pkgs/applications/virtualization/spice-vdagent/default.nix +++ b/pkgs/applications/virtualization/spice-vdagent/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # FIXME: May no longer be needed with spice-vdagent versions over 0.21.0 - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; postPatch = '' substituteInPlace data/spice-vdagent.desktop --replace /usr $out diff --git a/pkgs/applications/virtualization/tini/default.nix b/pkgs/applications/virtualization/tini/default.nix index 76668301c6b..2df0978b0d0 100644 --- a/pkgs/applications/virtualization/tini/default.nix +++ b/pkgs/applications/virtualization/tini/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { postPatch = "sed -i /tini-static/d CMakeLists.txt"; - NIX_CFLAGS_COMPILE = "-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"; + env.NIX_CFLAGS_COMPILE = "-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index d6531452c76..1ff7f0abeba 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -31,7 +31,7 @@ in stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration"; nativeBuildInputs = [ patchelf makeWrapper ]; buildInputs = [ cdrkit ] ++ kernel.moduleBuildDependencies; diff --git a/pkgs/applications/virtualization/xen/4.10.nix b/pkgs/applications/virtualization/xen/4.10.nix index cb91d850563..57fd0336130 100644 --- a/pkgs/applications/virtualization/xen/4.10.nix +++ b/pkgs/applications/virtualization/xen/4.10.nix @@ -148,7 +148,7 @@ callPackage (import ./generic.nix (rec { ++ optional (withOVMF) "--with-system-ovmf=${OVMF.fd}/FV/OVMF.fd" ++ optional (withInternalOVMF) "--enable-ovmf"; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ # Fix build on Glibc 2.24. "-Wno-error=deprecated-declarations" # Fix build with GCC 8 diff --git a/pkgs/applications/window-managers/cardboard/default.nix b/pkgs/applications/window-managers/cardboard/default.nix index 6e483a40ef5..115ab3d53e0 100644 --- a/pkgs/applications/window-managers/cardboard/default.nix +++ b/pkgs/applications/window-managers/cardboard/default.nix @@ -110,7 +110,7 @@ stdenv.mkDerivation rec { "-Dwlroots:libseat=disabled" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ]; # gcc12 + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" ]; # gcc12 meta = with lib; { homepage = "https://gitlab.com/cardboardwm/cardboard"; diff --git a/pkgs/applications/window-managers/fbpanel/default.nix b/pkgs/applications/window-managers/fbpanel/default.nix index 6dc22a664d3..d056005e8f5 100644 --- a/pkgs/applications/window-managers/fbpanel/default.nix +++ b/pkgs/applications/window-managers/fbpanel/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: plugin.o:(.bss+0x0): multiple definition of `stam'; panel.o:(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS="-lX11"; meta = with lib; { diff --git a/pkgs/applications/window-managers/hyprwm/hypr/default.nix b/pkgs/applications/window-managers/hyprwm/hypr/default.nix index 2485552fce6..1450807c670 100644 --- a/pkgs/applications/window-managers/hyprwm/hypr/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hypr/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # src/ewmh/ewmh.cpp:67:28: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-c++11-narrowing"; installPhase = '' runHook preInstall diff --git a/pkgs/applications/window-managers/oroborus/default.nix b/pkgs/applications/window-managers/oroborus/default.nix index fc251710767..fdd9604f7c7 100644 --- a/pkgs/applications/window-managers/oroborus/default.nix +++ b/pkgs/applications/window-managers/oroborus/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: workspaces.o:src/keyboard.h:93: multiple definition of # `NumLockMask'; client.o:src/keyboard.h:93: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { homepage = "https://web.archive.org/web/20191129172107/https://www.oroborus.org/"; diff --git a/pkgs/applications/window-managers/windowmaker/dockapps/wmsm-app.nix b/pkgs/applications/window-managers/windowmaker/dockapps/wmsm-app.nix index 225e44c21ce..5c68a39a1ea 100644 --- a/pkgs/applications/window-managers/windowmaker/dockapps/wmsm-app.nix +++ b/pkgs/applications/window-managers/windowmaker/dockapps/wmsm-app.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { export sourceRoot=$(echo */${pname}/wmsm) ''; - NIX_CFLAGS_COMPILE = "-std=gnu89"; + env.NIX_CFLAGS_COMPILE = "-std=gnu89"; postPatch = '' substituteInPlace Makefile \ diff --git a/pkgs/applications/window-managers/yeahwm/default.nix b/pkgs/applications/window-managers/yeahwm/default.nix index 25a25a06ad9..f1a6635b362 100644 --- a/pkgs/applications/window-managers/yeahwm/default.nix +++ b/pkgs/applications/window-managers/yeahwm/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: screen.o:(.bss+0x40): multiple definition of `fg'; client.o:(.bss+0x40): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; postInstall = '' gzip -9 --stdout yeahwm.1 > yeahwm.1.gz diff --git a/pkgs/build-support/flutter/default.nix b/pkgs/build-support/flutter/default.nix index a5d6108513c..a4b4942ef59 100644 --- a/pkgs/build-support/flutter/default.nix +++ b/pkgs/build-support/flutter/default.nix @@ -187,7 +187,7 @@ let # TODO: do we need this? NIX_LDFLAGS = "-rpath ${lib.makeLibraryPath self.buildInputs}"; - NIX_CFLAGS_COMPILE = "-I${xorg.libX11}/include"; + env.NIX_CFLAGS_COMPILE = "-I${xorg.libX11}/include"; LD_LIBRARY_PATH = lib.makeLibraryPath self.buildInputs; configurePhase = '' diff --git a/pkgs/data/misc/scowl/default.nix b/pkgs/data/misc/scowl/default.nix index e1709ae35cf..4bfe201beb4 100644 --- a/pkgs/data/misc/scowl/default.nix +++ b/pkgs/data/misc/scowl/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ unzip zip perl aspell dos2unix ]; buildInputs = lib.optional (!stdenv.isLinux) libiconv; - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; preConfigure = '' patchShebangs . diff --git a/pkgs/desktops/budgie/budgie-screensaver/default.nix b/pkgs/desktops/budgie/budgie-screensaver/default.nix index cee9cecfa47..ef7a0f3d762 100644 --- a/pkgs/desktops/budgie/budgie-screensaver/default.nix +++ b/pkgs/desktops/budgie/budgie-screensaver/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { xorg.libXxf86vm ]; - NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE"; + env.NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE"; meta = with lib; { description = "A fork of old GNOME Screensaver for purposes of providing an authentication prompt on wake"; diff --git a/pkgs/desktops/cdesktopenv/default.nix b/pkgs/desktops/cdesktopenv/default.nix index 2eb54d018bc..e461ac9ea07 100644 --- a/pkgs/desktops/cdesktopenv/default.nix +++ b/pkgs/desktops/cdesktopenv/default.nix @@ -52,7 +52,7 @@ in stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: raima/startup.o:/build/cde-2.3.2/lib/DtSearch/raima/dbtype.h:408: multiple definition of # `__SK__'; raima/alloc.o:/build/cde-2.3.2/lib/DtSearch/raima/dbtype.h:408: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "World" diff --git a/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix b/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix index 8aa58bfa30b..8cc453004a5 100644 --- a/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix +++ b/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DVERSION=${version}" ]; - NIX_CFLAGS_COMPILE = "-I${dde-qt-dbus-factory}/include/libdframeworkdbus-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${dde-qt-dbus-factory}/include/libdframeworkdbus-2.0"; # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH qtWrapperArgs = [ diff --git a/pkgs/desktops/gnome/apps/vinagre/default.nix b/pkgs/desktops/gnome/apps/vinagre/default.nix index ea2b1de4365..f8d20291a1f 100644 --- a/pkgs/desktops/gnome/apps/vinagre/default.nix +++ b/pkgs/desktops/gnome/apps/vinagre/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { gtk3 vte libxml2 gtk-vnc libsecret gnome.adwaita-icon-theme librsvg ]; - NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; + env.NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/desktops/gnome/core/evince/default.nix b/pkgs/desktops/gnome/core/evince/default.nix index 30f8ed9fac9..d561ad6646a 100644 --- a/pkgs/desktops/gnome/core/evince/default.nix +++ b/pkgs/desktops/gnome/core/evince/default.nix @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { "-Dmultimedia=disabled" ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; preFixup = '' gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share") diff --git a/pkgs/desktops/gnome/core/gnome-online-miners/default.nix b/pkgs/desktops/gnome/core/gnome-online-miners/default.nix index 95fdf35b883..a45cd7a1ed2 100644 --- a/pkgs/desktops/gnome/core/gnome-online-miners/default.nix +++ b/pkgs/desktops/gnome/core/gnome-online-miners/default.nix @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { dleyna-server ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format-security" # https://gitlab.gnome.org/GNOME/gnome-online-miners/merge_requests/3/diffs#note_942747 ]; diff --git a/pkgs/desktops/gnome/core/gnome-settings-daemon/3.38/default.nix b/pkgs/desktops/gnome/core/gnome-settings-daemon/3.38/default.nix index d9a67183e3c..4a09956c4b5 100644 --- a/pkgs/desktops/gnome/core/gnome-settings-daemon/3.38/default.nix +++ b/pkgs/desktops/gnome/core/gnome-settings-daemon/3.38/default.nix @@ -148,7 +148,7 @@ stdenv.mkDerivation rec { # Default for release buildtype but passed manually because # we're using plain - NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS"; + env.NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS"; postPatch = '' for f in gnome-settings-daemon/codegen.py plugins/power/gsd-power-constants-update.pl meson_post_install.py; do diff --git a/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix b/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix index 0c20e07a770..e494a46d16d 100644 --- a/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix +++ b/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation rec { # Default for release buildtype but passed manually because # we're using plain - NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS"; + env.NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS"; postPatch = '' diff --git a/pkgs/desktops/mate/atril/default.nix b/pkgs/desktops/mate/atril/default.nix index 486d27baf56..c236cc919d8 100644 --- a/pkgs/desktops/mate/atril/default.nix +++ b/pkgs/desktops/mate/atril/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { ++ optionals (enableXps) [ "--enable-xps" ] ++ optionals (enableImages) [ "--enable-pixbuf" ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; makeFlags = [ "cajaextensiondir=$$out/lib/caja/extensions-2.0" ]; diff --git a/pkgs/desktops/mate/marco/default.nix b/pkgs/desktops/mate/marco/default.nix index 0012e2501c4..95ac7a1cfaf 100644 --- a/pkgs/desktops/mate/marco/default.nix +++ b/pkgs/desktops/mate/marco/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { mate-settings-daemon ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/mate/mate-applets/default.nix b/pkgs/desktops/mate/mate-applets/default.nix index a67b82d0109..764f86cf061 100644 --- a/pkgs/desktops/mate/mate-applets/default.nix +++ b/pkgs/desktops/mate/mate-applets/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-suid=no" ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/mate/mate-notification-daemon/default.nix b/pkgs/desktops/mate/mate-notification-daemon/default.nix index 4c82397ef68..4340c5549aa 100644 --- a/pkgs/desktops/mate/mate-notification-daemon/default.nix +++ b/pkgs/desktops/mate/mate-notification-daemon/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { mate-panel ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/mate/mate-panel/default.nix b/pkgs/desktops/mate/mate-panel/default.nix index b1273bb72ae..c2037d22724 100644 --- a/pkgs/desktops/mate/mate-panel/default.nix +++ b/pkgs/desktops/mate/mate-panel/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { hicolor-icon-theme ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; makeFlags = [ "INTROSPECTION_GIRDIR=$(out)/share/gir-1.0/" diff --git a/pkgs/desktops/mate/mate-settings-daemon/default.nix b/pkgs/desktops/mate/mate-settings-daemon/default.nix index 159d13e5912..3fbc590bd85 100644 --- a/pkgs/desktops/mate/mate-settings-daemon/default.nix +++ b/pkgs/desktops/mate/mate-settings-daemon/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { configureFlags = lib.optional pulseaudioSupport "--enable-pulse"; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/mate/mate-utils/default.nix b/pkgs/desktops/mate/mate-utils/default.nix index 110ec7e4065..70151d83782 100644 --- a/pkgs/desktops/mate/mate-utils/default.nix +++ b/pkgs/desktops/mate/mate-utils/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { hicolor-icon-theme ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/plasma-5/ksystemstats.nix b/pkgs/desktops/plasma-5/ksystemstats.nix index 6b04d055eac..5b552a1f786 100644 --- a/pkgs/desktops/plasma-5/ksystemstats.nix +++ b/pkgs/desktops/plasma-5/ksystemstats.nix @@ -9,7 +9,7 @@ mkDerivation { pname = "ksystemstats"; - NIX_CFLAGS_COMPILE = [ "-I${lib.getBin libksysguard}/share" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getBin libksysguard}/share" ]; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ libksysguard libnl lm_sensors networkmanager-qt ]; } diff --git a/pkgs/desktops/plasma-5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5/plasma-workspace/default.nix index 252b6a9fac5..9d1fe45656e 100644 --- a/pkgs/desktops/plasma-5/plasma-workspace/default.nix +++ b/pkgs/desktops/plasma-5/plasma-workspace/default.nix @@ -162,7 +162,7 @@ mkDerivation { ln -sf $out/bin/kcminit $out/bin/kcminit_startup ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ ''-DNIXPKGS_XMESSAGE="${getBin xmessage}/bin/xmessage"'' ''-DNIXPKGS_XSETROOT="${getBin xsetroot}/bin/xsetroot"'' ''-DNIXPKGS_START_KDEINIT_WRAPPER="${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"'' diff --git a/pkgs/desktops/xfce/applications/ristretto/default.nix b/pkgs/desktops/xfce/applications/ristretto/default.nix index abbdfd6e498..10a75af99a3 100644 --- a/pkgs/desktops/xfce/applications/ristretto/default.nix +++ b/pkgs/desktops/xfce/applications/ristretto/default.nix @@ -24,7 +24,7 @@ mkXfceDerivation { xfconf ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; meta = with lib; { description = "A fast and lightweight picture-viewer for the Xfce desktop environment"; diff --git a/pkgs/desktops/xfce/applications/xfce4-notifyd/default.nix b/pkgs/desktops/xfce/applications/xfce4-notifyd/default.nix index 2d3d9c5d4e0..b579e070076 100644 --- a/pkgs/desktops/xfce/applications/xfce4-notifyd/default.nix +++ b/pkgs/desktops/xfce/applications/xfce4-notifyd/default.nix @@ -26,7 +26,7 @@ mkXfceDerivation { xfconf ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; configureFlags = [ "--enable-dbus-start-daemon" diff --git a/pkgs/desktops/xfce/applications/xfce4-terminal/default.nix b/pkgs/desktops/xfce/applications/xfce4-terminal/default.nix index 99c8741851f..74b9e8797db 100644 --- a/pkgs/desktops/xfce/applications/xfce4-terminal/default.nix +++ b/pkgs/desktops/xfce/applications/xfce4-terminal/default.nix @@ -11,7 +11,7 @@ mkXfceDerivation { buildInputs = [ gtk3 libxfce4ui vte xfconf pcre2 ]; - NIX_CFLAGS_COMPILE = "-I${libxfce4ui.dev}/include/xfce4"; + env.NIX_CFLAGS_COMPILE = "-I${libxfce4ui.dev}/include/xfce4"; passthru.tests.test = nixosTests.terminal-emulators.xfce4-terminal; diff --git a/pkgs/desktops/xfce/core/exo/default.nix b/pkgs/desktops/xfce/core/exo/default.nix index bb8a846c500..e5d34969d4c 100644 --- a/pkgs/desktops/xfce/core/exo/default.nix +++ b/pkgs/desktops/xfce/core/exo/default.nix @@ -23,7 +23,7 @@ mkXfceDerivation { ]; # Workaround https://bugzilla.xfce.org/show_bug.cgi?id=15825 - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; meta = with lib; { description = "Application library for Xfce"; diff --git a/pkgs/desktops/xfce/core/xfce4-session/default.nix b/pkgs/desktops/xfce/core/xfce4-session/default.nix index f8dc8b92da3..ab30dc49c5f 100644 --- a/pkgs/desktops/xfce/core/xfce4-session/default.nix +++ b/pkgs/desktops/xfce/core/xfce4-session/default.nix @@ -12,7 +12,7 @@ mkXfceDerivation { configureFlags = [ "--with-xsession-prefix=${placeholder "out"}" ]; # See https://github.com/NixOS/nixpkgs/issues/36468 - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; passthru.xinitrc = "${xfce4-session}/etc/xdg/xfce4/xinitrc"; diff --git a/pkgs/development/compilers/alan/2.nix b/pkgs/development/compilers/alan/2.nix index 7329a0115d8..a80b6ab35cb 100644 --- a/pkgs/development/compilers/alan/2.nix +++ b/pkgs/development/compilers/alan/2.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Add a workarounf for -fno-common tollchains like upstream gcc-10. # alan-3 is already fixed, but the backport is nontrivial. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' mkdir -p $out/bin $out/share/alan2 diff --git a/pkgs/development/compilers/bs-platform/ocaml.nix b/pkgs/development/compilers/bs-platform/ocaml.nix index 3fe0e0b2eed..206a3aff61c 100644 --- a/pkgs/development/compilers/bs-platform/ocaml.nix +++ b/pkgs/development/compilers/bs-platform/ocaml.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { # ld: libcamlrun.a(minor_gc.o):/build/ocaml/byterun/caml/major_gc.h:67: multiple definition of # `caml_major_ring'; libcamlrun.a(stacks.o):/build/ocaml/byterun/caml/major_gc.h:67: first defined here # Match -fcommon workaround in ocaml-4.06 itself. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildPhase = '' make -j9 world.opt diff --git a/pkgs/development/compilers/chez-racket/shared.nix b/pkgs/development/compilers/chez-racket/shared.nix index f5a9bbc1e5b..a2ca8b5b6e5 100644 --- a/pkgs/development/compilers/chez-racket/shared.nix +++ b/pkgs/development/compilers/chez-racket/shared.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (args // { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; meta = { description = "Fork of Chez Scheme for Racket"; diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index 67fa1efd2a6..e14e01d44ee 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; /* ** We patch out a very annoying 'feature' in ./configure, which diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix index 3397252b47a..41189be5dbd 100644 --- a/pkgs/development/compilers/edk2/default.nix +++ b/pkgs/development/compilers/edk2/default.nix @@ -65,7 +65,7 @@ edk2 = buildStdenv.mkDerivation { makeFlags = [ "-C BaseTools" ] ++ lib.optionals (stdenv.cc.isClang) [ "CXX=llvm BUILD_AR=ar BUILD_CC=clang BUILD_CXX=clang++ BUILD_AS=clang BUILD_LD=ld" ]; - NIX_CFLAGS_COMPILE = "-Wno-return-type" + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation"; + env.NIX_CFLAGS_COMPILE = "-Wno-return-type" + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation"; hardeningDisable = [ "format" "fortify" ]; diff --git a/pkgs/development/compilers/eli/default.nix b/pkgs/development/compilers/eli/default.nix index 9931e45c9b6..7cd9413991f 100644 --- a/pkgs/development/compilers/eli/default.nix +++ b/pkgs/development/compilers/eli/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: cexp.o:(.bss+0x40): multiple definition of `obstck'; cccp.o:(.bss+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure='' configureFlagsArray=( diff --git a/pkgs/development/compilers/eql/default.nix b/pkgs/development/compilers/eql/default.nix index e0ef27ce237..044ff1182f2 100644 --- a/pkgs/development/compilers/eql/default.nix +++ b/pkgs/development/compilers/eql/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ]; - NIX_CFLAGS_COMPILE = "-fPIC"; + env.NIX_CFLAGS_COMPILE = "-fPIC"; postPatch = '' sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 75366c5b04d..ffe5b721b4f 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -225,7 +225,7 @@ stdenv.mkDerivation ({ inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm"; preConfigure = callFile ../common/pre-configure.nix { }; diff --git a/pkgs/development/compilers/gcl/default.nix b/pkgs/development/compilers/gcl/default.nix index e6ccc259803..37037977650 100644 --- a/pkgs/development/compilers/gcl/default.nix +++ b/pkgs/development/compilers/gcl/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { # -fcommon: workaround build failure on -fno-common toolchains: # ld: ./libgclp.a(user_match.o):(.bss+0x18): multiple definition of # `tf'; ./libpre_gcl.a(main.o):(.bss+0x326d90): first defined here - NIX_CFLAGS_COMPILE = "-fgnu89-inline -fcommon"; + env.NIX_CFLAGS_COMPILE = "-fgnu89-inline -fcommon"; meta = with lib; { description = "GNU Common Lisp compiler working via GCC"; diff --git a/pkgs/development/compilers/gerbil/build.nix b/pkgs/development/compilers/gerbil/build.nix index 3d2fd7551e6..110378244fd 100644 --- a/pkgs/development/compilers/gerbil/build.nix +++ b/pkgs/development/compilers/gerbil/build.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ gambit ] ++ buildInputs_libraries; # ++ buildInputs_staticLibraries; - NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql"; + env.NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql"; postPatch = '' echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm ; diff --git a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix index 7a4d3f06150..f113e55f284 100644 --- a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix index aa725afdb8b..979ec9e23f6 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ] ++ lib.optional stdenv.isDarwin xcbuild.xcrun; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index d0b02c3aaeb..22e2ab9d5b2 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 52aa9ffe11f..02ddabad676 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix index 4351c56ef53..aff2722074e 100644 --- a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/15/compiler-rt/default.nix b/pkgs/development/compilers/llvm/15/compiler-rt/default.nix index 3eb3903f167..3c335345f62 100644 --- a/pkgs/development/compilers/llvm/15/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/15/compiler-rt/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/5/compiler-rt/default.nix b/pkgs/development/compilers/llvm/5/compiler-rt/default.nix index 6a9aa416f47..bf3edf5258a 100644 --- a/pkgs/development/compilers/llvm/5/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/5/compiler-rt/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/6/compiler-rt/default.nix b/pkgs/development/compilers/llvm/6/compiler-rt/default.nix index c8841b479d1..ce7d6161f62 100644 --- a/pkgs/development/compilers/llvm/6/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/6/compiler-rt/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/7/compiler-rt/default.nix b/pkgs/development/compilers/llvm/7/compiler-rt/default.nix index ff960c89a9c..2de67dc0438 100644 --- a/pkgs/development/compilers/llvm/7/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/7/compiler-rt/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/7/lldb/default.nix b/pkgs/development/compilers/llvm/7/lldb/default.nix index 3ab2daad32b..0a0aa3be18a 100644 --- a/pkgs/development/compilers/llvm/7/lldb/default.nix +++ b/pkgs/development/compilers/llvm/7/lldb/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { CXXFLAGS = "-fno-rtti"; hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2"; cmakeFlags = [ "-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}" diff --git a/pkgs/development/compilers/llvm/8/compiler-rt/default.nix b/pkgs/development/compilers/llvm/8/compiler-rt/default.nix index 209c70f8341..eadb46acd70 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/9/compiler-rt/default.nix b/pkgs/development/compilers/llvm/9/compiler-rt/default.nix index b4e83d3c301..be7380470ce 100644 --- a/pkgs/development/compilers/llvm/9/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/9/compiler-rt/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix index ae4a7f1244e..029f953c83e 100644 --- a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ]; diff --git a/pkgs/development/compilers/minimacy/default.nix b/pkgs/development/compilers/minimacy/default.nix index 0ad4fa0db83..e58b8ad498d 100644 --- a/pkgs/development/compilers/minimacy/default.nix +++ b/pkgs/development/compilers/minimacy/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-Wno-unused-result"; + env.NIX_CFLAGS_COMPILE = "-Wno-unused-result"; preBuild = '' pushd ${if stdenv.isDarwin then "macos/cmdline" else "unix"} diff --git a/pkgs/development/compilers/miranda/default.nix b/pkgs/development/compilers/miranda/default.nix index 332f3d83e26..f0d95323fe3 100644 --- a/pkgs/development/compilers/miranda/default.nix +++ b/pkgs/development/compilers/miranda/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" diff --git a/pkgs/development/compilers/mit-scheme/default.nix b/pkgs/development/compilers/mit-scheme/default.nix index da668b51e27..3d62434a57c 100644 --- a/pkgs/development/compilers/mit-scheme/default.nix +++ b/pkgs/development/compilers/mit-scheme/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation { runHook postConfigure ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-parameter" "-Wno-error=use-after-free" diff --git a/pkgs/development/compilers/ocaml/4.00.1.nix b/pkgs/development/compilers/ocaml/4.00.1.nix index c25da7346dd..e4a4ed0f958 100644 --- a/pkgs/development/compilers/ocaml/4.00.1.nix +++ b/pkgs/development/compilers/ocaml/4.00.1.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; prefixKey = "-prefix "; configureFlags = [ "-no-tk" ] ++ optionals useX11 [ "-x11lib" libX11 ]; diff --git a/pkgs/development/compilers/ocaml/4.01.0.nix b/pkgs/development/compilers/ocaml/4.01.0.nix index 801e12d1549..70f7e9afa1d 100644 --- a/pkgs/development/compilers/ocaml/4.01.0.nix +++ b/pkgs/development/compilers/ocaml/4.01.0.nix @@ -15,5 +15,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.02.nix b/pkgs/development/compilers/ocaml/4.02.nix index 59836955f44..2e3445b20c7 100644 --- a/pkgs/development/compilers/ocaml/4.02.nix +++ b/pkgs/development/compilers/ocaml/4.02.nix @@ -18,5 +18,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.03.nix b/pkgs/development/compilers/ocaml/4.03.nix index 8c561c55329..94c171560a3 100644 --- a/pkgs/development/compilers/ocaml/4.03.nix +++ b/pkgs/development/compilers/ocaml/4.03.nix @@ -17,5 +17,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.04.nix b/pkgs/development/compilers/ocaml/4.04.nix index 9651650d0d6..68c40855ca5 100644 --- a/pkgs/development/compilers/ocaml/4.04.nix +++ b/pkgs/development/compilers/ocaml/4.04.nix @@ -20,5 +20,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.05.nix b/pkgs/development/compilers/ocaml/4.05.nix index aabd1b2f69a..5f1130f339c 100644 --- a/pkgs/development/compilers/ocaml/4.05.nix +++ b/pkgs/development/compilers/ocaml/4.05.nix @@ -20,5 +20,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.06.nix b/pkgs/development/compilers/ocaml/4.06.nix index 6e06ad585b2..903679b1b08 100644 --- a/pkgs/development/compilers/ocaml/4.06.nix +++ b/pkgs/development/compilers/ocaml/4.06.nix @@ -17,5 +17,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.07.nix b/pkgs/development/compilers/ocaml/4.07.nix index 1356a2b3c8e..833e7fb2796 100644 --- a/pkgs/development/compilers/ocaml/4.07.nix +++ b/pkgs/development/compilers/ocaml/4.07.nix @@ -17,5 +17,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/ocaml/4.08.nix b/pkgs/development/compilers/ocaml/4.08.nix index 9ab19a61267..d5d11ead1f8 100644 --- a/pkgs/development/compilers/ocaml/4.08.nix +++ b/pkgs/development/compilers/ocaml/4.08.nix @@ -20,5 +20,5 @@ import ./generic.nix { # gcc-10. Otherwise build fails as: # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } diff --git a/pkgs/development/compilers/openjdk/11.nix b/pkgs/development/compilers/openjdk/11.nix index 72b25bff777..da749eaf03a 100644 --- a/pkgs/development/compilers/openjdk/11.nix +++ b/pkgs/development/compilers/openjdk/11.nix @@ -72,7 +72,7 @@ let # Workaround for # `cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]` # when building jtreg - NIX_CFLAGS_COMPILE = "-Wformat"; + env.NIX_CFLAGS_COMPILE = "-Wformat"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/12.nix b/pkgs/development/compilers/openjdk/12.nix index bd3defbd6b9..df8e25ffbec 100644 --- a/pkgs/development/compilers/openjdk/12.nix +++ b/pkgs/development/compilers/openjdk/12.nix @@ -77,7 +77,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ]; NIX_LDFLAGS = lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/13.nix b/pkgs/development/compilers/openjdk/13.nix index 40dc753f795..12023a0cb2d 100644 --- a/pkgs/development/compilers/openjdk/13.nix +++ b/pkgs/development/compilers/openjdk/13.nix @@ -77,7 +77,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/14.nix b/pkgs/development/compilers/openjdk/14.nix index 047e1a39081..baaeada689b 100644 --- a/pkgs/development/compilers/openjdk/14.nix +++ b/pkgs/development/compilers/openjdk/14.nix @@ -72,7 +72,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/15.nix b/pkgs/development/compilers/openjdk/15.nix index c33e937f9f2..6156328aa11 100644 --- a/pkgs/development/compilers/openjdk/15.nix +++ b/pkgs/development/compilers/openjdk/15.nix @@ -72,7 +72,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/16.nix b/pkgs/development/compilers/openjdk/16.nix index 461cd724144..d247266cb63 100644 --- a/pkgs/development/compilers/openjdk/16.nix +++ b/pkgs/development/compilers/openjdk/16.nix @@ -79,7 +79,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/17.nix b/pkgs/development/compilers/openjdk/17.nix index 6d8087d7e94..34d47de55f0 100644 --- a/pkgs/development/compilers/openjdk/17.nix +++ b/pkgs/development/compilers/openjdk/17.nix @@ -88,7 +88,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/18.nix b/pkgs/development/compilers/openjdk/18.nix index 37b51a1ee4c..80ba0ea9528 100644 --- a/pkgs/development/compilers/openjdk/18.nix +++ b/pkgs/development/compilers/openjdk/18.nix @@ -86,7 +86,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/19.nix b/pkgs/development/compilers/openjdk/19.nix index 717bfedcb63..5ec3d1d7d67 100644 --- a/pkgs/development/compilers/openjdk/19.nix +++ b/pkgs/development/compilers/openjdk/19.nix @@ -88,7 +88,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix index c65a9fcc66b..bfefc6c479a 100644 --- a/pkgs/development/compilers/openjdk/8.nix +++ b/pkgs/development/compilers/openjdk/8.nix @@ -78,7 +78,7 @@ let separateDebugInfo = true; - NIX_CFLAGS_COMPILE = toString ([ + env.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" diff --git a/pkgs/development/compilers/openjdk/openjfx/15.nix b/pkgs/development/compilers/openjdk/openjfx/15.nix index 788baabde84..6ca1d896977 100644 --- a/pkgs/development/compilers/openjdk/openjfx/15.nix +++ b/pkgs/development/compilers/openjdk/openjfx/15.nix @@ -31,7 +31,7 @@ let JDK_HOME = ${openjdk11_headless.home} '' + args.gradleProperties or ""); - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ #avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc. "-DGLIB_DISABLE_DEPRECATION_WARNINGS" @@ -95,7 +95,7 @@ in makePackage { # -fcommon: gstreamer workaround for -fno-common toolchains: # ld: gsttypefindelement.o:(.bss._gst_disable_registry_cache+0x0): multiple definition of # `_gst_disable_registry_cache'; gst.o:(.bss._gst_disable_registry_cache+0x0): first defined here - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS -fcommon"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS -fcommon"; stripDebugList = [ "." ]; diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index fbb45735914..18443efae7a 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation (rec { doCheck = true; - NIX_CFLAGS_COMPILE = [ "-Wno-error=redundant-move" "-Wno-error=implicit-fallthrough" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=redundant-move" "-Wno-error=implicit-fallthrough" ]; installPhase = "make config=release prefix=$out " + lib.optionalString stdenv.isDarwin "bits=64 " diff --git a/pkgs/development/compilers/rgbds/default.nix b/pkgs/development/compilers/rgbds/default.nix index b58f24c151a..7cec0eb0ddb 100644 --- a/pkgs/development/compilers/rgbds/default.nix +++ b/pkgs/development/compilers/rgbds/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ bison flex pkg-config ]; buildInputs = [ libpng ]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-fno-lto"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto"; installFlags = [ "PREFIX=${placeholder "out"}" ]; meta = with lib; { diff --git a/pkgs/development/compilers/sbcl/2.x.nix b/pkgs/development/compilers/sbcl/2.x.nix index f7bcd8e5b49..4fcccbf9704 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" ]; - 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/compilers/squeak/default.nix b/pkgs/development/compilers/squeak/default.nix index 5747ce4b607..818ad22fae7 100644 --- a/pkgs/development/compilers/squeak/default.nix +++ b/pkgs/development/compilers/squeak/default.nix @@ -139,7 +139,7 @@ in stdenv.mkDerivation { # Workaround build failure on -fno-common toolchains: # ld: vm/vm.a(cogit.o):spur64src/vm/cogitX64SysV.c:2552: multiple definition of # `traceStores'; vm/vm.a(gcc3x-cointerp.o):spur64src/vm/cogit.h:140: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preAutoreconf = '' pushd ./platforms/unix/config > /dev/null diff --git a/pkgs/development/compilers/teyjus/default.nix b/pkgs/development/compilers/teyjus/default.nix index d165b347c60..e8d2ffe1726 100644 --- a/pkgs/development/compilers/teyjus/default.nix +++ b/pkgs/development/compilers/teyjus/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = "-I${ocaml}/include"; + env.NIX_CFLAGS_COMPILE = "-I${ocaml}/include"; buildPhase = "omake all"; diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix index a881b2f1bad..b72548e753c 100644 --- a/pkgs/development/compilers/urweb/default.nix +++ b/pkgs/development/compilers/urweb/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { -L${sqlite.out}/lib"; ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=use-after-free" ]; diff --git a/pkgs/development/compilers/yap/default.nix b/pkgs/development/compilers/yap/default.nix index c933456afd1..7828d0e9b25 100644 --- a/pkgs/development/compilers/yap/default.nix +++ b/pkgs/development/compilers/yap/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: libYap.a(pl-dtoa.o):/build/yap-6.3.3/H/pl-yap.h:230: multiple definition of `ATOM_'; # libYap.a(pl-buffer.o):/build/yap-6.3.3/H/pl-yap.h:230: first defined here - NIX_CFLAGS_COMPILE = "-fpermissive -fcommon"; + env.NIX_CFLAGS_COMPILE = "-fpermissive -fcommon"; meta = { # the linux 32 bit build fails. diff --git a/pkgs/development/compilers/z88dk/default.nix b/pkgs/development/compilers/z88dk/default.nix index f8357c1e042..549d0c50c3d 100644 --- a/pkgs/development/compilers/z88dk/default.nix +++ b/pkgs/development/compilers/z88dk/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { doCheck = stdenv.hostPlatform.system != "aarch64-linux"; #_FORTIFY_SOURCE requires compiling with optimization (-O) - NIX_CFLAGS_COMPILE = "-O"; + env.NIX_CFLAGS_COMPILE = "-O"; short_rev = builtins.substring 0 7 src.rev; makeFlags = [ diff --git a/pkgs/development/embedded/bossa/default.nix b/pkgs/development/embedded/bossa/default.nix index f3d6cd6a6d8..f53e49edaed 100644 --- a/pkgs/development/embedded/bossa/default.nix +++ b/pkgs/development/embedded/bossa/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # Explicitly specify targets so they don't get stripped. makeFlags = [ "bin/bossac" "bin/bossash" "bin/bossa" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix index 5ffb9071534..dea8a56f38d 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" ]; - 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/embedded/stm8/stm8flash/default.nix b/pkgs/development/embedded/stm8/stm8flash/default.nix index eaf1a19c91b..1584ee7fdf0 100644 --- a/pkgs/development/embedded/stm8/stm8flash/default.nix +++ b/pkgs/development/embedded/stm8/stm8flash/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # NOTE: _FORTIFY_SOURCE requires compiling with optimization (-O) - NIX_CFLAGS_COMPILE = "-O"; + env.NIX_CFLAGS_COMPILE = "-O"; preBuild = '' export DESTDIR=$out; diff --git a/pkgs/development/embedded/uisp/default.nix b/pkgs/development/embedded/uisp/default.nix index 986a560ff6e..0ae31bc24fb 100644 --- a/pkgs/development/embedded/uisp/default.nix +++ b/pkgs/development/embedded/uisp/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1bncxp5yxh9r1yrp04vvhfiva8livi1pwic7v8xj99q09zrwahvw"; }; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; meta = { description = "Tool for AVR microcontrollers which can interface to many hardware in-system programmers"; diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix index 0cf336cffdf..bdd15fd4fcc 100644 --- a/pkgs/development/interpreters/clisp/default.nix +++ b/pkgs/development/interpreters/clisp/default.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { (''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' + lib.concatMapStrings (x: " " + x) withModules); - NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; + env.NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; # TODO : make mod-check fails doCheck = false; diff --git a/pkgs/development/interpreters/clisp/hg.nix b/pkgs/development/interpreters/clisp/hg.nix index d37f2fbe1e1..8ad72842dc7 100644 --- a/pkgs/development/interpreters/clisp/hg.nix +++ b/pkgs/development/interpreters/clisp/hg.nix @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { (''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' + lib.concatMapStrings (x: " " + x) withModules); - NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; + env.NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}"; # TODO : make mod-check fails doCheck = false; diff --git a/pkgs/development/interpreters/falcon/default.nix b/pkgs/development/interpreters/falcon/default.nix index 40c05113ecf..f7f5a54f415 100644 --- a/pkgs/development/interpreters/falcon/default.nix +++ b/pkgs/development/interpreters/falcon/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { # -Wnarrowing is enabled by default in recent GCC versions, # causing compilation to fail. - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ pcre zlib sqlite ]; diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix index e413914aa39..883f3df647e 100644 --- a/pkgs/development/interpreters/gnu-apl/default.nix +++ b/pkgs/development/interpreters/gnu-apl/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline gettext ncurses ]; - NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [ + env.NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [ # Needed with GCC 8 "-Wno-error=int-in-bool-context" "-Wno-error=class-memaccess" diff --git a/pkgs/development/interpreters/io/default.nix b/pkgs/development/interpreters/io/default.nix index 0777fb8d48b..8a6de1f094d 100644 --- a/pkgs/development/interpreters/io/default.nix +++ b/pkgs/development/interpreters/io/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation { ''; # for gcc5; c11 inline semantics breaks the build - NIX_CFLAGS_COMPILE = "-fgnu89-inline"; + env.NIX_CFLAGS_COMPILE = "-fgnu89-inline"; meta = with lib; { description = "Io programming language"; diff --git a/pkgs/development/interpreters/kerf/default.nix b/pkgs/development/interpreters/kerf/default.nix index d904a1ede38..e4fbc2bc655 100644 --- a/pkgs/development/interpreters/kerf/default.nix +++ b/pkgs/development/interpreters/kerf/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { makeFlags = [ "kerf" "kerf_test" ]; # avoid a huge amount of warnings to make failures clearer - NIX_CFLAGS_COMPILE = map (x: "-Wno-${x}") [ + env.NIX_CFLAGS_COMPILE = map (x: "-Wno-${x}") [ "void-pointer-to-int-cast" "format" "implicit-function-declaration" diff --git a/pkgs/development/interpreters/love/0.10.nix b/pkgs/development/interpreters/love/0.10.nix index 881bc59ccff..53c7b5e9435 100644 --- a/pkgs/development/interpreters/love/0.10.nix +++ b/pkgs/development/interpreters/love/0.10.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "--with-lua=luajit" ]; - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 meta = { homepage = "https://love2d.org"; diff --git a/pkgs/development/interpreters/love/11.nix b/pkgs/development/interpreters/love/11.nix index bb8f88379fa..768625e08cf 100644 --- a/pkgs/development/interpreters/love/11.nix +++ b/pkgs/development/interpreters/love/11.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { "--with-lua=luajit" ]; - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 meta = { homepage = "https://love2d.org"; diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 8596e379e71..ddb49b40ff6 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -100,7 +100,7 @@ stdenv.mkDerivation rec { "HOST_CC=${buildStdenv.cc}/bin/cc" ] ++ lib.optional enableJITDebugModule "INSTALL_LJLIBD=$(INSTALL_LMOD)"; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = XCFLAGS; + env.NIX_CFLAGS_COMPILE = toString XCFLAGS; postInstall = '' ( cd "$out/include"; ln -s luajit-*/* . ) diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 2971981eba1..4278f71ea0d 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -256,7 +256,7 @@ in with passthru; stdenv.mkDerivation ({ LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2" + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2" + lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; DETERMINISTIC_BUILD = 1; diff --git a/pkgs/development/interpreters/renpy/default.nix b/pkgs/development/interpreters/renpy/default.nix index d5505009a07..d9105ca2923 100644 --- a/pkgs/development/interpreters/renpy/default.nix +++ b/pkgs/development/interpreters/renpy/default.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; - NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame_sdl2}/include/${python.libPrefix}"; + env.NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame_sdl2}/include/${python.libPrefix}"; meta = with lib; { description = "Visual Novel Engine"; diff --git a/pkgs/development/interpreters/spidermonkey/common.nix b/pkgs/development/interpreters/spidermonkey/common.nix index a4310b8f206..a6b0282ce5c 100644 --- a/pkgs/development/interpreters/spidermonkey/common.nix +++ b/pkgs/development/interpreters/spidermonkey/common.nix @@ -134,7 +134,7 @@ stdenv.mkDerivation (finalAttrs: rec { # cc-rs insists on using -mabi=lp64 (soft-float) for riscv64, # while we have a double-float toolchain - NIX_CFLAGS_COMPILE = lib.optionalString (with stdenv.hostPlatform; isRiscV && is64bit && lib.versionOlder version "91") "-mabi=lp64d"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (with stdenv.hostPlatform; isRiscV && is64bit && lib.versionOlder version "91") "-mabi=lp64d"; # https://github.com/NixOS/nixpkgs/issues/201254 NIX_LDFLAGS = if (with stdenv; isAarch64 && isLinux) then [ "-lgcc" ] else null; diff --git a/pkgs/development/interpreters/unicon-lang/default.nix b/pkgs/development/interpreters/unicon-lang/default.nix index 593a955c798..bca8ef1d159 100644 --- a/pkgs/development/interpreters/unicon-lang/default.nix +++ b/pkgs/development/interpreters/unicon-lang/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { # ld: ../common/ipp.o:(.bss+0x0): multiple definition of `lpath'; tglobals.o:(.bss+0x30): first defined here # TODO: remove the workaround once upstream releases version past: # https://sourceforge.net/p/unicon/unicon/ci/b1a65230233f3825d055aee913b4fdcf178a0eaf/ - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configurePhase = '' case "$(uname -a | sed 's/ /_/g')" in diff --git a/pkgs/development/java-modules/jogl/default.nix b/pkgs/development/java-modules/jogl/default.nix index 14273f28a37..7a49bcbda7f 100644 --- a/pkgs/development/java-modules/jogl/default.nix +++ b/pkgs/development/java-modules/jogl/default.nix @@ -35,7 +35,7 @@ # Workaround build failure on -fno-common toolchains: # ld: ../obj/Bindingtest1p1Impl_JNI.o:(.bss+0x8): multiple definition of # `unsigned_size_t_1'; ../obj/TK_Surface_JNI.o:(.bss+0x8): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildPhase = '' cp -r ${gluegen-src} $NIX_BUILD_TOP/gluegen diff --git a/pkgs/development/libraries/ace/default.nix b/pkgs/development/libraries/ace/default.nix index 2e617ef9e0a..bae0401a781 100644 --- a/pkgs/development/libraries/ace/default.nix +++ b/pkgs/development/libraries/ace/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config libtool ]; buildInputs = [ perl ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format-security" ]; diff --git a/pkgs/development/libraries/assimp/default.nix b/pkgs/development/libraries/assimp/default.nix index ed0476fea64..05f2d439adf 100644 --- a/pkgs/development/libraries/assimp/default.nix +++ b/pkgs/development/libraries/assimp/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/development/libraries/audio/qm-dsp/default.nix b/pkgs/development/libraries/audio/qm-dsp/default.nix index a9163a25776..59f7d169291 100644 --- a/pkgs/development/libraries/audio/qm-dsp/default.nix +++ b/pkgs/development/libraries/audio/qm-dsp/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { "LIBDIR=${placeholder "out"}/lib" ]; - NIX_CFLAGS_COMPILE = "-I${kissfft}/include/kissfft"; + env.NIX_CFLAGS_COMPILE = "-I${kissfft}/include/kissfft"; meta = with lib; { description = "A C++ library of functions for DSP and Music Informatics purposes"; diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 5fb65ffa181..bb7989a2cbf 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -105,7 +105,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional (apis != ["*"]) "-DBUILD_ONLY=${lib.concatStringsSep ";" apis}"; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # openssl 3 generates several deprecation warnings "-Wno-error=deprecated-declarations" ]; diff --git a/pkgs/development/libraries/bamf/default.nix b/pkgs/development/libraries/bamf/default.nix index b91c5025db3..99c1df8e0a3 100644 --- a/pkgs/development/libraries/bamf/default.nix +++ b/pkgs/development/libraries/bamf/default.nix @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { doCheck = false; # Ignore deprecation errors - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; passthru.updateScript = gitUpdater { ignoredVersions = ".ubuntu.*"; diff --git a/pkgs/development/libraries/belle-sip/default.nix b/pkgs/development/libraries/belle-sip/default.nix index 44e5a4aa2de..b40ea68a48a 100644 --- a/pkgs/development/libraries/belle-sip/default.nix +++ b/pkgs/development/libraries/belle-sip/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # Do not build static libraries cmakeFlags = [ "-DENABLE_STATIC=NO" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error=cast-function-type" "-Wno-error=deprecated-declarations" "-Wno-error=format-truncation" @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but problematic with some old GCCs and probably clang "-Wno-error=use-after-free" - ]; + ]); propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ]; diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix index 955157d055a..2c99989bc88 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) ''; - 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/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix index e2658423ad3..2dc3266291d 100644 --- a/pkgs/development/libraries/bullet/default.nix +++ b/pkgs/development/libraries/bullet/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { "-DBUILD_BULLET_ROBOTICS_GUI_EXTRA=OFF" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=argument-outside-range -Wno-error=c++11-narrowing"; meta = with lib; { diff --git a/pkgs/development/libraries/bzrtp/default.nix b/pkgs/development/libraries/bzrtp/default.nix index 5791924ad14..46ea599cefc 100644 --- a/pkgs/development/libraries/bzrtp/default.nix +++ b/pkgs/development/libraries/bzrtp/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # Do not build static libraries cmakeFlags = [ "-DENABLE_STATIC=NO" "-DCMAKE_C_FLAGS=-Wno-error=cast-function-type" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=stringop-overflow" ]; diff --git a/pkgs/development/libraries/classads/default.nix b/pkgs/development/libraries/classads/default.nix index 1a05eededc7..6fef10fe5d2 100644 --- a/pkgs/development/libraries/classads/default.nix +++ b/pkgs/development/libraries/classads/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { ]; # error: use of undeclared identifier 'finite'; did you mean 'isfinite'? - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite"; meta = { homepage = "http://www.cs.wisc.edu/condor/classad/"; diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix index 538c4ceb4f5..18d055a387a 100644 --- a/pkgs/development/libraries/clucene-core/2.x.nix +++ b/pkgs/development/libraries/clucene-core/2.x.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { # /build/clucene-core-2.3.3.4/build/bin/cl_test" doCheck = false; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; meta = with lib; { description = "Core library for full-featured text search engine"; diff --git a/pkgs/development/libraries/clucene-core/default.nix b/pkgs/development/libraries/clucene-core/default.nix index 7687694d0f6..b6765af12a4 100644 --- a/pkgs/development/libraries/clucene-core/default.nix +++ b/pkgs/development/libraries/clucene-core/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./gcc6.patch ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; diff --git a/pkgs/development/libraries/cpp-hocon/default.nix b/pkgs/development/libraries/cpp-hocon/default.nix index bba2e03f8d5..fa4fd5fe6d5 100644 --- a/pkgs/development/libraries/cpp-hocon/default.nix +++ b/pkgs/development/libraries/cpp-hocon/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { sed -i -e '/add_subdirectory(tests)/d' lib/CMakeLists.txt ''; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/cpp-ipfs-http-client/default.nix b/pkgs/development/libraries/cpp-ipfs-http-client/default.nix index 38acb5def4a..d44eed5e76f 100644 --- a/pkgs/development/libraries/cpp-ipfs-http-client/default.nix +++ b/pkgs/development/libraries/cpp-ipfs-http-client/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { buildInputs = [ curl ]; propagatedBuildInputs = [ nlohmann_json ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=range-loop-construct" # Needed with GCC 12 "-Wno-error=deprecated-declarations" diff --git a/pkgs/development/libraries/cppdb/default.nix b/pkgs/development/libraries/cppdb/default.nix index 98c9c7ecac1..b71a6c07303 100644 --- a/pkgs/development/libraries/cppdb/default.nix +++ b/pkgs/development/libraries/cppdb/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ sqlite libmysqlclient postgresql unixODBC ]; cmakeFlags = [ "--no-warn-unused-cli" ]; - NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql"; + env.NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql"; meta = with lib; { homepage = "http://cppcms.com/sql/cppdb/"; diff --git a/pkgs/development/libraries/crc32c/default.nix b/pkgs/development/libraries/crc32c/default.nix index 8790840c4c1..3b27601bcbf 100644 --- a/pkgs/development/libraries/crc32c/default.nix +++ b/pkgs/development/libraries/crc32c/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ gflags ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc"; cmakeFlags = [ "-DCRC32C_INSTALL=1" diff --git a/pkgs/development/libraries/easyloggingpp/default.nix b/pkgs/development/libraries/easyloggingpp/default.nix index 03c4ea0ee8f..3fa471b30b2 100644 --- a/pkgs/development/libraries/easyloggingpp/default.nix +++ b/pkgs/development/libraries/easyloggingpp/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [cmake]; buildInputs = [gtest]; cmakeFlags = [ "-Dtest=ON" ]; - NIX_CFLAGS_COMPILE = "-std=c++11" + + env.NIX_CFLAGS_COMPILE = "-std=c++11" + lib.optionalString stdenv.isLinux " -pthread"; postInstall = '' mkdir -p $out/include diff --git a/pkgs/development/libraries/ffms/default.nix b/pkgs/development/libraries/ffms/default.nix index 6e7a58f5597..06fce3891e2 100644 --- a/pkgs/development/libraries/ffms/default.nix +++ b/pkgs/development/libraries/ffms/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-3bPxt911T0bGpAIS2RxBjo+VV84xW06eKcCj3ZAcmvw="; }; - NIX_CFLAGS_COMPILE = "-fPIC"; + env.NIX_CFLAGS_COMPILE = "-fPIC"; nativeBuildInputs = [ autoreconfHook diff --git a/pkgs/development/libraries/flatcc/default.nix b/pkgs/development/libraries/flatcc/default.nix index 4f7fc14ee7b..a65ad5c6fe3 100644 --- a/pkgs/development/libraries/flatcc/default.nix +++ b/pkgs/development/libraries/flatcc/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "-DCMAKE_BUILD_TYPE=Release" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=misleading-indentation" "-Wno-error=stringop-overflow" ]; diff --git a/pkgs/development/libraries/folly/default.nix b/pkgs/development/libraries/folly/default.nix index 6decf1c73a5..6db1fc2e51a 100644 --- a/pkgs/development/libraries/folly/default.nix +++ b/pkgs/development/libraries/folly/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { # jemalloc headers are required in include/folly/portability/Malloc.h propagatedBuildInputs = lib.optional stdenv.isLinux jemalloc; - NIX_CFLAGS_COMPILE = [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" diff --git a/pkgs/development/libraries/gegl/default.nix b/pkgs/development/libraries/gegl/default.nix index 5400c1de592..df800e26ab9 100644 --- a/pkgs/development/libraries/gegl/default.nix +++ b/pkgs/development/libraries/gegl/default.nix @@ -115,7 +115,7 @@ stdenv.mkDerivation rec { # TODO: Fix missing math symbols in gegl seamless clone. # It only appears when we use packaged poly2tri-c instead of vendored one. - NIX_CFLAGS_COMPILE = "-lm"; + env.NIX_CFLAGS_COMPILE = "-lm"; postPatch = '' chmod +x tests/opencl/opencl_test.sh diff --git a/pkgs/development/libraries/geis/default.nix b/pkgs/development/libraries/geis/default.nix index 43b61e78fb4..fad65d7dd4c 100644 --- a/pkgs/development/libraries/geis/default.nix +++ b/pkgs/development/libraries/geis/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { sha256 = "1svhbjibm448ybq6gnjjzj0ak42srhihssafj0w402aj71lgaq4a"; }; - NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare"; hardeningDisable = [ "format" ]; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 9e932e547f4..de7f97527db 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -194,7 +194,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dxattr=false" ]; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=nonnull" # Default for release buildtype but passed manually because # we're using plain diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 9193404d012..e1a427e35b6 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -50,19 +50,21 @@ in # invocation does not work. hardeningDisable = [ "fortify" "pie" "stackprotector" ]; - NIX_CFLAGS_COMPILE = lib.concatStringsSep " " - (builtins.concatLists [ - (lib.optionals withGd gdCflags) - # Fix -Werror build failure when building glibc with musl with GCC >= 8, see: - # https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798 - (lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias") - (lib.optionals ((stdenv.hostPlatform != stdenv.buildPlatform) || stdenv.hostPlatform.isMusl) [ - # Ignore "error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location'" - # New warning as of GCC 9 - # Same for musl: https://github.com/NixOS/nixpkgs/issues/78805 - "-Wno-error=missing-attributes" - ]) - ]); + env = (previousAttrs.env or { }) // { + NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + lib.concatStringsSep " " + (builtins.concatLists [ + (lib.optionals withGd gdCflags) + # Fix -Werror build failure when building glibc with musl with GCC >= 8, see: + # https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798 + (lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias") + (lib.optionals ((stdenv.hostPlatform != stdenv.buildPlatform) || stdenv.hostPlatform.isMusl) [ + # Ignore "error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location'" + # New warning as of GCC 9 + # Same for musl: https://github.com/NixOS/nixpkgs/issues/78805 + "-Wno-error=missing-attributes" + ]) + ]); + }; # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for # any program we run, because the gcc will have been placed at a new diff --git a/pkgs/development/libraries/glm/default.nix b/pkgs/development/libraries/glm/default.nix index d4c836b6912..826848cb98d 100644 --- a/pkgs/development/libraries/glm/default.nix +++ b/pkgs/development/libraries/glm/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ "-fno-ipa-modref" # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823 ]; diff --git a/pkgs/development/libraries/gnome-online-accounts/default.nix b/pkgs/development/libraries/gnome-online-accounts/default.nix index 43eb7a2ff30..2028e3eaef6 100644 --- a/pkgs/development/libraries/gnome-online-accounts/default.nix +++ b/pkgs/development/libraries/gnome-online-accounts/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { webkitgtk_4_1 ]; - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; separateDebugInfo = true; diff --git a/pkgs/development/libraries/gperftools/default.nix b/pkgs/development/libraries/gperftools/default.nix index 002d07cc33b..da40c66e9fe 100644 --- a/pkgs/development/libraries/gperftools/default.nix +++ b/pkgs/development/libraries/gperftools/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { substituteInPlace Makefile.am --replace stdc++ c++ ''; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D_XOPEN_SOURCE"; # some packages want to link to the static tcmalloc_minimal diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 050adad77ca..d5882c86168 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { # fit in the limit. https://github.com/NixOS/nix/pull/1085 ++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ]; - NIX_CFLAGS_COMPILE = toString ( + env.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" diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 8a3a936b145..08de2cdf913 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { export LD_LIBRARY_PATH=$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ''; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option" + lib.optionalString stdenv.isAarch64 "-Wno-error=format-security"; enableParallelBuilds = true; diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix index 590a4508c9b..c9559476eff 100644 --- a/pkgs/development/libraries/gsl/default.nix +++ b/pkgs/development/libraries/gsl/default.nix @@ -20,7 +20,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 = lib.optionalString stdenv.isx86_64 "-mno-fma"; + env.NIX_CFLAGS_COMPILE = 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"; diff --git a/pkgs/development/libraries/gsmlib/default.nix b/pkgs/development/libraries/gsmlib/default.nix index f993eeedc33..5b3672650f1 100644 --- a/pkgs/development/libraries/gsmlib/default.nix +++ b/pkgs/development/libraries/gsmlib/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-std=c++14" ]; diff --git a/pkgs/development/libraries/gtk-frdp/default.nix b/pkgs/development/libraries/gtk-frdp/default.nix index acd2cae6abf..450fdc6024d 100644 --- a/pkgs/development/libraries/gtk-frdp/default.nix +++ b/pkgs/development/libraries/gtk-frdp/default.nix @@ -44,10 +44,10 @@ stdenv.mkDerivation rec { }; }; - 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/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index 6737cdd7e41..af81a55fcaa 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -171,7 +171,7 @@ stdenv.mkDerivation (finalAttrs: { # 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"; + env.NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; postPatch = '' # See https://github.com/NixOS/nixpkgs/issues/132259 diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index 11d00dfa1c0..764dc36d7db 100644 --- a/pkgs/development/libraries/gtk/4.x.nix +++ b/pkgs/development/libraries/gtk/4.x.nix @@ -175,7 +175,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"; + env.NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; postPatch = '' files=( diff --git a/pkgs/development/libraries/http-parser/default.nix b/pkgs/development/libraries/http-parser/default.nix index 146262a4258..dd1ea3559d7 100644 --- a/pkgs/development/libraries/http-parser/default.nix +++ b/pkgs/development/libraries/http-parser/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c"; }; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; patches = [ ./build-shared.patch ] ++ lib.optionals stdenv.isAarch32 [ diff --git a/pkgs/development/libraries/intel-media-driver/default.nix b/pkgs/development/libraries/intel-media-driver/default.nix index 7b948943345..17cdeb50b6b 100644 --- a/pkgs/development/libraries/intel-media-driver/default.nix +++ b/pkgs/development/libraries/intel-media-driver/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { "-DMEDIA_BUILD_FATAL_WARNINGS=OFF" ]; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; nativeBuildInputs = [ cmake pkg-config ]; diff --git a/pkgs/development/libraries/iqueue/default.nix b/pkgs/development/libraries/iqueue/default.nix index ab873f82c57..8803628f675 100644 --- a/pkgs/development/libraries/iqueue/default.nix +++ b/pkgs/development/libraries/iqueue/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libbsd microsoft_gsl ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-parameter" "-Wno-error=misleading-indentation" diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix index 420f414da6f..18c492dc93b 100644 --- a/pkgs/development/libraries/jemalloc/default.nix +++ b/pkgs/development/libraries/jemalloc/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) "--with-lg-vaddr=48" ; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=array-bounds"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=array-bounds"; doCheck = true; diff --git a/pkgs/development/libraries/leatherman/default.nix b/pkgs/development/libraries/leatherman/default.nix index 4b84584d53e..4bae576bd18 100644 --- a/pkgs/development/libraries/leatherman/default.nix +++ b/pkgs/development/libraries/leatherman/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DLEATHERMAN_ENABLE_TESTING=OFF" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ cmake ]; buildInputs = [ boost curl ruby ]; diff --git a/pkgs/development/libraries/libagar/libagar_test.nix b/pkgs/development/libraries/libagar/libagar_test.nix index 19efea263c0..96574ca1188 100644 --- a/pkgs/development/libraries/libagar/libagar_test.nix +++ b/pkgs/development/libraries/libagar/libagar_test.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { # ld: textdlg.o:(.bss+0x0): multiple definition of `someString'; # configsettings.o:(.bss+0x0): first defined here # TODO: the workaround can be removed once nixpkgs updates to 1.6.0. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' substituteInPlace configure.in \ diff --git a/pkgs/development/libraries/libbladeRF/default.nix b/pkgs/development/libraries/libbladeRF/default.nix index e5e51a447b4..2f453a38b8d 100644 --- a/pkgs/development/libraries/libbladeRF/default.nix +++ b/pkgs/development/libraries/libbladeRF/default.nix @@ -46,7 +46,7 @@ in stdenv.mkDerivation rec { "-DBLADERF_GROUP=bladerf" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix index 71a800520ad..26d8c79443a 100644 --- a/pkgs/development/libraries/libcaca/default.nix +++ b/pkgs/development/libraries/libcaca/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { (if x11Support then "--enable-x11" else "--disable-x11") ]; - NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING"; postInstall = '' mkdir -p $dev/bin diff --git a/pkgs/development/libraries/libcamera/default.nix b/pkgs/development/libraries/libcamera/default.nix index 11c8ce9e097..b2ac4fa0aaf 100644 --- a/pkgs/development/libraries/libcamera/default.nix +++ b/pkgs/development/libraries/libcamera/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { ]; # Fixes error on a deprecated declaration - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; # Silence fontconfig warnings about missing config FONTCONFIG_FILE = makeFontsConf { fontDirectories = []; }; diff --git a/pkgs/development/libraries/libchop/default.nix b/pkgs/development/libraries/libchop/default.nix index 22cf5068f39..ce113106ce5 100644 --- a/pkgs/development/libraries/libchop/default.nix +++ b/pkgs/development/libraries/libchop/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config gperf rpcsvc-proto ]; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-ltirpc" ]; buildInputs = diff --git a/pkgs/development/libraries/libcli/default.nix b/pkgs/development/libraries/libcli/default.nix index 6e38c1ab84f..982d34f1bdc 100644 --- a/pkgs/development/libraries/libcli/default.nix +++ b/pkgs/development/libraries/libcli/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=address" ]; diff --git a/pkgs/development/libraries/libclxclient/default.nix b/pkgs/development/libraries/libclxclient/default.nix index 0d39a5e55b2..40f259677ff 100644 --- a/pkgs/development/libraries/libclxclient/default.nix +++ b/pkgs/development/libraries/libclxclient/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; - NIX_CFLAGS_COMPILE = "-I${xorg.xorgproto}/include -I${libXft.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${xorg.xorgproto}/include -I${libXft.dev}/include"; patchPhase = '' cd source diff --git a/pkgs/development/libraries/libcutl/default.nix b/pkgs/development/libraries/libcutl/default.nix index dca7a6148f2..e87dc064402 100644 --- a/pkgs/development/libraries/libcutl/default.nix +++ b/pkgs/development/libraries/libcutl/default.nix @@ -28,5 +28,5 @@ stdenv.mkDerivation rec { buildInputs = [ xercesc ]; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; } diff --git a/pkgs/development/libraries/libdynd/default.nix b/pkgs/development/libraries/libdynd/default.nix index 6018e00f944..8746ea42882 100644 --- a/pkgs/development/libraries/libdynd/default.nix +++ b/pkgs/development/libraries/libdynd/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { "-DDYND_BUILD_BENCHMARKS=OFF" ]; - NIX_CFLAGS_COMPILE = builtins.toString [ + env.NIX_CFLAGS_COMPILE = builtins.toString [ # added to fix build with gcc7+ "-Wno-error=implicit-fallthrough" "-Wno-error=nonnull" diff --git a/pkgs/development/libraries/libe-book/default.nix b/pkgs/development/libraries/libe-book/default.nix index b3a1cab066e..42a3e1722b9 100644 --- a/pkgs/development/libraries/libe-book/default.nix +++ b/pkgs/development/libraries/libe-book/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { postPatch = '' sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in ''; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; meta = with lib; { description = "Library for import of reflowable e-book formats"; license = licenses.lgpl21Plus; diff --git a/pkgs/development/libraries/libepoxy/default.nix b/pkgs/development/libraries/libepoxy/default.nix index 8b35097778d..c793df16708 100644 --- a/pkgs/development/libraries/libepoxy/default.nix +++ b/pkgs/development/libraries/libepoxy/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { "-Dx11=${lib.boolToString x11Support}" ]; - NIX_CFLAGS_COMPILE = lib.optionalString x11Support ''-DLIBGL_PATH="${getLib libGL}/lib"''; + env.NIX_CFLAGS_COMPILE = lib.optionalString x11Support ''-DLIBGL_PATH="${getLib libGL}/lib"''; # cgl_core and cgl_epoxy_api fail in darwin sandbox and on Hydra (because it's headless?) preCheck = lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/development/libraries/libfaketime/default.nix b/pkgs/development/libraries/libfaketime/default.nix index e58c74f2c67..f44702582f2 100644 --- a/pkgs/development/libraries/libfaketime/default.nix +++ b/pkgs/development/libraries/libfaketime/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { PREFIX = placeholder "out"; LIBDIRNAME = "/lib"; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation"; nativeCheckInputs = [ perl ]; diff --git a/pkgs/development/libraries/libfpx/default.nix b/pkgs/development/libraries/libfpx/default.nix index 963c93ffc59..5c77e0139e8 100644 --- a/pkgs/development/libraries/libfpx/default.nix +++ b/pkgs/development/libraries/libfpx/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # Darwin gets misdetected as Windows without this - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__unix"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__unix"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libgaminggear/default.nix b/pkgs/development/libraries/libgaminggear/default.nix index f059d6c73a2..c90d47dff50 100644 --- a/pkgs/development/libraries/libgaminggear/default.nix +++ b/pkgs/development/libraries/libgaminggear/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ]; # https://sourceforge.net/p/libgaminggear/discussion/general/thread/b43a776b3a/ - NIX_CFLAGS_COMPILE = [ "-I${harfbuzz.dev}/include/harfbuzz" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${harfbuzz.dev}/include/harfbuzz" ]; postFixup = '' moveToOutput bin "$bin" diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index 0b983e6edf4..4047c7bbefd 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { --replace "-Xlinker --version-script=$(VERSION_SCRIPT)" "-Xlinker" ''; - NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString ([ "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS" # FHS paths are added so that non-NixOS applications can find vendor files. "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${addOpenGLRunpath.driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"" diff --git a/pkgs/development/libraries/libicns/default.nix b/pkgs/development/libraries/libicns/default.nix index 1df2a8abb82..6dd6654b35a 100644 --- a/pkgs/development/libraries/libicns/default.nix +++ b/pkgs/development/libraries/libicns/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libpng openjpeg ]; - NIX_CFLAGS_COMPILE = [ "-I${openjpeg.dev}/include/${openjpeg.incDir}" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${openjpeg.dev}/include/${openjpeg.incDir}" ]; meta = with lib; { description = "Library for manipulation of the Mac OS icns resource format"; diff --git a/pkgs/development/libraries/libipfix/default.nix b/pkgs/development/libraries/libipfix/default.nix index ce993210285..e62c456dd4a 100644 --- a/pkgs/development/libraries/libipfix/default.nix +++ b/pkgs/development/libraries/libipfix/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { # `ht_globals'; collector.o:/build/libipfix_110209/collector/../libmisc/misc.h:111: first defined here # TODO: drop the workaround when fix ix released: # https://sourceforge.net/p/libipfix/code/ci/a501612c6b8ac6f2df16b366f7a92211382bae6b/ - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { homepage = "https://libipfix.sourceforge.net/"; diff --git a/pkgs/development/libraries/libiscsi/default.nix b/pkgs/development/libraries/libiscsi/default.nix index 3cc2e0eee8c..806a9729c57 100644 --- a/pkgs/development/libraries/libiscsi/default.nix +++ b/pkgs/development/libraries/libiscsi/default.nix @@ -14,8 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; # This problem is gone on libiscsi master. - NIX_CFLAGS_COMPILE = - lib.optional stdenv.hostPlatform.is32bit "-Wno-error=sign-compare"; + env.NIX_CFLAGS_COMPILE = toString (lib.optional stdenv.hostPlatform.is32bit "-Wno-error=sign-compare"); meta = with lib; { description = "iscsi client library and utilities"; diff --git a/pkgs/development/libraries/libjson-rpc-cpp/default.nix b/pkgs/development/libraries/libjson-rpc-cpp/default.nix index e2dd30fc616..8e80b9bd840 100644 --- a/pkgs/development/libraries/libjson-rpc-cpp/default.nix +++ b/pkgs/development/libraries/libjson-rpc-cpp/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { rev = "v${version}"; }; - NIX_CFLAGS_COMPILE = "-I${catch2}/include/catch2"; + env.NIX_CFLAGS_COMPILE = "-I${catch2}/include/catch2"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libjson/default.nix b/pkgs/development/libraries/libjson/default.nix index 0a1a631a6b9..30e36e96585 100644 --- a/pkgs/development/libraries/libjson/default.nix +++ b/pkgs/development/libraries/libjson/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { patches = [ ./install-fix.patch ]; nativeBuildInputs = [ unzip ]; makeFlags = [ "prefix=$(out)" ]; - NIX_CFLAGS_COMPILE = [ "-std=c++11" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; preInstall = "mkdir -p $out/lib"; meta = with lib; { diff --git a/pkgs/development/libraries/liblastfm/default.nix b/pkgs/development/libraries/liblastfm/default.nix index 68658d20ba6..cfd56b5091e 100644 --- a/pkgs/development/libraries/liblastfm/default.nix +++ b/pkgs/development/libraries/liblastfm/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { buildInputs = [ fftwSinglePrec libsamplerate qtbase ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration; - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ "-std=c++11" ]; diff --git a/pkgs/development/libraries/libmemcached/default.nix b/pkgs/development/libraries/libmemcached/default.nix index 099dab139c4..07fe854c777 100644 --- a/pkgs/development/libraries/libmemcached/default.nix +++ b/pkgs/development/libraries/libmemcached/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ libevent ]; propagatedBuildInputs = [ cyrus_sasl ]; - NIX_CFLAGS_COMPILE = "-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; meta = with lib; { homepage = "https://libmemcached.org"; diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix index 67d9ec29b20..3cfec00b132 100644 --- a/pkgs/development/libraries/libomxil-bellagio/default.nix +++ b/pkgs/development/libraries/libomxil-bellagio/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { doCheck = false; # fails - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = if stdenv.cc.isGNU then "-Wno-error=array-bounds -Wno-error=stringop-overflow=8" else "-Wno-error=absolute-value -Wno-error=enum-conversion -Wno-error=logical-not-parentheses -Wno-error=non-literal-null-conversion"; diff --git a/pkgs/development/libraries/liboping/default.nix b/pkgs/development/libraries/liboping/default.nix index 9a44e84b136..118f283a0f9 100644 --- a/pkgs/development/libraries/liboping/default.nix +++ b/pkgs/development/libraries/liboping/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { }) ]; - NIX_CFLAGS_COMPILE = lib.optionalString + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; buildInputs = [ ncurses perl ]; diff --git a/pkgs/development/libraries/libpfm/default.nix b/pkgs/development/libraries/libpfm/default.nix index 3006efe9b29..281aff548c8 100644 --- a/pkgs/development/libraries/libpfm/default.nix +++ b/pkgs/development/libraries/libpfm/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (rec { "SYS=${stdenv.hostPlatform.uname.system}" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; meta = with lib; { description = "Helper library to program the performance monitoring events"; diff --git a/pkgs/development/libraries/libpulsar/default.nix b/pkgs/development/libraries/libpulsar/default.nix index 76e379b45a6..d16c6f7f183 100644 --- a/pkgs/development/libraries/libpulsar/default.nix +++ b/pkgs/development/libraries/libpulsar/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ++ defaultOptionals; # Needed for GCC on Linux - NIX_CFLAGS_COMPILE = [ "-Wno-error=return-type" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=return-type" ]; cmakeFlags = [ "-DBUILD_TESTS=${enableCmakeFeature gtestSupport}" diff --git a/pkgs/development/libraries/librsb/default.nix b/pkgs/development/libraries/librsb/default.nix index cc80655c1f9..d9dc209a713 100644 --- a/pkgs/development/libraries/librsb/default.nix +++ b/pkgs/development/libraries/librsb/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ]; # Ensure C/Fortran code is position-independent. - NIX_CFLAGS_COMPILE = [ "-fPIC" "-Ofast" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-fPIC" "-Ofast" ]; FCFLAGS = [ "-fPIC" "-Ofast" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libsoundio/default.nix b/pkgs/development/libraries/libsoundio/default.nix index 438c278bfad..b7de8bf04e8 100644 --- a/pkgs/development/libraries/libsoundio/default.nix +++ b/pkgs/development/libraries/libsoundio/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { "-DBUILD_TESTS=OFF" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes"; meta = with lib; { description = "Cross platform audio input and output"; diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index 91b4a42d54e..05bf4b15523 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { "-Dsysprof=disabled" ]; - NIX_CFLAGS_COMPILE = "-lpthread"; + env.NIX_CFLAGS_COMPILE = "-lpthread"; doCheck = false; # ERROR:../tests/socket-test.c:37:do_unconnected_socket_test: assertion failed (res == SOUP_STATUS_OK): (2 == 200) diff --git a/pkgs/development/libraries/libtomcrypt/default.nix b/pkgs/development/libraries/libtomcrypt/default.nix index c4dbc11c76c..9bfd42e7a71 100644 --- a/pkgs/development/libraries/libtomcrypt/default.nix +++ b/pkgs/development/libraries/libtomcrypt/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { # Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin # upgrades to a newer SDK. - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; patches = [ (fetchpatch { diff --git a/pkgs/development/libraries/libtommath/default.nix b/pkgs/development/libraries/libtommath/default.nix index 827e78c8197..b6e129722a2 100644 --- a/pkgs/development/libraries/libtommath/default.nix +++ b/pkgs/development/libraries/libtommath/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { makefile = "makefile.shared"; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-DTARGET_OS_IPHONE=0"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libunique/default.nix b/pkgs/development/libraries/libunique/default.nix index 82f71f59070..13dc13e5e96 100644 --- a/pkgs/development/libraries/libunique/default.nix +++ b/pkgs/development/libraries/libunique/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ''; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; # Patches from Gentoo portage patches = [ diff --git a/pkgs/development/libraries/libvirt-glib/default.nix b/pkgs/development/libraries/libvirt-glib/default.nix index 566a1c1b83f..6a8cb5e2dba 100644 --- a/pkgs/development/libraries/libvirt-glib/default.nix +++ b/pkgs/development/libraries/libvirt-glib/default.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { ]; # https://gitlab.com/libvirt/libvirt-glib/-/issues/4 - NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-sign" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=pointer-sign" ]; meta = with lib; { description = "Library for working with virtual machines"; diff --git a/pkgs/development/libraries/libwhereami/default.nix b/pkgs/development/libraries/libwhereami/default.nix index 11950c63486..455e59d8971 100644 --- a/pkgs/development/libraries/libwhereami/default.nix +++ b/pkgs/development/libraries/libwhereami/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "puppetlabs"; }; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/libwps/default.nix b/pkgs/development/libraries/libwps/default.nix index 597370ad0e5..76f2d396960 100644 --- a/pkgs/development/libraries/libwps/default.nix +++ b/pkgs/development/libraries/libwps/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ boost librevenge zlib ]; - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough"; meta = with lib; { homepage = "https://libwps.sourceforge.net/"; diff --git a/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix b/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix index 3997ceb623f..6b375978a4b 100644 --- a/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix +++ b/pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { "--with-x-locale-root=${libX11.out}/share/X11/locale" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/development/libraries/loki/default.nix b/pkgs/development/libraries/loki/default.nix index cfb2ccf9ae6..55be8f9451d 100644 --- a/pkgs/development/libraries/loki/default.nix +++ b/pkgs/development/libraries/loki/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { make build-shared ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; diff --git a/pkgs/development/libraries/mapbox-gl-native/default.nix b/pkgs/development/libraries/mapbox-gl-native/default.nix index 47b9ba63fc2..7b6bf1ddef0 100644 --- a/pkgs/development/libraries/mapbox-gl-native/default.nix +++ b/pkgs/development/libraries/mapbox-gl-native/default.nix @@ -50,7 +50,7 @@ mkDerivation rec { "-DMBGL_WITH_QT_LIB_ONLY=ON" "-DMBGL_WITH_QT_HEADLESS=OFF" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=type-limits"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=type-limits"; meta = with lib; { description = "Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL"; diff --git a/pkgs/development/libraries/maplibre-gl-native/default.nix b/pkgs/development/libraries/maplibre-gl-native/default.nix index 8d6c0664ca1..65a5c266ee6 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" ]; - 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 52633a6d216..b89692bf34d 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -323,10 +323,10 @@ self = stdenv.mkDerivation { done ''; - 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/mp4v2/default.nix b/pkgs/development/libraries/mp4v2/default.nix index b00b3517313..b9b0589bd80 100644 --- a/pkgs/development/libraries/mp4v2/default.nix +++ b/pkgs/development/libraries/mp4v2/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-OP+oVTH9pqYfHtYL1Kjrs1qey/J40ijLi5Gu8GJnvSY="; }; - NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; # `faac' expects `mp4.h'. postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h"; diff --git a/pkgs/development/libraries/mps/default.nix b/pkgs/development/libraries/mps/default.nix index f990d4de7d6..6298a1dfef6 100644 --- a/pkgs/development/libraries/mps/default.nix +++ b/pkgs/development/libraries/mps/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ sqlite ]; # needed for 1.116.0 to build with gcc7 - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-implicit-fallthrough" "-Wno-error=clobbered" "-Wno-error=cast-function-type" diff --git a/pkgs/development/libraries/nss/generic.nix b/pkgs/development/libraries/nss/generic.nix index e1b6abc5b25..408d5f4e1ac 100644 --- a/pkgs/development/libraries/nss/generic.nix +++ b/pkgs/development/libraries/nss/generic.nix @@ -103,14 +103,14 @@ stdenv.mkDerivation rec { runHook postBuild ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error" "-DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\"" ] ++ lib.optionals stdenv.hostPlatform.is64bit [ "-DNSS_USE_64=1" ] ++ lib.optionals stdenv.hostPlatform.isILP32 [ "-DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c - ]; + ]); installPhase = '' runHook preInstall diff --git a/pkgs/development/libraries/ntrack/default.nix b/pkgs/development/libraries/ntrack/default.nix index a10434d90b4..3d8f057fc80 100644 --- a/pkgs/development/libraries/ntrack/default.nix +++ b/pkgs/development/libraries/ntrack/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config python3 ]; # error: ISO C does not support '__FUNCTION__' predefined identifier [-Werror=pedantic] - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; configureFlags = [ "--without-gobject" "CFLAGS=--std=gnu99" ]; diff --git a/pkgs/development/libraries/octomap/default.nix b/pkgs/development/libraries/octomap/default.nix index 5a2064eb595..40e81e195aa 100644 --- a/pkgs/development/libraries/octomap/default.nix +++ b/pkgs/development/libraries/octomap/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=deprecated-declarations" ]; diff --git a/pkgs/development/libraries/opae/default.nix b/pkgs/development/libraries/opae/default.nix index 4e9e4d79dd2..975e005530e 100644 --- a/pkgs/development/libraries/opae/default.nix +++ b/pkgs/development/libraries/opae/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { doCheck = false; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format-truncation" "-Wno-error=address-of-packed-member" "-Wno-array-bounds" diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 59a74a66730..e1a13c9fe57 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -216,7 +216,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake pkg-config unzip ]; - NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; + env.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/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 4a9af9a5388..ac021c2b610 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -307,7 +307,7 @@ stdenv.mkDerivation { pythonPackages.setuptools ]; - NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; + env.NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; # Configure can't find the library without this. OpenBLAS_HOME = lib.optionalString withOpenblas openblas_.dev; diff --git a/pkgs/development/libraries/opencv/default.nix b/pkgs/development/libraries/opencv/default.nix index 73b0874dde5..059dc69df12 100644 --- a/pkgs/development/libraries/opencv/default.nix +++ b/pkgs/development/libraries/opencv/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config unzip ]; - NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; + env.NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; cmakeFlags = [ (opencvFlag "TIFF" enableTIFF) diff --git a/pkgs/development/libraries/opendbx/default.nix b/pkgs/development/libraries/opendbx/default.nix index ce8064cdc1e..b7a4a34390d 100644 --- a/pkgs/development/libraries/opendbx/default.nix +++ b/pkgs/development/libraries/opendbx/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ readline libmysqlclient postgresql sqlite ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-std=c++14" ]; diff --git a/pkgs/development/libraries/openexrid-unstable/default.nix b/pkgs/development/libraries/openexrid-unstable/default.nix index 47b2f639547..c961dfd069a 100644 --- a/pkgs/development/libraries/openexrid-unstable/default.nix +++ b/pkgs/development/libraries/openexrid-unstable/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { --replace g++ c++ ''; - NIX_CFLAGS_COMPILE=''-I${ilmbase.dev}/include/OpenEXR + env.NIX_CFLAGS_COMPILE = ''-I${ilmbase.dev}/include/OpenEXR -I${openexr.dev}/include/OpenEXR -I${openfx.dev}/include/OpenFX ''; diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index ad4654d88b3..c89a8eb5db7 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { "ac_cv_func_memcmp_working=yes" ] ++ lib.optional stdenv.isFreeBSD "--with-pic"; - NIX_CFLAGS_COMPILE = [ "-DLDAPI_SOCK=\"/run/openldap/ldapi\"" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DLDAPI_SOCK=\"/run/openldap/ldapi\"" ]; makeFlags= [ "CC=${stdenv.cc.targetPrefix}cc" diff --git a/pkgs/development/libraries/opensaml-cpp/default.nix b/pkgs/development/libraries/opensaml-cpp/default.nix index 1f4ad96c297..28a8ab838c5 100644 --- a/pkgs/development/libraries/opensaml-cpp/default.nix +++ b/pkgs/development/libraries/opensaml-cpp/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-xmltooling=${xml-tooling-c}" ]; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/ortp/default.nix b/pkgs/development/libraries/ortp/default.nix index 4a0edf08a7e..cf75de2bf6f 100644 --- a/pkgs/development/libraries/ortp/default.nix +++ b/pkgs/development/libraries/ortp/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # Do not build static libraries cmakeFlags = [ "-DENABLE_STATIC=NO" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation"; buildInputs = [ bctoolbox ]; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/phonon/backends/gstreamer.nix b/pkgs/development/libraries/phonon/backends/gstreamer.nix index 3ef63aa2c35..e0614c73741 100644 --- a/pkgs/development/libraries/phonon/backends/gstreamer.nix +++ b/pkgs/development/libraries/phonon/backends/gstreamer.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = let gstPluginPaths = lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0" (with gst_all_1; [ diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix index 4966e379aec..48f4729ba16 100644 --- a/pkgs/development/libraries/phonon/default.nix +++ b/pkgs/development/libraries/phonon/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - NIX_CFLAGS_COMPILE = "-fPIC"; + env.NIX_CFLAGS_COMPILE = "-fPIC"; cmakeFlags = [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" diff --git a/pkgs/development/libraries/physics/cernlib/default.nix b/pkgs/development/libraries/physics/cernlib/default.nix index 8eae6fcaad5..b589524113d 100644 --- a/pkgs/development/libraries/physics/cernlib/default.nix +++ b/pkgs/development/libraries/physics/cernlib/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: libpacklib.a(kedit.o):kuip/klink1.h:11: multiple definition of `klnkaddr'; # libzftplib.a(zftpcdf.o):zftp/zftpcdf.c:155: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "FORTRANOPTIONS=$(FFLAGS)" diff --git a/pkgs/development/libraries/physics/nlojet/default.nix b/pkgs/development/libraries/physics/nlojet/default.nix index e7ecefb59c2..c477f98ae7b 100644 --- a/pkgs/development/libraries/physics/nlojet/default.nix +++ b/pkgs/development/libraries/physics/nlojet/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ]; # error: no member named 'finite' in the global namespace; did you mean simply 'finite'? - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite"; meta = { homepage = "http://www.desy.de/~znagy/Site/NLOJet++.html"; diff --git a/pkgs/development/libraries/pipewire/0.2.nix b/pkgs/development/libraries/pipewire/0.2.nix index 422bcb3e675..cf2448bddfc 100644 --- a/pkgs/development/libraries/pipewire/0.2.nix +++ b/pkgs/development/libraries/pipewire/0.2.nix @@ -31,7 +31,7 @@ in stdenv.mkDerivation rec { # Workaround build on gcc-10+ and clang11+: # spa/plugins/bluez5/libspa-bluez5.so.p/bluez5-monitor.c.o:(.bss+0x0): # multiple definition of `spa_a2dp_sink_factory' - NIX_CFLAGS_COMPILE = [ "-fcommon" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-fcommon" ]; mesonFlags = [ "-Ddocs=true" diff --git a/pkgs/development/libraries/pmdk/default.nix b/pkgs/development/libraries/pmdk/default.nix index 1f02bfa0dab..39d2cd519cd 100644 --- a/pkgs/development/libraries/pmdk/default.nix +++ b/pkgs/development/libraries/pmdk/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { patchPhase = "patchShebangs utils"; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; installPhase = '' make install prefix=$out diff --git a/pkgs/development/libraries/poly2tri-c/default.nix b/pkgs/development/libraries/poly2tri-c/default.nix index cdfd376add1..a0f08460690 100644 --- a/pkgs/development/libraries/poly2tri-c/default.nix +++ b/pkgs/development/libraries/poly2tri-c/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { glib ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "--std=gnu99" "-Wno-error" ]; diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 22ff1e450c1..795178c57e8 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-mac-universal" "--enable-cxx" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays -Wno-error=implicit-const-int-float-conversion"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays -Wno-error=implicit-const-int-float-conversion"; propagatedBuildInputs = lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ]; diff --git a/pkgs/development/libraries/precice/default.nix b/pkgs/development/libraries/precice/default.nix index 01ab32577cb..28b5c3fa85e 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}" ]; - 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/prime-server/default.nix b/pkgs/development/libraries/prime-server/default.nix index 4f30a9f005c..946fbb0dff1 100644 --- a/pkgs/development/libraries/prime-server/default.nix +++ b/pkgs/development/libraries/prime-server/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl zeromq czmq libsodium ]; # https://github.com/kevinkreiser/prime_server/issues/95 - NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-variable" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=unused-variable" ]; meta = with lib; { description = "Non-blocking (web)server API for distributed computing and SOA based on zeromq"; diff --git a/pkgs/development/libraries/prometheus-client-c/default.nix b/pkgs/development/libraries/prometheus-client-c/default.nix index 938d16d3776..f9f580c9717 100644 --- a/pkgs/development/libraries/prometheus-client-c/default.nix +++ b/pkgs/development/libraries/prometheus-client-c/default.nix @@ -48,7 +48,7 @@ let # ld: CMakeFiles/prom.dir/src/prom_process_stat.c.o:(.bss+0x0): multiple definition of # `prom_process_start_time_seconds'; CMakeFiles/prom.dir/src/prom_collector.c.o:(.bss+0x0): first defined here # Should be fixed in 1.2.0 and later: https://github.com/digitalocean/prometheus-client-c/pull/25 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' cd ${subdir} diff --git a/pkgs/development/libraries/qoauth/default.nix b/pkgs/development/libraries/qoauth/default.nix index 2c62ea27d19..51e91499cbd 100644 --- a/pkgs/development/libraries/qoauth/default.nix +++ b/pkgs/development/libraries/qoauth/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase qca-qt5 ]; nativeBuildInputs = [ qmake ]; - NIX_CFLAGS_COMPILE = "-I${qca-qt5}/include/Qca-qt5/QtCrypto"; + env.NIX_CFLAGS_COMPILE = "-I${qca-qt5}/include/Qca-qt5/QtCrypto"; NIX_LDFLAGS = "-lqca-qt5"; dontWrapQtApps = true; 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 816b7503961..68a300ac250 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -198,7 +198,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = toString ( + env.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 diff --git a/pkgs/development/libraries/qt-5/modules/qt3d.nix b/pkgs/development/libraries/qt-5/modules/qt3d.nix index 918eba5b710..98d11864e45 100644 --- a/pkgs/development/libraries/qt-5/modules/qt3d.nix +++ b/pkgs/development/libraries/qt-5/modules/qt3d.nix @@ -5,5 +5,5 @@ qtModule { qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; # error: use of undeclared identifier 'stat64' - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dstat64=stat"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dstat64=stat"; } diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index b718f69610d..ef1192e6b10 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -176,7 +176,7 @@ stdenv.mkDerivation (finalAttrs: { done ''; - NIX_CFLAGS_COMPILE = toString ([ + env.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"'' ''-DLIBRESOLV_SO="${stdenv.cc.libc.out}/lib/libresolv"'' diff --git a/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/pkgs/development/libraries/qt-5/modules/qtserialport.nix index 89d96eb2912..93f3e130ee7 100644 --- a/pkgs/development/libraries/qt-5/modules/qtserialport.nix +++ b/pkgs/development/libraries/qt-5/modules/qtserialport.nix @@ -3,5 +3,5 @@ qtModule { pname = "qtserialport"; qtInputs = [ qtbase ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\""; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\""; } diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix index 27008f6714e..be96236d728 100644 --- a/pkgs/development/libraries/qt-5/modules/qttools.nix +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -36,7 +36,7 @@ qtModule { "bin/macdeployqt" ]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; setupHook = ../hooks/qttools-setup-hook.sh; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 6e4fb476d49..bebfe37f686 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; - 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/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index cc2644edd4e..a70ebd3fb74 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -35,7 +35,7 @@ qtModule { "-DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ # with gcc7 this warning blows the log over Hydra's limit "-Wno-expansion-to-defined" ] @@ -43,7 +43,7 @@ qtModule { ++ lib.optional stdenv.cc.isGNU "-Wno-class-memaccess" # with clang this warning blows the log over Hydra's limit ++ lib.optional stdenv.isDarwin "-Wno-inconsistent-missing-override" - ++ lib.optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${lib.getLib systemd}/lib/libudev"''; + ++ lib.optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${lib.getLib systemd}/lib/libudev"''); doCheck = false; # fails 13 out of 13 tests (ctest) diff --git a/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix index 96ea3d18bab..5372def8aea 100644 --- a/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix +++ b/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix @@ -30,7 +30,7 @@ qtModule { ++ lib.optionals stdenv.isLinux [ gst-vaapi ] ++ lib.optionals stdenv.isDarwin [ VideoToolbox ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-include AudioToolbox/AudioToolbox.h"; NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AudioToolbox"; diff --git a/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix b/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix index 94e6cb9920c..34c17fc0345 100644 --- a/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix +++ b/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix @@ -8,6 +8,6 @@ qtModule { pname = "qtquick3dphysics"; qtInputs = [ qtbase qtquick3d ]; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "-faligned-allocation"; } diff --git a/pkgs/development/libraries/qt-6/modules/qttools.nix b/pkgs/development/libraries/qt-6/modules/qttools.nix index 16a7fc0c89d..e913cee041f 100644 --- a/pkgs/development/libraries/qt-6/modules/qttools.nix +++ b/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -14,7 +14,7 @@ qtModule { patches = [ ../patches/qttools-paths.patch ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DNIX_OUTPUT_DEV=\"${placeholder "dev"}\"" ]; diff --git a/pkgs/development/libraries/qt-mobility/default.nix b/pkgs/development/libraries/qt-mobility/default.nix index 36e1948f09e..7807e41b606 100644 --- a/pkgs/development/libraries/qt-mobility/default.nix +++ b/pkgs/development/libraries/qt-mobility/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "14713pbscysd6d0b9rgm7gg145jzwvgdn22778pf2v13qzvfmy1i"; }; - NIX_CFLAGS_COMPILE="-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; configurePhase = '' ./configure -prefix $out diff --git a/pkgs/development/libraries/rdkafka/default.nix b/pkgs/development/libraries/rdkafka/default.nix index 2a00d967610..7366565370c 100644 --- a/pkgs/development/libraries/rdkafka/default.nix +++ b/pkgs/development/libraries/rdkafka/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib zstd openssl ]; - NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow"; postPatch = '' patchShebangs . diff --git a/pkgs/development/libraries/rlottie/default.nix b/pkgs/development/libraries/rlottie/default.nix index 8cc4e350440..3d4e8a5a664 100644 --- a/pkgs/development/libraries/rlottie/default.nix +++ b/pkgs/development/libraries/rlottie/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja pkg-config ]; - NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__"; meta = with lib; { homepage = "https://github.com/Samsung/rlottie"; diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index 79cd1b86fad..4b7bd0b9fd9 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "tools" ]; - 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/libraries/roctracer/default.nix b/pkgs/development/libraries/roctracer/default.nix index 74d32f44306..a81f7dc1896 100644 --- a/pkgs/development/libraries/roctracer/default.nix +++ b/pkgs/development/libraries/roctracer/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { "-DCMAKE_INSTALL_INCLUDEDIR=include" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/development/libraries/science/math/nccl/default.nix b/pkgs/development/libraries/science/math/nccl/default.nix index 34c18cde23c..99aed3a6a30 100644 --- a/pkgs/development/libraries/science/math/nccl/default.nix +++ b/pkgs/development/libraries/science/math/nccl/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { addOpenGLRunpath $out/lib/lib*.so ''; - NIX_CFLAGS_COMPILE = [ "-Wno-unused-function" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-unused-function" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/science/math/osi/default.nix b/pkgs/development/libraries/science/math/osi/default.nix index b61cd840606..713616b1a50 100644 --- a/pkgs/development/libraries/science/math/osi/default.nix +++ b/pkgs/development/libraries/science/math/osi/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { lib.optionalString withCplex "-L${cplex}/cplex/bin/${cplex.libArch}"; # Compile errors - NIX_CFLAGS_COMPILE = "-Wno-cast-qual"; + env.NIX_CFLAGS_COMPILE = "-Wno-cast-qual"; hardeningDisable = [ "format" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/science/math/suitesparse/4.4.nix b/pkgs/development/libraries/science/math/suitesparse/4.4.nix index e734ed8ff35..95eeaeb8abf 100644 --- a/pkgs/development/libraries/science/math/suitesparse/4.4.nix +++ b/pkgs/development/libraries/science/math/suitesparse/4.4.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { "LAPACK=-llapack" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin " -DNTIMER"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin " -DNTIMER"; postInstall = '' # Build and install shared library diff --git a/pkgs/development/libraries/shibboleth-sp/default.nix b/pkgs/development/libraries/shibboleth-sp/default.nix index 5dd997352f1..84a165956d9 100644 --- a/pkgs/development/libraries/shibboleth-sp/default.nix +++ b/pkgs/development/libraries/shibboleth-sp/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { "--with-fastcgi" ]; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/smesh/default.nix b/pkgs/development/libraries/smesh/default.nix index 0181977873a..478237f866c 100644 --- a/pkgs/development/libraries/smesh/default.nix +++ b/pkgs/development/libraries/smesh/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ninja ]; buildInputs = [ opencascade ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; - NIX_CFLAGS_COMPILE = [ "-std=c++11" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ]; meta = with lib; { description = "Extension to OCE providing advanced meshing features"; diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix index 23464990d86..31f65784061 100644 --- a/pkgs/development/libraries/spdk/default.nix +++ b/pkgs/development/libraries/spdk/default.nix @@ -61,7 +61,7 @@ in stdenv.mkDerivation rec { configureFlags = [ "--with-dpdk=${dpdk'}" ]; - NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile. + env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile. # otherwise does not find strncpy when compiling NIX_LDFLAGS = "-lbsd"; diff --git a/pkgs/development/libraries/speech-tools/default.nix b/pkgs/development/libraries/speech-tools/default.nix index e0ca78df79a..3b34ab92829 100644 --- a/pkgs/development/libraries/speech-tools/default.nix +++ b/pkgs/development/libraries/speech-tools/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: libestools.a(editline.o):(.bss+0x28): multiple definition of # `editline_history_file'; libestools.a(siodeditline.o):(.data.rel.local+0x8): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . ) diff --git a/pkgs/development/libraries/spice/default.nix b/pkgs/development/libraries/spice/default.nix index ed47a87ee11..7f7493b2acc 100644 --- a/pkgs/development/libraries/spice/default.nix +++ b/pkgs/development/libraries/spice/default.nix @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { gdk-pixbuf ]; - NIX_CFLAGS_COMPILE = "-fno-stack-protector"; + env.NIX_CFLAGS_COMPILE = "-fno-stack-protector"; mesonFlags = [ "-Dgstreamer=1.0" diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index f4654a843f6..91f694649b0 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-threadsafe" ] ++ lib.optional interactive "--enable-readline"; - NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString ([ "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_JSON1" diff --git a/pkgs/development/libraries/swiftshader/default.nix b/pkgs/development/libraries/swiftshader/default.nix index 28aabc03682..cfcccd018f9 100644 --- a/pkgs/development/libraries/swiftshader/default.nix +++ b/pkgs/development/libraries/swiftshader/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake python3 jq ]; buildInputs = [ libX11 libXext zlib ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" "-Wno-error=uninitialized" diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix index e8c5dd1dacd..ebfd8e5670f 100644 --- a/pkgs/development/libraries/tinyxml/2.6.2.nix +++ b/pkgs/development/libraries/tinyxml/2.6.2.nix @@ -27,7 +27,7 @@ in stdenv.mkDerivation { hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/development/libraries/ucl/default.nix b/pkgs/development/libraries/ucl/default.nix index 5aef7e9d8f4..048f35868cd 100644 --- a/pkgs/development/libraries/ucl/default.nix +++ b/pkgs/development/libraries/ucl/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # needed to successfully compile with gcc 6 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c90"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c90"; meta = { homepage = "http://www.oberhumer.com/opensource/ucl/"; diff --git a/pkgs/development/libraries/uri/default.nix b/pkgs/development/libraries/uri/default.nix index 6189fcf016d..51c2bcd59a5 100644 --- a/pkgs/development/libraries/uri/default.nix +++ b/pkgs/development/libraries/uri/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd"; }; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=parentheses" # Needed with GCC 12 "-Wno-error=deprecated-declarations" diff --git a/pkgs/development/libraries/ustr/default.nix b/pkgs/development/libraries/ustr/default.nix index 564a996949d..b0e4ab6c064 100644 --- a/pkgs/development/libraries/ustr/default.nix +++ b/pkgs/development/libraries/ustr/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { patches = [ ./va_args.patch ]; # Work around gcc5 switch to gnu11 - NIX_CFLAGS_COMPILE = "-std=gnu89"; + env.NIX_CFLAGS_COMPILE = "-std=gnu89"; # Fix detection of stdint.h postPatch = '' diff --git a/pkgs/development/libraries/v8/8_x.nix b/pkgs/development/libraries/v8/8_x.nix index d55d87f3216..67187a5ec10 100644 --- a/pkgs/development/libraries/v8/8_x.nix +++ b/pkgs/development/libraries/v8/8_x.nix @@ -125,7 +125,7 @@ stdenv.mkDerivation rec { ''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"'' ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${stdenv.cc}"''; - NIX_CFLAGS_COMPILE = "-O2"; + env.NIX_CFLAGS_COMPILE = "-O2"; FORCE_MAC_SDK_MIN = stdenv.targetPlatform.sdkVer or "10.12"; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 4b2117503bd..73ff8403400 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -135,7 +135,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${llvmCcAndBintools}"'' ++ lib.optional stdenv.isDarwin ''use_lld=false''; - NIX_CFLAGS_COMPILE = "-O2"; + env.NIX_CFLAGS_COMPILE = "-O2"; FORCE_MAC_SDK_MIN = stdenv.targetPlatform.sdkVer or "10.12"; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/vaapi-intel-hybrid/default.nix b/pkgs/development/libraries/vaapi-intel-hybrid/default.nix index ca40d426094..aec3bcc6af2 100644 --- a/pkgs/development/libraries/vaapi-intel-hybrid/default.nix +++ b/pkgs/development/libraries/vaapi-intel-hybrid/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # Workaround build failure on -fno-common toolchains like upstream gcc-10. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configureFlags = [ "--enable-drm" diff --git a/pkgs/development/libraries/vigra/default.nix b/pkgs/development/libraries/vigra/default.nix index 32b97f8ea2d..320b43f0e51 100644 --- a/pkgs/development/libraries/vigra/default.nix +++ b/pkgs/development/libraries/vigra/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-pFANoT00Wkh1/Dyd2x75IVTfyaoVA7S86tafUSr29Og="; }; - NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; + env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; nativeBuildInputs = [ cmake ]; buildInputs = [ diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index 085fd7ee8ad..d331391ce0e 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { ]; # error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument] - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument"; postPatch = '' patchShebangs perf/* diff --git a/pkgs/development/libraries/wxwidgets/wxmac30.nix b/pkgs/development/libraries/wxwidgets/wxmac30.nix index 73bf013452a..d4509295969 100644 --- a/pkgs/development/libraries/wxwidgets/wxmac30.nix +++ b/pkgs/development/libraries/wxwidgets/wxmac30.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { ./wx-config --libs ''; - NIX_CFLAGS_COMPILE = "-Wno-undef"; + env.NIX_CFLAGS_COMPILE = "-Wno-undef"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/xml-tooling-c/default.nix b/pkgs/development/libraries/xml-tooling-c/default.nix index 39e25241c94..dcd35d187f9 100644 --- a/pkgs/development/libraries/xml-tooling-c/default.nix +++ b/pkgs/development/libraries/xml-tooling-c/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost curl openssl log4shib xercesc xml-security-c ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 4ca77d56fca..85d125be099 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -102,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: { # As zlib takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc"; # We don't strip on static cross-compilation because of reports that native # stripping corrupted the target library; see commit 12e960f5 for the report. diff --git a/pkgs/development/misc/msp430/mspds/default.nix b/pkgs/development/misc/msp430/mspds/default.nix index ec0ac507a46..75dd08805f3 100644 --- a/pkgs/development/misc/msp430/mspds/default.nix +++ b/pkgs/development/misc/msp430/mspds/default.nix @@ -25,7 +25,7 @@ in stdenv.mkDerivation { libName = "libmsp430${stdenv.hostPlatform.extensions.sharedLibrary}"; makeFlags = [ "OUTPUT=$(libName)" "HIDOBJ=" ]; NIX_LDFLAGS = [ "-lpugixml" "-lhidapi${hidapiDriver}" ]; - NIX_CFLAGS_COMPILE = [ "-I${hidapi}/include/hidapi" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${hidapi}/include/hidapi" ]; patches = [ ./bsl430.patch ]; diff --git a/pkgs/development/mobile/webos/novacomd.nix b/pkgs/development/mobile/webos/novacomd.nix index 5e12fb5ce8a..3d9eb8de103 100644 --- a/pkgs/development/mobile/webos/novacomd.nix +++ b/pkgs/development/mobile/webos/novacomd.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: src/host/usb-linux.c:82: multiple definition of `t_recovery_queue'; # src/host/recovery.c:45: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; cmakeFlags = [ "-DWEBOS_TARGET_MACHINE_IMPL=host" ]; diff --git a/pkgs/development/mobile/xpwn/default.nix b/pkgs/development/mobile/xpwn/default.nix index e23ed132ce4..efd8d538c09 100644 --- a/pkgs/development/mobile/xpwn/default.nix +++ b/pkgs/development/mobile/xpwn/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: ../ipsw-patch/libxpwn.a(libxpwn.c.o):(.bss+0x4): multiple definition of # `endianness'; CMakeFiles/xpwn-bin.dir/src/xpwn.cpp.o:(.bss+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' rm BUILD # otherwise `mkdir build` fails on case insensitive file systems diff --git a/pkgs/development/ocaml-modules/curses/default.nix b/pkgs/development/ocaml-modules/curses/default.nix index 4c38d161ee6..23c098aedcb 100644 --- a/pkgs/development/ocaml-modules/curses/default.nix +++ b/pkgs/development/ocaml-modules/curses/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ ocaml findlib ]; # Fix build for recent ncurses versions - NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1"; + env.NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1"; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/eigen/default.nix b/pkgs/development/ocaml-modules/eigen/default.nix index 47b002fd730..16a69db3b2f 100644 --- a/pkgs/development/ocaml-modules/eigen/default.nix +++ b/pkgs/development/ocaml-modules/eigen/default.nix @@ -15,7 +15,7 @@ buildDunePackage rec { minimumOCamlVersion = "4.02"; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; propagatedBuildInputs = [ ctypes ]; diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index 96dbd071fde..6b35bb423e3 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -12,7 +12,7 @@ let param = rev = version; sha256 = "sha256-69Svno0qLaUifMscnVuPUJlCo9d8Lee+1qiYx34G3Po="; }; - NIX_CFLAGS_COMPILE = null; + env.NIX_CFLAGS_COMPILE = null; buildInputs = [ camlp-streams ]; } else if check "3.12" then { version = "2.18.5"; @@ -24,13 +24,13 @@ let param = # gcc-10. Otherwise build fails as: # ld: ml_gtktree.o:(.bss+0x0): multiple definition of # `ml_table_extension_events'; ml_gdkpixbuf.o:(.bss+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } else throw "lablgtk is not available for OCaml ${ocaml.version}"; in stdenv.mkDerivation { pname = "ocaml${ocaml.version}-lablgtk"; - inherit (param) version src NIX_CFLAGS_COMPILE; + inherit (param) version src env; # gnumake42: https://github.com/garrigue/lablgtk/issues/162 nativeBuildInputs = [ pkg-config ocaml findlib gnumake42 ]; diff --git a/pkgs/development/ocaml-modules/num/default.nix b/pkgs/development/ocaml-modules/num/default.nix index 023b327cc08..12f9aa4ca02 100644 --- a/pkgs/development/ocaml-modules/num/default.nix +++ b/pkgs/development/ocaml-modules/num/default.nix @@ -29,6 +29,6 @@ stdenv.mkDerivation (rec { inherit (src.meta) homepage; }; } // (if lib.versions.majorMinor ocaml.version == "4.06" then { - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; } else {}) ) diff --git a/pkgs/development/pharo/vm/build-vm-legacy.nix b/pkgs/development/pharo/vm/build-vm-legacy.nix index 6e00aa5f789..12de7e84dbc 100644 --- a/pkgs/development/pharo/vm/build-vm-legacy.nix +++ b/pkgs/development/pharo/vm/build-vm-legacy.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: CMakeFiles/pharo.dir/build/pharo-vm-2016.02.18/src/vm/gcc3x-cointerp.c.o:(.bss+0x88): multiple definition of # `sendTrace'; CMakeFiles/pharo.dir/build/pharo-vm-2016.02.18/src/vm/cogit.c.o:(.bss+0x84): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' mkdir -p "$prefix/lib/$name" diff --git a/pkgs/development/pharo/vm/build-vm.nix b/pkgs/development/pharo/vm/build-vm.nix index 1331df3b7d6..fe61061ca6e 100644 --- a/pkgs/development/pharo/vm/build-vm.nix +++ b/pkgs/development/pharo/vm/build-vm.nix @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: vm/vm.a(cogit.o):/build/source/spur64src/vm/cointerp.h:358: multiple definition of `checkAllocFiller'; # vm/vm.a(gcc3x-cointerp.o):/build/source/spur64src/vm/cointerp.h:358: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; CFLAGS = "-DPharoVM -DIMMUTABILITY=1 -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -g -O2 -DNDEBUG -DDEBUGVM=0"; LDFLAGS = "-Wl,-z,now"; diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 87c8f898899..5f12deb0141 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -75,7 +75,7 @@ if isPyPy then null else buildPythonPackage rec { propagatedBuildInputs = [ pycparser ]; # The tests use -Werror but with python3.6 clang detects some unreachable code. - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument -Wno-unreachable-code -Wno-c++11-narrowing"; doCheck = !stdenv.hostPlatform.isMusl; diff --git a/pkgs/development/python-modules/cld2-cffi/default.nix b/pkgs/development/python-modules/cld2-cffi/default.nix index c2087409b04..8ae90785669 100644 --- a/pkgs/development/python-modules/cld2-cffi/default.nix +++ b/pkgs/development/python-modules/cld2-cffi/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { nativeCheckInputs = [ nose ]; # gcc doesn't approve of this code, so disable -Werror - NIX_CFLAGS_COMPILE = "-w" + lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = "-w" + lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing"; checkPhase = "nosetests -v"; diff --git a/pkgs/development/python-modules/datatable/default.nix b/pkgs/development/python-modules/datatable/default.nix index 222399fdfd2..599d2e6cec7 100644 --- a/pkgs/development/python-modules/datatable/default.nix +++ b/pkgs/development/python-modules/datatable/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { nativeCheckInputs = [ docutils pytestCheckHook ]; LLVM = llvm; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; # test suite is very cpu intensive, only run small subset to ensure package is working as expected pytestFlagsArray = [ "tests/test-sets.py" ]; diff --git a/pkgs/development/python-modules/kivy/default.nix b/pkgs/development/python-modules/kivy/default.nix index 0b91d0bb972..77054ebe40a 100644 --- a/pkgs/development/python-modules/kivy/default.nix +++ b/pkgs/development/python-modules/kivy/default.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { # prefer pkg-config over hardcoded framework paths USE_OSX_FRAMEWORKS = 0; # work around python distutils compiling C++ with $CC (see issue #26709) - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace kivy/lib/mtdev.py \ diff --git a/pkgs/development/python-modules/kiwisolver/default.nix b/pkgs/development/python-modules/kiwisolver/default.nix index e51324989e6..ba35537a866 100644 --- a/pkgs/development/python-modules/kiwisolver/default.nix +++ b/pkgs/development/python-modules/kiwisolver/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { hash = "sha256-1BmXUZ/LpKHkbrSi/jG8EvD/lXsrgbrCjbJHRPMz6VU="; }; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [ "-I${lib.getDev libcxx}/include/c++/v1" ]; diff --git a/pkgs/development/python-modules/levenshtein/default.nix b/pkgs/development/python-modules/levenshtein/default.nix index 6faaae0794a..d680f2cb1e0 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 ]; - 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/mayavi/default.nix b/pkgs/development/python-modules/mayavi/default.nix index b0ddfeeefcf..405dccff2df 100644 --- a/pkgs/development/python-modules/mayavi/default.nix +++ b/pkgs/development/python-modules/mayavi/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { vtk ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; # Needs X server doCheck = false; diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 35145189207..9c60eac4116 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -40,7 +40,7 @@ in buildPythonPackage rec { --replace "setuptools<60" "setuptools" ''; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; nativeBuildInputs = lib.optionals cudaSupport [ addOpenGLRunpath diff --git a/pkgs/development/python-modules/pivy/default.nix b/pkgs/development/python-modules/pivy/default.nix index 4f4b9901c13..9d0b7f65f63 100644 --- a/pkgs/development/python-modules/pivy/default.nix +++ b/pkgs/development/python-modules/pivy/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { libXi libXext libSM libICE libX11 ]; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${qtbase.dev}/include/QtCore" "-I${qtbase.dev}/include/QtGui" "-I${qtbase.dev}/include/QtOpenGL" diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index a7003945526..a1951b5e1e7 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { ]; # Work around Python distutils compiling C++ with $CC (see issue #26709) - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [ + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [ "-I${lib.getDev libcxx}/include/c++/v1" ]; diff --git a/pkgs/development/python-modules/pyscard/default.nix b/pkgs/development/python-modules/pyscard/default.nix index 9efc461cec2..106fa03a082 100644 --- a/pkgs/development/python-modules/pyscard/default.nix +++ b/pkgs/development/python-modules/pyscard/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { "${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}" ''; - NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC) + env.NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC) "-I ${lib.getDev pcsclite}/include/PCSC"; propagatedBuildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ]; diff --git a/pkgs/development/python-modules/pyside2/default.nix b/pkgs/development/python-modules/pyside2/default.nix index be281be33c4..2668699aa29 100644 --- a/pkgs/development/python-modules/pyside2/default.nix +++ b/pkgs/development/python-modules/pyside2/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { "-DPYTHON_EXECUTABLE=${python.interpreter}" ]; - NIX_CFLAGS_COMPILE = "-I${qt5.qtdeclarative.dev}/include/QtQuick/${qt5.qtdeclarative.version}/QtQuick"; + env.NIX_CFLAGS_COMPILE = "-I${qt5.qtdeclarative.dev}/include/QtQuick/${qt5.qtdeclarative.version}/QtQuick"; nativeBuildInputs = [ cmake ninja qt5.qmake python ]; diff --git a/pkgs/development/python-modules/pystemmer/default.nix b/pkgs/development/python-modules/pystemmer/default.nix index dd258c380c6..738b67a0997 100644 --- a/pkgs/development/python-modules/pystemmer/default.nix +++ b/pkgs/development/python-modules/pystemmer/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { export PYSTEMMER_SYSTEM_LIBSTEMMER="${lib.getDev libstemmer}/include" ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getDev libstemmer}/include" ]; diff --git a/pkgs/development/python-modules/rapidfuzz/default.nix b/pkgs/development/python-modules/rapidfuzz/default.nix index 0b55d0a77b0..40a27eed934 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" ''; - 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/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 8cd3231bea0..d41526552f4 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -317,7 +317,7 @@ let ''; # https://github.com/tensorflow/tensorflow/pull/39470 - NIX_CFLAGS_COMPILE = [ "-Wno-stringop-truncation" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-stringop-truncation" ]; preConfigure = let opt_flags = [] diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index f1a8e72a591..8fe9e1fed62 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -213,11 +213,11 @@ in buildPythonPackage rec { # # Also of interest: pytorch ignores CXXFLAGS uses CFLAGS for both C and C++: # https://github.com/pytorch/pytorch/blob/v1.11.0/setup.py#L17 - NIX_CFLAGS_COMPILE = lib.optionals (blas.implementation == "mkl") [ "-Wno-error=array-bounds" ] + env.NIX_CFLAGS_COMPILE = toString ((lib.optionals (blas.implementation == "mkl") [ "-Wno-error=array-bounds" ] # Suppress gcc regression: avx512 math function raises uninitialized variable warning # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593 # See also: Fails to compile with GCC 12.1.0 https://github.com/pytorch/pytorch/issues/77939 - ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=maybe-uninitialized" "-Wno-error=uninitialized" ]; + ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=maybe-uninitialized" "-Wno-error=uninitialized" ])); nativeBuildInputs = [ cmake diff --git a/pkgs/development/python-modules/vmprof/default.nix b/pkgs/development/python-modules/vmprof/default.nix index 57088b9c399..a9cc19f79c2 100644 --- a/pkgs/development/python-modules/vmprof/default.nix +++ b/pkgs/development/python-modules/vmprof/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { # `_PyThreadState_Current'; src/_vmprof.o:src/vmprof_common.h:92: first defined here # TODO: can be removed once next release contains: # https://github.com/vmprof/vmprof-python/pull/203 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; diff --git a/pkgs/development/python2-modules/pygtk/default.nix b/pkgs/development/python2-modules/pygtk/default.nix index de0a0a282cf..c3960dd5309 100644 --- a/pkgs/development/python2-modules/pygtk/default.nix +++ b/pkgs/development/python2-modules/pygtk/default.nix @@ -37,8 +37,8 @@ buildPythonPackage rec { buildPhase = "buildPhase"; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-ObjC" - ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-lpython2.7"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-ObjC" + + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) " -lpython2.7"; installPhase = "installPhase"; diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index f287605aa8f..78493c74201 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -975,12 +975,12 @@ let }); data_table = old.data_table.overrideDerivation (attrs: { - NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE + " -fopenmp"; + env.NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE + " -fopenmp"; patchPhase = "patchShebangs configure"; }); ModelMetrics = old.ModelMetrics.overrideDerivation (attrs: { - NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE + env.NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE + lib.optionalString stdenv.isDarwin " -fopenmp"; }); @@ -1184,7 +1184,7 @@ let }); rstan = old.rstan.overrideDerivation (attrs: { - NIX_CFLAGS_COMPILE = "${attrs.NIX_CFLAGS_COMPILE} -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION"; + env.NIX_CFLAGS_COMPILE = "${attrs.NIX_CFLAGS_COMPILE} -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION"; }); mongolite = old.mongolite.overrideDerivation (attrs: { diff --git a/pkgs/development/r-modules/generic-builder.nix b/pkgs/development/r-modules/generic-builder.nix index 05c069383e7..5939a425aef 100644 --- a/pkgs/development/r-modules/generic-builder.nix +++ b/pkgs/development/r-modules/generic-builder.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation ({ lib.optionals requireX [util-linux xvfb-run] ++ lib.optionals stdenv.isDarwin [Cocoa Foundation gfortran libiconv]; - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; configurePhase = '' diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 06516ab2fba..be6a03513ec 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -323,7 +323,7 @@ in nativeBuildInputs = [ pkg-config ] ++ lib.optional stdenv.isDarwin cctools; buildInputs = [ openssl ]; hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=stringop-overflow" "-Wno-error=implicit-fallthrough" "-Wno-error=sizeof-pointer-memaccess" diff --git a/pkgs/development/ruby-modules/gem/default.nix b/pkgs/development/ruby-modules/gem/default.nix index dbb9e4f451c..b8d4df1128a 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 - 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/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix index 40a7909f34a..bc0fc26fc74 100644 --- a/pkgs/development/tools/analysis/rr/default.nix +++ b/pkgs/development/tools/analysis/rr/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { ]; # we turn on additional warnings due to hardening - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; hardeningDisable = [ "fortify" ]; diff --git a/pkgs/development/tools/ashpd-demo/default.nix b/pkgs/development/tools/ashpd-demo/default.nix index f8e1a36a993..2103d74e072 100644 --- a/pkgs/development/tools/ashpd-demo/default.nix +++ b/pkgs/development/tools/ashpd-demo/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { # FIXME: workaround for Pipewire 0.3.64 deprecated API change, remove when fixed upstream # https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55 - NIX_CFLAGS_COMPILE = [ "-DPW_ENABLE_DEPRECATED" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DPW_ENABLE_DEPRECATED" ]; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix index 8cdb533da8e..eaffc7d1a34 100644 --- a/pkgs/development/tools/documentation/doxygen/default.nix +++ b/pkgs/development/tools/documentation/doxygen/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { [ "-DICONV_INCLUDE_DIR=${libiconv}/include" ] ++ lib.optional (qt5 != null) "-Dbuild_wizard=YES"; - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; meta = { diff --git a/pkgs/development/tools/literate-programming/nuweb/default.nix b/pkgs/development/tools/literate-programming/nuweb/default.nix index 2c59bbc3d14..1dce8caeeb4 100644 --- a/pkgs/development/tools/literate-programming/nuweb/default.nix +++ b/pkgs/development/tools/literate-programming/nuweb/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: global.o:/build/nuweb-1.62/global.h:91: multiple definition of # `current_sector'; main.o:/build/nuweb-1.62/global.h:91: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildPhase = '' make nuweb diff --git a/pkgs/development/tools/misc/binutils/2.38/default.nix b/pkgs/development/tools/misc/binutils/2.38/default.nix index 9fb0a35dbf4..1194cbeb245 100644 --- a/pkgs/development/tools/misc/binutils/2.38/default.nix +++ b/pkgs/development/tools/misc/binutils/2.38/default.nix @@ -152,7 +152,7 @@ stdenv.mkDerivation { # As binutils takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin then "-Wno-string-plus-int -Wno-deprecated-declarations" else "-static-libgcc"; diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 208b404f1ea..967f62d7c9c 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -169,7 +169,7 @@ stdenv.mkDerivation (finalAttrs: { # As binutils takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin then "-Wno-string-plus-int -Wno-deprecated-declarations" else "-static-libgcc"; diff --git a/pkgs/development/tools/misc/dbench/default.nix b/pkgs/development/tools/misc/dbench/default.nix index 78b743ef9f1..bb95f21f68d 100644 --- a/pkgs/development/tools/misc/dbench/default.nix +++ b/pkgs/development/tools/misc/dbench/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf rpcsvc-proto ]; buildInputs = [ popt zlib libtirpc ]; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-ltirpc" ]; patches = [ diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix index 49186c75c9a..e3d55472faa 100644 --- a/pkgs/development/tools/misc/ddd/default.nix +++ b/pkgs/development/tools/misc/ddd/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { ./gcc44.patch ]; - NIX_CFLAGS_COMPILE = "-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; postInstall = '' install -D icons/ddd.xpm $out/share/pixmaps/ddd.xpm diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 667acd91f34..bd7adcd1a7b 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { # darwin build fails with format hardening since v7.12 hardeningDisable = lib.optionals stdenv.isDarwin [ "format" ]; - NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; + env.NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; configurePlatforms = [ "build" "host" "target" ]; diff --git a/pkgs/development/tools/misc/hydra/unstable.nix b/pkgs/development/tools/misc/hydra/unstable.nix index 4c141f5a87b..358de5b4a9c 100644 --- a/pkgs/development/tools/misc/hydra/unstable.nix +++ b/pkgs/development/tools/misc/hydra/unstable.nix @@ -197,7 +197,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; - NIX_CFLAGS_COMPILE = "-pthread"; + env.NIX_CFLAGS_COMPILE = "-pthread"; OPENLDAP_ROOT = openldap; diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix index ce8ce9d8a48..1e5aebb76f8 100644 --- a/pkgs/development/tools/misc/indent/default.nix +++ b/pkgs/development/tools/misc/indent/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ texinfo ]; pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-implicit-function-declaration"; hardeningDisable = [ "format" ]; diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix index 40cf1e14e94..a5548ff2051 100644 --- a/pkgs/development/tools/misc/intel-gpu-tools/default.nix +++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { liboping ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" ]; preConfigure = '' patchShebangs tests man diff --git a/pkgs/development/tools/misc/kconfig-frontends/default.nix b/pkgs/development/tools/misc/kconfig-frontends/default.nix index 03044fe5c44..8b38246d67d 100644 --- a/pkgs/development/tools/misc/kconfig-frontends/default.nix +++ b/pkgs/development/tools/misc/kconfig-frontends/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { "--enable-frontends=conf,mconf,nconf" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=format-security"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=format-security"; meta = with lib; { description = "Out of Linux tree packaging of the kconfig infrastructure"; diff --git a/pkgs/development/tools/misc/rocgdb/default.nix b/pkgs/development/tools/misc/rocgdb/default.nix index 6ad3e301822..8775ca6d2d6 100644 --- a/pkgs/development/tools/misc/rocgdb/default.nix +++ b/pkgs/development/tools/misc/rocgdb/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # `-Wno-format-nonliteral` doesn't work - NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; passthru.updateScript = rocmUpdateScript { name = finalAttrs.pname; diff --git a/pkgs/development/tools/misc/tcptrack/default.nix b/pkgs/development/tools/misc/tcptrack/default.nix index 25121bf1ad7..cf3cdf586cc 100644 --- a/pkgs/development/tools/misc/tcptrack/default.nix +++ b/pkgs/development/tools/misc/tcptrack/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses libpcap ]; - NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; meta = with lib; { inherit (src.meta) homepage; diff --git a/pkgs/development/tools/misc/xxdiff/default.nix b/pkgs/development/tools/misc/xxdiff/default.nix index c187ad42c0e..abc4265a1ce 100644 --- a/pkgs/development/tools/misc/xxdiff/default.nix +++ b/pkgs/development/tools/misc/xxdiff/default.nix @@ -20,7 +20,7 @@ mkDerivation rec { dontUseQmakeConfigure = true; # c++11 and above is needed for building with Qt 5.9+ - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; sourceRoot = "source/src"; diff --git a/pkgs/development/tools/mmixware/default.nix b/pkgs/development/tools/mmixware/default.nix index 2b14bf09ddb..024028fd5b6 100644 --- a/pkgs/development/tools/mmixware/default.nix +++ b/pkgs/development/tools/mmixware/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { # Workaround build failure on -fno-common toolchains: # ld: mmix-config.o:(.bss+0x600): multiple definition of `buffer'; /build/ccDuGrwH.o:(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; nativeBuildInputs = [ tetex ]; enableParallelBuilding = true; diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix index bb55ba80796..3514e9c24d1 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" ]; - 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/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix index 0e8777e9f3f..24b47119dc6 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 = lib.optionalString stdenv.cc.isGNU "-std=gnu++98"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=gnu++98"; doCheck = true; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix index 60a45f606f6..9f60651fb4f 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix @@ -345,7 +345,7 @@ lib.composeManyExtensions [ LIB_DIR = "${lib.getLib pkgs.secp256k1}/lib"; # for actual C toolchain build - NIX_CFLAGS_COMPILE = "-I ${lib.getDev pkgs.secp256k1}/include"; + env.NIX_CFLAGS_COMPILE = "-I ${lib.getDev pkgs.secp256k1}/include"; NIX_LDFLAGS = "-L ${lib.getLib pkgs.secp256k1}/lib"; } ); @@ -1383,7 +1383,7 @@ lib.composeManyExtensions [ openexr = super.openexr.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.openexr pkgs.ilmbase ]; - NIX_CFLAGS_COMPILE = [ "-I${pkgs.openexr.dev}/include/OpenEXR" "-I${pkgs.ilmbase.dev}/include/OpenEXR" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${pkgs.openexr.dev}/include/OpenEXR" "-I${pkgs.ilmbase.dev}/include/OpenEXR" ]; } ); @@ -1838,7 +1838,7 @@ lib.composeManyExtensions [ propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ ( if withApplePCSC then [ PCSC ] else [ pcsclite ] ); - NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC) + env.NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC) "-I ${lib.getDev pcsclite}/include/PCSC"; nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.swig diff --git a/pkgs/development/tools/profiling/systemtap/default.nix b/pkgs/development/tools/profiling/systemtap/default.nix index 8799fbd62d3..e7c3ee8c578 100644 --- a/pkgs/development/tools/profiling/systemtap/default.nix +++ b/pkgs/development/tools/profiling/systemtap/default.nix @@ -19,7 +19,7 @@ let nativeBuildInputs = [ pkg-config cpio python3 python3.pkgs.setuptools ]; buildInputs = [ elfutils gettext ]; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ]; # Needed with GCC 12 + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ]; # Needed with GCC 12 }; ## a kernel build dir as expected by systemtap diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index cc6212a5242..1fb54f8c17e 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { '') ]; - NIX_CFLAGS_COMPILE = "-L${libunwind}/lib"; + env.NIX_CFLAGS_COMPILE = "-L${libunwind}/lib"; # error: linker `arm-linux-gnueabihf-gcc` not found preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' diff --git a/pkgs/development/tools/shadered/default.nix b/pkgs/development/tools/shadered/default.nix index 66a9512c18c..07397f48ad1 100644 --- a/pkgs/development/tools/shadered/default.nix +++ b/pkgs/development/tools/shadered/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ./install_path_fix.patch ]; - NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; meta = with lib; { description = "Lightweight, cross-platform & full-featured shader IDE"; diff --git a/pkgs/development/tools/tora/default.nix b/pkgs/development/tools/tora/default.nix index 213c926521f..50ff38a8893 100644 --- a/pkgs/development/tools/tora/default.nix +++ b/pkgs/development/tools/tora/default.nix @@ -42,7 +42,7 @@ mkDerivation { # these libraries are only searched for at runtime so we need to force-link them NIX_LDFLAGS = "-lgvc -lmysqlclient -lecpg -lssl"; - NIX_CFLAGS_COMPILE = "-L${libmysqlclient}/lib/mysql -I${libmysqlclient}/include/mysql"; + env.NIX_CFLAGS_COMPILE = "-L${libmysqlclient}/lib/mysql -I${libmysqlclient}/include/mysql"; qtWrapperArgs = [ ''--prefix PATH : ${lib.getBin graphviz}/bin'' diff --git a/pkgs/development/tools/tracy/default.nix b/pkgs/development/tools/tracy/default.nix index 210700fb8c3..00e121adc71 100644 --- a/pkgs/development/tools/tracy/default.nix +++ b/pkgs/development/tools/tracy/default.nix @@ -21,13 +21,13 @@ in stdenv.mkDerivation rec { ++ lib.optionals stdenv.isDarwin [ Carbon AppKit freetype ] ++ lib.optionals stdenv.isLinux [ gtk3 tbb dbus ]; - NIX_CFLAGS_COMPILE = [ ] + env.NIX_CFLAGS_COMPILE = toString ([ ] # Apple's compiler finds a format string security error on # ../../../server/TracyView.cpp:649:34, preventing building. ++ lib.optional stdenv.isDarwin "-Wno-format-security" ++ lib.optional stdenv.isLinux "-ltbb" ++ lib.optional stdenv.cc.isClang "-faligned-allocation" - ++ lib.optional disableLTO "-fno-lto"; + ++ lib.optional disableLTO "-fno-lto"); NIX_CFLAGS_LINK = lib.optional disableLTO "-fno-lto"; diff --git a/pkgs/development/tools/wlcs/default.nix b/pkgs/development/tools/wlcs/default.nix index 4ec4403987a..47c48aaa841 100644 --- a/pkgs/development/tools/wlcs/default.nix +++ b/pkgs/development/tools/wlcs/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { wayland ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" ]; diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix index 3c90603477e..3d11e551478 100644 --- a/pkgs/development/tools/xcbuild/default.nix +++ b/pkgs/development/tools/xcbuild/default.nix @@ -56,7 +56,7 @@ in stdenv.mkDerivation { cp liblinenoise.* $out/lib/ ''; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; cmakeFlags = [ "-GNinja" ]; diff --git a/pkgs/development/web/kore/default.nix b/pkgs/development/web/kore/default.nix index 1e1aa3e800f..878737ce706 100644 --- a/pkgs/development/web/kore/default.nix +++ b/pkgs/development/web/kore/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ''; # added to fix build w/gcc7 and clang5 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=pointer-compare" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=pointer-compare" + lib.optionalString stdenv.cc.isClang " -Wno-error=unknown-warning-option"; enableParallelBuilding = true; diff --git a/pkgs/development/web/wml/default.nix b/pkgs/development/web/wml/default.nix index 57892920c8d..13295edd310 100644 --- a/pkgs/development/web/wml/default.nix +++ b/pkgs/development/web/wml/default.nix @@ -31,7 +31,7 @@ perlPackages.buildPerlPackage { # Workaround build failure on -fno-common toolchains: # ld: iselect_browse.o:(.bss+0x2020): multiple definition of `Line'; iselect_main.o:(.bss+0x100000): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; hardeningDisable = [ "format" ]; diff --git a/pkgs/games/0ad/game.nix b/pkgs/games/0ad/game.nix index 1ebf215aefb..1738c26659d 100644 --- a/pkgs/games/0ad/game.nix +++ b/pkgs/games/0ad/game.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { nvidia-texture-tools libsodium fmt freetype ] ++ lib.optional withEditor wxGTK; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${xorgproto}/include" "-I${libX11.dev}/include" "-I${libXcursor.dev}/include" diff --git a/pkgs/games/0verkill/default.nix b/pkgs/games/0verkill/default.nix index 8f6a5b12305..2c09e5c1eb6 100644 --- a/pkgs/games/0verkill/default.nix +++ b/pkgs/games/0verkill/default.nix @@ -29,7 +29,7 @@ gccStdenv.mkDerivation rec { # The code needs an update for gcc-10: # https://github.com/hackndev/0verkill/issues/7 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; hardeningDisable = [ "all" ]; # Someday the upstream will update the code... meta = with lib; { diff --git a/pkgs/games/azimuth/default.nix b/pkgs/games/azimuth/default.nix index 301fa231122..ed03c2afd71 100644 --- a/pkgs/games/azimuth/default.nix +++ b/pkgs/games/azimuth/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which ]; buildInputs = [ SDL ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" ]; preConfigure = '' substituteInPlace data/azimuth.desktop \ diff --git a/pkgs/games/blobwars/default.nix b/pkgs/games/blobwars/default.nix index b99c9f2b8e3..b0951064c24 100644 --- a/pkgs/games/blobwars/default.nix +++ b/pkgs/games/blobwars/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config gettext ]; buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ]; makeFlags = [ "PREFIX=$(out)" "RELEASE=1" ]; diff --git a/pkgs/games/btanks/default.nix b/pkgs/games/btanks/default.nix index cec88ab51bd..f1f2e84a614 100644 --- a/pkgs/games/btanks/default.nix +++ b/pkgs/games/btanks/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL"; + env.NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL"; patches = [ (fetchpatch { diff --git a/pkgs/games/cataclysm-dda/stable.nix b/pkgs/games/cataclysm-dda/stable.nix index da84422308c..9d5c865ab48 100644 --- a/pkgs/games/cataclysm-dda/stable.nix +++ b/pkgs/games/cataclysm-dda/stable.nix @@ -44,7 +44,7 @@ let "VERSION=${version}" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/games/cdogs-sdl/default.nix b/pkgs/games/cdogs-sdl/default.nix index a4943187dd6..00cd1e7638b 100644 --- a/pkgs/games/cdogs-sdl/default.nix +++ b/pkgs/games/cdogs-sdl/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { "-DCMAKE_C_FLAGS=-Wno-error=array-bounds" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=stringop-overflow" ]; diff --git a/pkgs/games/dxx-rebirth/default.nix b/pkgs/games/dxx-rebirth/default.nix index f949cf69835..7ec7ab99b56 100644 --- a/pkgs/games/dxx-rebirth/default.nix +++ b/pkgs/games/dxx-rebirth/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { sconsFlags = [ "sdl2=1" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-format-nonliteral" "-Wno-format-truncation" ]; diff --git a/pkgs/games/eboard/default.nix b/pkgs/games/eboard/default.nix index 81bc6d365a0..49721fd2ce1 100644 --- a/pkgs/games/eboard/default.nix +++ b/pkgs/games/eboard/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { patchShebangs ./configure ''; - NIX_CFLAGS_COMPILE = "-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; meta = { homepage = "http://www.bergo.eng.br/eboard/"; diff --git a/pkgs/games/egoboo/default.nix b/pkgs/games/egoboo/default.nix index 995d69d0a91..ba89e4ca7af 100644 --- a/pkgs/games/egoboo/default.nix +++ b/pkgs/games/egoboo/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: mad.o:(.bss+0x233800): multiple definition of `tile_dict'; camera.o:(.bss+0x140): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lm"; diff --git a/pkgs/games/garden-of-coloured-lights/default.nix b/pkgs/games/garden-of-coloured-lights/default.nix index 9d89a6d0b7b..3223cc45805 100644 --- a/pkgs/games/garden-of-coloured-lights/default.nix +++ b/pkgs/games/garden-of-coloured-lights/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: main.o:src/main.c:58: multiple definition of # `eclass'; eclass.o:src/eclass.c:21: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "Old-school vertical shoot-em-up / bullet hell"; diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index f5d23091b48..9be95457b41 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { # ld: build/linux.release/alan3/Location.o:(.bss+0x0): multiple definition of # `logFile'; build/linux.release/alan3/act.o:(.bss+0x0): first defined here # TODO: drop once updated to 2022.1 or later. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; diff --git a/pkgs/games/gimx/default.nix b/pkgs/games/gimx/default.nix index 410228c4f02..9c2b260f1db 100644 --- a/pkgs/games/gimx/default.nix +++ b/pkgs/games/gimx/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { makeFlags = [ "build-core" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=address" "-Wno-error=deprecated-declarations" diff --git a/pkgs/games/iortcw/sp.nix b/pkgs/games/iortcw/sp.nix index ba8a4dd10bd..7f78f89b036 100644 --- a/pkgs/games/iortcw/sp.nix +++ b/pkgs/games/iortcw/sp.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ makeWrapper ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${SDL2.dev}/include/SDL2" "-I${opusfile.dev}/include/opus" ]; diff --git a/pkgs/games/ivan/default.nix b/pkgs/games/ivan/default.nix index 80dc182127d..21f071af379 100644 --- a/pkgs/games/ivan/default.nix +++ b/pkgs/games/ivan/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { cmakeFlags = ["-DCMAKE_CXX_FLAGS=-DWIZARD"]; # Help CMake find SDL_mixer.h - NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2_mixer}/include/SDL2"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2_mixer}/include/SDL2"; # Create "ivan.desktop" file ivanDesktop = makeDesktopItem { diff --git a/pkgs/games/keeperrl/default.nix b/pkgs/games/keeperrl/default.nix index 94eeb46376a..ba2783fb2b2 100644 --- a/pkgs/games/keeperrl/default.nix +++ b/pkgs/games/keeperrl/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { openal curl libogg libvorbis libtheora SDL2 SDL2_image zlib clang ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${SDL2.dev}/include/SDL2" ]; diff --git a/pkgs/games/lincity/default.nix b/pkgs/games/lincity/default.nix index c2ce8f3d82b..50b48f0a158 100644 --- a/pkgs/games/lincity/default.nix +++ b/pkgs/games/lincity/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: modules/.libs/libmodules.a(rocket_pad.o):/build/lincity-1.13.1/modules/../screen.h:23: # multiple definition of `monthgraph_style'; ldsvguts.o:/build/lincity-1.13.1/screen.h:23: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "City simulation game"; diff --git a/pkgs/games/liquidwar/5.nix b/pkgs/games/liquidwar/5.nix index eab7941cbd1..fc9802d46e5 100644 --- a/pkgs/games/liquidwar/5.nix +++ b/pkgs/games/liquidwar/5.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: random.o:(.bss+0x0): multiple definition of `LW_RANDOM_ON'; game.o:(.bss+0x4): first defined here diff --git a/pkgs/games/liquidwar/default.nix b/pkgs/games/liquidwar/default.nix index 9d9e4243452..83ac293f8b6 100644 --- a/pkgs/games/liquidwar/default.nix +++ b/pkgs/games/liquidwar/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - 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/games/macopix/default.nix b/pkgs/games/macopix/default.nix index 5541b3b9d0f..277752dc91c 100644 --- a/pkgs/games/macopix/default.nix +++ b/pkgs/games/macopix/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: dnd.o:src/main.h:136: multiple definition of # `MENU_EXT'; main.o:src/main.h:136: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lX11"; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index 98fbc9051d1..a23868a5020 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -88,7 +88,7 @@ let "-DENABLE_TOUCH=TRUE" ]; - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 nativeBuildInputs = [ cmake doxygen graphviz ninja ]; diff --git a/pkgs/games/naev/default.nix b/pkgs/games/naev/default.nix index f359b8c9d98..d23517cfad3 100644 --- a/pkgs/games/naev/default.nix +++ b/pkgs/games/naev/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config makeWrapper ]; - NIX_CFLAGS_COMPILE="-include ${zlib.dev}/include/zlib.h"; + env.NIX_CFLAGS_COMPILE = "-include ${zlib.dev}/include/zlib.h"; postInstall = '' mkdir -p $out/share/naev diff --git a/pkgs/games/npush/default.nix b/pkgs/games/npush/default.nix index 34293ce4fc0..7f4afb7b89f 100644 --- a/pkgs/games/npush/default.nix +++ b/pkgs/games/npush/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { makeFlags = [ "CC=${stdenv.cc.targetPrefix}c++" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; installPhase = '' runHook preInstall diff --git a/pkgs/games/openlierox/default.nix b/pkgs/games/openlierox/default.nix index 12d00f28ffc..2543d71f0a8 100644 --- a/pkgs/games/openlierox/default.nix +++ b/pkgs/games/openlierox/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z"; }; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -std=c++98 -Wno-error"; + env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -std=c++98 -Wno-error"; # The breakpad fails to build on x86_64, and it's only to report bugs upstream cmakeFlags = [ "-DBREAKPAD=0" ]; diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index 0f91a3c0028..09eec3ef1e1 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -89,7 +89,7 @@ let # https://github.com/TES3MP/openmw-tes3mp/issues/552 patches = oldAttrs.patches ++ [ ./tes3mp.patch ]; - NIX_CFLAGS_COMPILE = "-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; preConfigure = '' substituteInPlace files/version.in \ diff --git a/pkgs/games/openrct2/default.nix b/pkgs/games/openrct2/default.nix index 10914d41077..7d94f423635 100644 --- a/pkgs/games/openrct2/default.nix +++ b/pkgs/games/openrct2/default.nix @@ -94,7 +94,7 @@ stdenv.mkDerivation { "-DDOWNLOAD_TITLE_SEQUENCES=OFF" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" ]; diff --git a/pkgs/games/opensupaplex/default.nix b/pkgs/games/opensupaplex/default.nix index dc5d9aae690..83c7f8b5c9b 100644 --- a/pkgs/games/opensupaplex/default.nix +++ b/pkgs/games/opensupaplex/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-DFILE_DATA_PATH=${placeholder "out"}/lib/opensupaplex" "-DFILE_FHS_XDG_DIRS" ]; diff --git a/pkgs/games/pinball/default.nix b/pkgs/games/pinball/default.nix index b7abf1dac8c..f1ce5fb9d78 100644 --- a/pkgs/games/pinball/default.nix +++ b/pkgs/games/pinball/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { "--with-sdl-prefix=${lib.getDev SDL}" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getDev SDL_image}/include/SDL" "-I${lib.getDev SDL_mixer}/include/SDL" ]; diff --git a/pkgs/games/pokerth/default.nix b/pkgs/games/pokerth/default.nix index f07b2a614d4..fba528933ff 100644 --- a/pkgs/games/pokerth/default.nix +++ b/pkgs/games/pokerth/default.nix @@ -59,7 +59,7 @@ mkDerivation rec { "pokerth.pro" ]; - NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL"; meta = with lib; { homepage = "https://www.pokerth.net"; diff --git a/pkgs/games/quake3/quake3e/default.nix b/pkgs/games/quake3/quake3e/default.nix index 0c57c97bbe9..a98772d241d 100644 --- a/pkgs/games/quake3/quake3e/default.nix +++ b/pkgs/games/quake3/quake3e/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ curl libGL libX11 libXxf86dga alsa-lib libXrandr libXxf86vm libXext SDL2 glibc ]; - NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2"; + env.NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2"; enableParallelBuilding = true; postPatch = '' diff --git a/pkgs/games/rott/default.nix b/pkgs/games/rott/default.nix index 131745ac03e..591275631fa 100644 --- a/pkgs/games/rott/default.nix +++ b/pkgs/games/rott/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { # when using SDL_compat instead of SDL_classic, SDL_mixer isn't correctly # detected, but there is no harm just specifying it - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getDev SDL_mixer}/include/SDL" ]; diff --git a/pkgs/games/sgt-puzzles/default.nix b/pkgs/games/sgt-puzzles/default.nix index 1b022ff6e14..28151972fe2 100644 --- a/pkgs/games/sgt-puzzles/default.nix +++ b/pkgs/games/sgt-puzzles/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { wrapGAppsHook ]; - NIX_CFLAGS_COMPILE = lib.optionalString isMobile "-DSTYLUS_BASED"; + env.NIX_CFLAGS_COMPILE = lib.optionalString isMobile "-DSTYLUS_BASED"; buildInputs = [ gtk3 libX11 ]; diff --git a/pkgs/games/sil/default.nix b/pkgs/games/sil/default.nix index 8455d35f7b7..a6bc8331595 100644 --- a/pkgs/games/sil/default.nix +++ b/pkgs/games/sil/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: main.o:/build/source/Sil/src/externs.h:57: multiple definition of # `mini_screenshot_char'; variable.o:/build/source/Sil/src/externs.h:57: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' runHook preInstall diff --git a/pkgs/games/t4kcommon/default.nix b/pkgs/games/t4kcommon/default.nix index 4a7a2e92b10..b9f9635321b 100644 --- a/pkgs/games/t4kcommon/default.nix +++ b/pkgs/games/t4kcommon/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { # ld: CMakeFiles/t4k_common.dir/t4k_throttle.c.o:(.bss+0x0): multiple definition of # `wrapped_lines'; CMakeFiles/t4k_common.dir/t4k_audio.c.o:(.bss+0x0): first defined here # TODO: revisit https://github.com/tux4kids/t4kcommon/pull/10 when merged. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf libpng librsvg libxml2 ]; diff --git a/pkgs/games/tinyfugue/default.nix b/pkgs/games/tinyfugue/default.nix index 46a5aae09ef..a787d0b25bf 100644 --- a/pkgs/games/tinyfugue/default.nix +++ b/pkgs/games/tinyfugue/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: world.o:/build/tf-50b8/src/socket.h:24: multiple definition of # `world_decl'; command.o:/build/tf-50b8/src/socket.h:24: first defined here - NIX_CFLAGS_COMPILE="-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = { homepage = "https://tinyfugue.sourceforge.net/"; diff --git a/pkgs/games/tome4/default.nix b/pkgs/games/tome4/default.nix index 704d09d72de..1a376f43aac 100644 --- a/pkgs/games/tome4/default.nix +++ b/pkgs/games/tome4/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { # disable parallel building as it caused sporadic build failures enableParallelBuilding = false; - NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_ttf}/include/SDL2"; + env.NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_ttf}/include/SDL2"; makeFlags = [ "config=release" ]; diff --git a/pkgs/games/typespeed/default.nix b/pkgs/games/typespeed/default.nix index a6ae1d9866e..92d8768e4ff 100644 --- a/pkgs/games/typespeed/default.nix +++ b/pkgs/games/typespeed/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: typespeed-typespeed.o:/build/typespeed-0.6.5/src/typespeed.h:69: multiple definition of # `opt'; typespeed-file.o:/build/typespeed-0.6.5/src/typespeed.h:69: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; configureFlags = [ "--datadir=\${out}/share/" ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; diff --git a/pkgs/games/ufoai/default.nix b/pkgs/games/ufoai/default.nix index f596ac2756b..1272097ecb9 100644 --- a/pkgs/games/ufoai/default.nix +++ b/pkgs/games/ufoai/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # r_gl.h:52: first defined here # TODO: drop once release contains upstream fix: # https://github.com/ufoai/ufoai/commit/8a3075fffdad294e - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = ''tar xvf "${srcData}"''; diff --git a/pkgs/games/vvvvvv/default.nix b/pkgs/games/vvvvvv/default.nix index b6d0d59367e..563ed5d7db3 100644 --- a/pkgs/games/vvvvvv/default.nix +++ b/pkgs/games/vvvvvv/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.isDarwin [ Foundation IOKit ]; # Help CMake find SDL_mixer.h - NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2_mixer}/include/SDL2"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2_mixer}/include/SDL2"; cmakeFlags = [ "-DBUNDLE_DEPENDENCIES=OFF" ] ++ lib.optional makeAndPlay "-DMAKEANDPLAY=ON"; diff --git a/pkgs/games/warsow/engine.nix b/pkgs/games/warsow/engine.nix index 51974034b3f..5bc2ef7dbd9 100644 --- a/pkgs/games/warsow/engine.nix +++ b/pkgs/games/warsow/engine.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: CMakeFiles/wswtv_server.dir/__/unix/unix_time.c.o:(.bss+0x8): multiple definition of # `c_pointcontents'; CMakeFiles/wswtv_server.dir/__/null/ascript_null.c.o:(.bss+0x8): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; cmakeFlags = [ "-DQFUSION_GAME=Warsow" ]; diff --git a/pkgs/games/xsok/default.nix b/pkgs/games/xsok/default.nix index bb749b57d01..53254ba98f9 100644 --- a/pkgs/games/xsok/default.nix +++ b/pkgs/games/xsok/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [libX11 libXt libXaw libXpm libXext]; nativeBuildInputs = [imake]; - NIX_CFLAGS_COMPILE=" -isystem ${libXpm.dev}/include/X11 "; + env.NIX_CFLAGS_COMPILE = " -isystem ${libXpm.dev}/include/X11 "; preConfigure = '' sed -e "s@/usr/@$out/share/@g" -i src/Imakefile diff --git a/pkgs/games/xsokoban/default.nix b/pkgs/games/xsokoban/default.nix index 68b47e6225a..4d8a6fa0505 100644 --- a/pkgs/games/xsokoban/default.nix +++ b/pkgs/games/xsokoban/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ libX11 xorgproto libXpm libXt ]; - NIX_CFLAGS_COMPILE = "-I${libXpm.dev}/include/X11"; + env.NIX_CFLAGS_COMPILE = "-I${libXpm.dev}/include/X11"; hardeningDisable = [ "format" ]; diff --git a/pkgs/games/zaz/default.nix b/pkgs/games/zaz/default.nix index ebc7dff5406..84db2a1356c 100644 --- a/pkgs/games/zaz/default.nix +++ b/pkgs/games/zaz/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ]; # Fix SDL include problems - NIX_CFLAGS_COMPILE="-I${lib.getDev SDL}/include/SDL -I${SDL_image}/include/SDL"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL -I${SDL_image}/include/SDL"; # Fix linking errors makeFlags = [ "ZAZ_LIBS+=-lSDL" diff --git a/pkgs/games/zoom/default.nix b/pkgs/games/zoom/default.nix index 818d9deda48..8524ea601b4 100644 --- a/pkgs/games/zoom/default.nix +++ b/pkgs/games/zoom/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { xorg.libXrender ]; - NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2 -fgnu89-inline"; + env.NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2 -fgnu89-inline"; meta = with lib; { homepage = "https://www.logicalshift.co.uk/unix/zoom/"; diff --git a/pkgs/misc/cups/drivers/cups-bjnp/default.nix b/pkgs/misc/cups/drivers/cups-bjnp/default.nix index 5a6ea08a8e1..6c8c8f21a3a 100644 --- a/pkgs/misc/cups/drivers/cups-bjnp/default.nix +++ b/pkgs/misc/cups/drivers/cups-bjnp/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { preConfigure = ''configureFlags="--with-cupsbackenddir=$out/lib/cups/backend"''; buildInputs = [cups]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-include stdio.h" "-Wno-error=stringop-truncation" "-Wno-error=deprecated-declarations" diff --git a/pkgs/misc/drivers/foomatic-filters/default.nix b/pkgs/misc/drivers/foomatic-filters/default.nix index b1095768691..c9a7d10bd8b 100644 --- a/pkgs/misc/drivers/foomatic-filters/default.nix +++ b/pkgs/misc/drivers/foomatic-filters/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: foomatic_rip-options.o:/build/foomatic-filters-4.0.17/options.c:49: multiple definition of # `cupsfilter'; foomatic_rip-foomaticrip.o:/build/foomatic-filters-4.0.17/foomaticrip.c:158: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installTargets = [ "install-cups" ]; diff --git a/pkgs/misc/drivers/utsushi/default.nix b/pkgs/misc/drivers/utsushi/default.nix index 464bc12f491..e33a40f0ad5 100644 --- a/pkgs/misc/drivers/utsushi/default.nix +++ b/pkgs/misc/drivers/utsushi/default.nix @@ -56,7 +56,7 @@ in stdenv.mkDerivation rec { libusb1.dev ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" "-Wno-error=parentheses" "-Wno-error=unused-variable" diff --git a/pkgs/misc/logging/pacemaker/default.nix b/pkgs/misc/logging/pacemaker/default.nix index 7d8cd24e3d8..ff2579aa865 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"}" ]; - 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/misc/screensavers/rss-glx/default.nix b/pkgs/misc/screensavers/rss-glx/default.nix index 2bcb42e85ec..3ec89194df8 100644 --- a/pkgs/misc/screensavers/rss-glx/default.nix +++ b/pkgs/misc/screensavers/rss-glx/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ./cstddef.patch ]; - NIX_CFLAGS_COMPILE = "-I${imagemagick6.dev}/include/ImageMagick"; + env.NIX_CFLAGS_COMPILE = "-I${imagemagick6.dev}/include/ImageMagick"; meta = { description = "Really Slick Screensavers Port to GLX"; diff --git a/pkgs/misc/screensavers/xscreensaver/default.nix b/pkgs/misc/screensavers/xscreensaver/default.nix index d2a6dfcec95..ea8ba9d042b 100644 --- a/pkgs/misc/screensavers/xscreensaver/default.nix +++ b/pkgs/misc/screensavers/xscreensaver/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ]; # "marbling" has NEON code that mixes signed and unsigned vector types - NIX_CFLAGS_COMPILE = lib.optional stdenv.hostPlatform.isAarch "-flax-vector-conversions"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch "-flax-vector-conversions"; postInstall = '' for bin in $out/bin/*; do diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix index e7252ab35e6..136c9721c6b 100644 --- a/pkgs/os-specific/bsd/freebsd/default.nix +++ b/pkgs/os-specific/bsd/freebsd/default.nix @@ -717,7 +717,7 @@ in makeScopeWithSplicing flex byacc gencat rpcgen ]; buildInputs = with self; [ include csu ]; - NIX_CFLAGS_COMPILE = "-B${self.csu}/lib"; + env.NIX_CFLAGS_COMPILE = "-B${self.csu}/lib"; makeFlags = [ "STRIP=-s" # flag to install, not command diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 1033927ce67..6bf884d3828 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -485,7 +485,7 @@ in makeScopeWithSplicing version = "9.2"; sha256 = "0kk6v9k2bygq0wf9gbinliqzqpzs9bgxn0ndyl2wcv3hh2bmsr9p"; patches = [ ./locale.patch ]; - NIX_CFLAGS_COMPILE = "-DYESSTR=__YESSTR -DNOSTR=__NOSTR"; + env.NIX_CFLAGS_COMPILE = "-DYESSTR=__YESSTR -DNOSTR=__NOSTR"; }; rpcgen = mkDerivation { @@ -535,7 +535,7 @@ in makeScopeWithSplicing path = "usr.bin/uudecode"; version = "9.2"; sha256 = "00a3zmh15pg4vx6hz0kaa5mi8d2b1sj4h512d7p6wbvxq6mznwcn"; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isLinux "-DNO_BASE64"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNO_BASE64"; NIX_LDFLAGS = lib.optional stdenv.isDarwin "-lresolv"; }; @@ -550,7 +550,7 @@ in makeScopeWithSplicing path = "usr.bin/config"; version = "9.2"; sha256 = "1yz3n4hncdkk6kp595fh2q5lg150vpqg8iw2dccydkyw4y3hgsjj"; - NIX_CFLAGS_COMPILE = [ "-DMAKE_BOOTSTRAP" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DMAKE_BOOTSTRAP" ]; nativeBuildInputs = with buildPackages.netbsd; [ bsdSetupHook netbsdSetupHook makeMinimal install mandoc byacc flex rsync @@ -636,7 +636,7 @@ in makeScopeWithSplicing makeFlags = defaultMakeFlags ++ [ "FIRMWAREDIR=$(out)/libdata/firmware" ]; hardeningDisable = [ "pic" ]; MKKMOD = "no"; - NIX_CFLAGS_COMPILE = [ "-Wa,--no-warn" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wa,--no-warn" ]; postBuild = '' make -C arch/$MACHINE/compile/$CONFIG $makeFlags @@ -715,7 +715,7 @@ in makeScopeWithSplicing --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include" ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-D__noinline=" "-D__scanflike(a,b)=" "-D__va_list=va_list" @@ -753,7 +753,7 @@ in makeScopeWithSplicing version = "9.2"; sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal"; buildInputs = with self; [ libterminfo ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-D__scanflike(a,b)=" "-D__va_list=va_list" "-D__warn_references(a,b)=" @@ -821,7 +821,7 @@ in makeScopeWithSplicing path = "lib/libpci"; version = "9.2"; sha256 = "+IOEO1Bw3/H3iCp3uk3bwsFZbvCqN5Ciz70irnPl8E8="; - NIX_CFLAGS_COMPILE = [ "-I." ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I." ]; meta.platforms = lib.platforms.netbsd; extraPaths = with self; [ sys.src ]; }; @@ -922,7 +922,7 @@ in makeScopeWithSplicing byacc genassym gencat lorder tsort statHook rsync rpcgen ]; buildInputs = with self; [ headers csu ]; - NIX_CFLAGS_COMPILE = "-B${self.csu}/lib -fcommon"; + env.NIX_CFLAGS_COMPILE = "-B${self.csu}/lib -fcommon"; meta.platforms = lib.platforms.netbsd; SHLIBINSTALLDIR = "$(out)/lib"; MKPICINSTALL = "yes"; diff --git a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix index f1b5e19feb2..984910b34c9 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix @@ -7,7 +7,7 @@ appleDerivation { xcbuildFlags = [ "-target" "Security_frameworks_osx" ]; - # NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers"; + # env.NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers"; preBuild = '' dtrace -h -C -s OSX/libsecurity_utilities/lib/security_utilities.d -o OSX/libsecurity_utilities/lib/utilities_dtrace.h diff --git a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix index 18233cfc522..23a5ae00671 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix @@ -18,7 +18,7 @@ appleDerivation { # Workaround build failure on -fno-common toolchains: # duplicate symbol '_btype_2' in:args.o pr_comment.o - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # temporary install phase until xcodebuild has "install" support installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix index ec252dca41c..30d123ab804 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix @@ -8,7 +8,7 @@ in appleDerivation { nativeBuildInputs = [ xcbuildHook ]; buildInputs = [ libutil ]; - NIX_CFLAGS_COMPILE = "-I."; + env.NIX_CFLAGS_COMPILE = "-I."; NIX_LDFLAGS = "-lutil"; patchPhase = '' # ugly hacks for missing headers diff --git a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix index 6678f1f5b25..3b51022d59b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix @@ -6,7 +6,7 @@ appleDerivation { buildInputs = [ CoreSymbolication apple_sdk.frameworks.CoreSymbolication darling xnu ]; # -fcommon: workaround build failure on -fno-common toolchains: # duplicate symbol '_kCSRegionMachHeaderName' in: libproc.o dt_module_apple.o - NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon"; + env.NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration -fcommon"; NIX_LDFLAGS = "-L./Products/Release"; xcbuildFlags = [ "-target" "dtrace_frameworks" "-target" "dtrace" ]; diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix index cfa66d2c353..8d44cc86194 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix @@ -19,7 +19,7 @@ appleDerivation { # Workaround build failure on -fno-common toolchains: # duplicate symbol '_chdname' in: ar_io.o tty_subs.o - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # temporary install phase until xcodebuild has "install" support installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix index 9a95eb04e6e..367c0f50d03 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/network_cmds/default.nix @@ -7,7 +7,7 @@ appleDerivation { # Work around error from on aarch64-darwin: # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] - NIX_CFLAGS_COMPILE = "-Wno-error=undef-prefix -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=undef-prefix -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/"; # "spray" requires some files that aren't compiling correctly in xcbuild. # "rtadvd" seems to fail with some missing constants. diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix index d42d142ef6e..0c40bc3b186 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix @@ -9,10 +9,10 @@ appleDerivation { buildInputs = [ libutil Librpcsvc apple_sdk.frameworks.OpenDirectory pam CF apple_sdk.frameworks.IOKit openbsm ]; - # NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__" + # env.NIX_CFLAGS_COMPILE = lib.optionalString hostPlatform.isi686 "-D__i386__" # + lib.optionalString hostPlatform.isx86_64 "-D__x86_64__" # + lib.optionalString hostPlatform.isAarch32 "-D__arm__"; - NIX_CFLAGS_COMPILE = [ "-DDAEMON_UID=1" + env.NIX_CFLAGS_COMPILE = toString ([ "-DDAEMON_UID=1" "-DDAEMON_GID=1" "-DDEFAULT_AT_QUEUE='a'" "-DDEFAULT_BATCH_QUEUE='b'" @@ -28,7 +28,7 @@ appleDerivation { "-DAHZV1=64 " "-DAU_SESSION_FLAG_HAS_TTY=0x4000" "-DAU_SESSION_FLAG_HAS_AUTHENTICATED=0x4000" - ] ++ lib.optional (!stdenv.isLinux) " -D__FreeBSD__ "; + ] ++ lib.optional (!stdenv.isLinux) " -D__FreeBSD__ "); patchPhase = '' substituteInPlace login.tproj/login.c \ diff --git a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix index 672bb443242..c99523d6c86 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix @@ -20,7 +20,7 @@ appleDerivation { done ''; - NIX_CFLAGS_COMPILE=[ "-Wno-error=format-security" ]; # hardeningDisable doesn't cut it + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format-security" ]; # hardeningDisable doesn't cut it meta = { platforms = lib.platforms.darwin; diff --git a/pkgs/os-specific/darwin/apple-source-releases/top/default.nix b/pkgs/os-specific/darwin/apple-source-releases/top/default.nix index ef766f7bd7f..2a47de021dc 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/top/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/top/default.nix @@ -5,7 +5,7 @@ appleDerivation { buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil ]; # Workaround build failure on -fno-common toolchains: # duplicate symbol '_tsamp' in: main.o top.o - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lutil"; installPhase = '' install -D Products/Release/libtop.a $out/lib/libtop.a diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 266c2ef4dfe..262cb3d6a38 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -75,7 +75,7 @@ appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ( ARCHS = arch; ARCH_CONFIGS = arch; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; preBuild = let macosVersion = "10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11" + diff --git a/pkgs/os-specific/darwin/maloader/default.nix b/pkgs/os-specific/darwin/maloader/default.nix index 1313c189704..c59f854b847 100644 --- a/pkgs/os-specific/darwin/maloader/default.nix +++ b/pkgs/os-specific/darwin/maloader/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { ld-mac.cc ''; - NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1"; buildInputs = [ clang libcxx ]; buildFlags = [ "USE_LIBCXX=1" "release" ]; diff --git a/pkgs/os-specific/darwin/moltenvk/default.nix b/pkgs/os-specific/darwin/moltenvk/default.nix index 07645c5e61c..2cdb9136a5a 100644 --- a/pkgs/os-specific/darwin/moltenvk/default.nix +++ b/pkgs/os-specific/darwin/moltenvk/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: { dontConfigure = true; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-isystem ${lib.getDev libcxx}/include/c++/v1" "-I${lib.getDev spirv-cross}/include/spirv_cross" "-I${lib.getDev spirv-headers}/include/spirv/unified1/" diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix index 9c41a217bad..7329dc7df2c 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) - 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/autofs/default.nix b/pkgs/os-specific/linux/autofs/default.nix index 5e552301fe4..48d12abcf2f 100644 --- a/pkgs/os-specific/linux/autofs/default.nix +++ b/pkgs/os-specific/linux/autofs/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ''; # configure script is not finding the right path - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; installPhase = '' make install SUBDIRS="lib daemon modules man" # all but samples diff --git a/pkgs/os-specific/linux/digimend/default.nix b/pkgs/os-specific/linux/digimend/default.nix index 70fc58232ab..8a4a852a473 100644 --- a/pkgs/os-specific/linux/digimend/default.nix +++ b/pkgs/os-specific/linux/digimend/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ''; # Fix build on Linux kernel >= 5.18 - NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-fallthrough" ]; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/ebtables/default.nix b/pkgs/os-specific/linux/ebtables/default.nix index bca24d9c905..31a5dbd68f9 100644 --- a/pkgs/os-specific/linux/ebtables/default.nix +++ b/pkgs/os-specific/linux/ebtables/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { "LOCALSTATEDIR=/var" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; preInstall = "mkdir -p $out/etc/sysconfig"; diff --git a/pkgs/os-specific/linux/ena/default.nix b/pkgs/os-specific/linux/ena/default.nix index e3529c97e7b..a7843ee3894 100644 --- a/pkgs/os-specific/linux/ena/default.nix +++ b/pkgs/os-specific/linux/ena/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { makeFlags = kernel.makeFlags; # linux 3.12 - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; configurePhase = '' runHook preConfigure diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix index 9a4f375289b..f8f4f400ade 100644 --- a/pkgs/os-specific/linux/evdi/default.nix +++ b/pkgs/os-specific/linux/evdi/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-mt+vEp9FFf7smmE2PzuH/3EYl7h89RBN1zTVvv2qJ/o="; }; - NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare"; + env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare"; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/firmware/ath9k/default.nix b/pkgs/os-specific/linux/firmware/ath9k/default.nix index 42aca54e933..28da48c31cd 100644 --- a/pkgs/os-specific/linux/firmware/ath9k/default.nix +++ b/pkgs/os-specific/linux/firmware/ath9k/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ m4 cmake perl ]; - NIX_CFLAGS_COMPILE = "-w"; # old libiberty emits fatal warnings + env.NIX_CFLAGS_COMPILE = "-w"; # old libiberty emits fatal warnings dontUseCmakeConfigure = true; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix b/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix index d6b951a7f55..72c6f623554 100644 --- a/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix +++ b/pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { hash = "sha512-KMHgj73eXHT++IE8DbCsFeJ87ngc9R3XxMUJy4Z3s4/MtMeB9zblADHkyJqz9oyeugeJTrDtuVETPBRo7M4Y8A=="; }; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-march=armv8-a+crc" ]; diff --git a/pkgs/os-specific/linux/g15daemon/default.nix b/pkgs/os-specific/linux/g15daemon/default.nix index d20fb662ff5..823f523db24 100644 --- a/pkgs/os-specific/linux/g15daemon/default.nix +++ b/pkgs/os-specific/linux/g15daemon/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream gcc-10: # ld: g15_plugins.o:/build/g15daemon-1.9.5.3/g15daemon/./g15daemon.h:218: # multiple definition of `lcdlist_mutex'; utility_funcs.o:g15daemon.h:218: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index c1f6fd03a2e..dc9af21a6b2 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -121,7 +121,7 @@ stdenv.mkDerivation { ++ lib.optional withLibcap libcap ++ lib.optional (lib.versionAtLeast kernel.version "6.0") python3.pkgs.setuptools; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=cpp" "-Wno-error=bool-compare" "-Wno-error=deprecated-declarations" diff --git a/pkgs/os-specific/linux/kmscon/default.nix b/pkgs/os-specific/linux/kmscon/default.nix index fb44fba22f5..0d146613542 100644 --- a/pkgs/os-specific/linux/kmscon/default.nix +++ b/pkgs/os-specific/linux/kmscon/default.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { ]; # _FORTIFY_SOURCE requires compiling with optimization (-O) - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O" + " -Wno-error=maybe-uninitialized"; # https://github.com/Aetf/kmscon/issues/49 configureFlags = [ diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index fd697fed776..ec6d3f5aa4b 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] hardeningDisable = [ "fortify" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; makeFlags = [ "PREFIX=$(out)" diff --git a/pkgs/os-specific/linux/libsemanage/default.nix b/pkgs/os-specific/linux/libsemanage/default.nix index 18586afcd01..0b567432fb0 100644 --- a/pkgs/os-specific/linux/libsemanage/default.nix +++ b/pkgs/os-specific/linux/libsemanage/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { # 1278 | int i; # | ^ # cc1: all warnings being treated as errors - NIX_CFLAGS_COMPILE = [ "-Wno-error=clobbered" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=clobbered" ]; installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ]; diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index 108e6507231..1dd15e1b0e7 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { "SHLIBDIR=$(out)/lib" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/lockdep/default.nix b/pkgs/os-specific/linux/lockdep/default.nix index 3cdb64becb5..1ea2de63560 100644 --- a/pkgs/os-specific/linux/lockdep/default.nix +++ b/pkgs/os-specific/linux/lockdep/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: lockdep.o:/build/linux-5.0.21/tools/lib/lockdep/../../include/linux/rcu.h:5: multiple definition of # `rcu_scheduler_active'; common.o:/build/linux-5.0.21/tools/lib/lockdep/../../include/linux/rcu.h:5: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildPhase = '' make defconfig diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 3a69923aca8..f7b5b3fd1fa 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; makeFlags = kernel.makeFlags ++ [ "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" diff --git a/pkgs/os-specific/linux/mceinject/default.nix b/pkgs/os-specific/linux/mceinject/default.nix index 3e89ed83361..52422576374 100644 --- a/pkgs/os-specific/linux/mceinject/default.nix +++ b/pkgs/os-specific/linux/mceinject/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ flex bison ]; - NIX_CFLAGS_COMPILE = "-Os -g -Wall"; + env.NIX_CFLAGS_COMPILE = "-Os -g -Wall"; NIX_LDFLAGS = [ "-lpthread" ]; diff --git a/pkgs/os-specific/linux/mwprocapture/default.nix b/pkgs/os-specific/linux/mwprocapture/default.nix index 96dc2e6ffad..0eedc5e08a1 100644 --- a/pkgs/os-specific/linux/mwprocapture/default.nix +++ b/pkgs/os-specific/linux/mwprocapture/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { patches = [ ./pci.patch ]; - NIX_CFLAGS_COMPILE="-Wno-error=implicit-fallthrough"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough"; postInstall = '' cd ../ diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix index b892292477c..d7d04e8368d 100644 --- a/pkgs/os-specific/linux/netatop/default.nix +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { buildInputs = [ kmod zlib ]; hardeningDisable = [ "pic" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-fallthrough" ]; patches = [ # fix paths in netatop.service diff --git a/pkgs/os-specific/linux/nvidia-x11/persistenced.nix b/pkgs/os-specific/linux/nvidia-x11/persistenced.nix index 5276dfd2aff..febae911064 100644 --- a/pkgs/os-specific/linux/nvidia-x11/persistenced.nix +++ b/pkgs/os-specific/linux/nvidia-x11/persistenced.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { $out/bin/nvidia-persistenced ''; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-ltirpc" ]; meta = with lib; { diff --git a/pkgs/os-specific/linux/ocf-resource-agents/default.nix b/pkgs/os-specific/linux/ocf-resource-agents/default.nix index 976c5f1779d..11f094f72c9 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 ]; - 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/os-specific/linux/odp-dpdk/default.nix b/pkgs/os-specific/linux/odp-dpdk/default.nix index 7cb364597bb..333153e65d4 100644 --- a/pkgs/os-specific/linux/odp-dpdk/default.nix +++ b/pkgs/os-specific/linux/odp-dpdk/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { libbpf ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" "-Wno-error=uninitialized" diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index 60a55096b44..b81bf74a3d9 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { RTE_SDK = dpdk; GUI = lib.optionalString withGtk "true"; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=address" "-Wno-error=use-after-free" diff --git a/pkgs/os-specific/linux/roccat-tools/default.nix b/pkgs/os-specific/linux/roccat-tools/default.nix index 38cbabad520..389d5036b75 100644 --- a/pkgs/os-specific/linux/roccat-tools/default.nix +++ b/pkgs/os-specific/linux/roccat-tools/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { "-DLIBDIR=lib" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-I${harfbuzz.dev}/include/harfbuzz" # Workaround build failure on -fno-common toolchains: diff --git a/pkgs/os-specific/linux/rtl8821au/default.nix b/pkgs/os-specific/linux/rtl8821au/default.nix index 7ba338d3785..c709c702f93 100644 --- a/pkgs/os-specific/linux/rtl8821au/default.nix +++ b/pkgs/os-specific/linux/rtl8821au/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" "format" ]; - NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; makeFlags = [ "ARCH=${stdenv.hostPlatform.linuxArch}" diff --git a/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix b/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix index 5440e417535..eed99122cd6 100644 --- a/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix +++ b/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { --replace '$(TEST_SUITE): $(PROVIDER_LIB) $(TEST_SUITE_OBJ)' '$(TEST_SUITE): $(TEST_SUITE_OBJ)' ''; - NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; makeFlags = [ "-C src/Linux" diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix index e9ee3c518fe..328098dbea3 100644 --- a/pkgs/os-specific/linux/sssd/default.nix +++ b/pkgs/os-specific/linux/sssd/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; # Something is looking for instead of - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; preConfigure = '' export SGML_CATALOG_FILES="${docbookFiles}" diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index a8579a50fb6..a05557468bd 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { ] ++ lib.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))"; + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))"; preConfigure = '' if ! grep -q "${libsRev}" cmake/modules/falcosecurity-libs.cmake; then diff --git a/pkgs/os-specific/linux/sysklogd/default.nix b/pkgs/os-specific/linux/sysklogd/default.nix index 4d9844f516b..048d82b5a53 100644 --- a/pkgs/os-specific/linux/sysklogd/default.nix +++ b/pkgs/os-specific/linux/sysklogd/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./systemd.patch ./union-wait.patch ./fix-includes-for-musl.patch ]; - NIX_CFLAGS_COMPILE = "-DSYSV"; + env.NIX_CFLAGS_COMPILE = "-DSYSV"; installFlags = [ "BINDIR=$(out)/sbin" "MANDIR=$(out)/share/man" "INSTALL=install" ]; diff --git a/pkgs/os-specific/linux/syslinux/default.nix b/pkgs/os-specific/linux/syslinux/default.nix index 821d5113308..f5153eb5abc 100644 --- a/pkgs/os-specific/linux/syslinux/default.nix +++ b/pkgs/os-specific/linux/syslinux/default.nix @@ -102,7 +102,7 @@ stdenv.mkDerivation { # gcc-10. Otherwise build fails as: # ld: acpi/xsdt.o:/build/syslinux-b404870/com32/gpllib/../gplinclude/memory.h:40: multiple definition of # `e820_types'; memory.o:/build/syslinux-b404870/com32/gpllib/../gplinclude/memory.h:40: first defined here - NIX_CFLAGS_COMPILE="-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "BINDIR=$(out)/bin" diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index b03f3c3c16c..4d6950347fc 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -630,7 +630,7 @@ stdenv.mkDerivation { --replace "SYSTEMD_CGROUP_AGENTS_PATH" "_SYSTEMD_CGROUP_AGENT_PATH" ''; - NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString ([ # Can't say ${polkit.bin}/bin/pkttyagent here because that would # lead to a cyclic dependency. "-UPOLKIT_AGENT_BINARY_PATH" diff --git a/pkgs/os-specific/linux/tinyalsa/default.nix b/pkgs/os-specific/linux/tinyalsa/default.nix index 45d9191eea0..cae778227c7 100644 --- a/pkgs/os-specific/linux/tinyalsa/default.nix +++ b/pkgs/os-specific/linux/tinyalsa/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { "-DTINYALSA_USES_PLUGINS=ON" ]; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=sign-compare" ]; diff --git a/pkgs/os-specific/linux/tiptop/default.nix b/pkgs/os-specific/linux/tiptop/default.nix index 7e88e1b14b5..a26602b6b44 100644 --- a/pkgs/os-specific/linux/tiptop/default.nix +++ b/pkgs/os-specific/linux/tiptop/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ flex bison ]; buildInputs = [ libxml2 ncurses ]; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; meta = with lib; { description = "Performance monitoring tool for Linux"; diff --git a/pkgs/os-specific/linux/usbip/default.nix b/pkgs/os-specific/linux/usbip/default.nix index cadf38b106c..b91f55dcd2f 100644 --- a/pkgs/os-specific/linux/usbip/default.nix +++ b/pkgs/os-specific/linux/usbip/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoconf automake libtool ]; buildInputs = [ udev ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address-of-packed-member" ]; preConfigure = '' cd tools/usb/usbip diff --git a/pkgs/os-specific/linux/usermount/default.nix b/pkgs/os-specific/linux/usermount/default.nix index 934367dcd11..475ccd848eb 100644 --- a/pkgs/os-specific/linux/usermount/default.nix +++ b/pkgs/os-specific/linux/usermount/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config ]; buildInputs = [ dbus libnotify udisks2 gdk-pixbuf ]; - NIX_CFLAGS_COMPILE = "-DENABLE_NOTIFICATIONS"; + env.NIX_CFLAGS_COMPILE = "-DENABLE_NOTIFICATIONS"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix index d3647264bec..0427f38d5f7 100644 --- a/pkgs/servers/amqp/qpid-cpp/default.nix +++ b/pkgs/servers/amqp/qpid-cpp/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { sed -i '/management/d' CMakeLists.txt ''; - NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error=maybe-uninitialized" ] ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" diff --git a/pkgs/servers/computing/torque/default.nix b/pkgs/servers/computing/torque/default.nix index ccb57f55bb2..9cf0b9ba0b2 100644 --- a/pkgs/servers/computing/torque/default.nix +++ b/pkgs/servers/computing/torque/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # added to fix build with gcc7 - NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive"; + env.NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive"; postPatch = '' substituteInPlace Makefile.am \ diff --git a/pkgs/servers/coturn/default.nix b/pkgs/servers/coturn/default.nix index b8c56f54866..f73a6a6f633 100644 --- a/pkgs/servers/coturn/default.nix +++ b/pkgs/servers/coturn/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { # ld: ...-libprom-0.1.1/include/prom_collector_registry.h:37: multiple definition of # `PROM_COLLECTOR_REGISTRY_DEFAULT'; ...-libprom-0.1.1/include/prom_collector_registry.h:37: first defined here # Should be fixed in libprom-1.2.0 and later: https://github.com/digitalocean/prometheus-client-c/pull/25 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; passthru.tests.coturn = nixosTests.coturn; diff --git a/pkgs/servers/dict/libmaa.nix b/pkgs/servers/dict/libmaa.nix index d55f89b9477..b0762990f2d 100644 --- a/pkgs/servers/dict/libmaa.nix +++ b/pkgs/servers/dict/libmaa.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = [ libtool ]; # configureFlags = [ "--datadir=/run/current-system/share/dictd" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation"; meta = with lib; { description = "Dict protocol server and client"; diff --git a/pkgs/servers/dns/pdns/default.nix b/pkgs/servers/dns/pdns/default.nix index 72e1bfaf464..11fa40ff91b 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. - 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/fcgiwrap/default.nix b/pkgs/servers/fcgiwrap/default.nix index 0efadc6524a..c778ed72328 100644 --- a/pkgs/servers/fcgiwrap/default.nix +++ b/pkgs/servers/fcgiwrap/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-znAsZk+aB2XO2NK8Mjc+DLwykYKHolnVQPErlaAx3Oc="; }; - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough"; configureFlags = [ "--with-systemd" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; diff --git a/pkgs/servers/foundationdb/cmake.nix b/pkgs/servers/foundationdb/cmake.nix index 436f0a7fc4d..cdf8267c6ab 100644 --- a/pkgs/servers/foundationdb/cmake.nix +++ b/pkgs/servers/foundationdb/cmake.nix @@ -60,7 +60,7 @@ let (lib.optionalString (!useClang) "-DUSE_LD=GOLD") ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=missing-template-keyword" ]; diff --git a/pkgs/servers/gemini/gmnisrv/default.nix b/pkgs/servers/gemini/gmnisrv/default.nix index d37a7247ecf..c13d4dda505 100644 --- a/pkgs/servers/gemini/gmnisrv/default.nix +++ b/pkgs/servers/gemini/gmnisrv/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-V9HXXYQIo3zeqZjJEn+dhemNg6AU+ee3FRmBmXgLuYQ="; }; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ]; diff --git a/pkgs/servers/geospatial/mapcache/default.nix b/pkgs/servers/geospatial/mapcache/default.nix index 781edfce98c..e9ac6e83497 100644 --- a/pkgs/servers/geospatial/mapcache/default.nix +++ b/pkgs/servers/geospatial/mapcache/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { "-DAPACHE_MODULE_DIR=${placeholder "out"}/modules" ]; - NIX_CFLAGS_COMPILE = "-std=c99"; + env.NIX_CFLAGS_COMPILE = "-std=c99"; meta = with lib; { description = "A server that implements tile caching to speed up access to WMS layers"; diff --git a/pkgs/servers/http/mini-httpd/default.nix b/pkgs/servers/http/mini-httpd/default.nix index 258eacf768c..d56f83366f9 100644 --- a/pkgs/servers/http/mini-httpd/default.nix +++ b/pkgs/servers/http/mini-httpd/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; meta = { homepage = "http://mini-httpd.nongnu.org/"; diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index f882b782bcc..7d0ab6ac420 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -116,7 +116,7 @@ stdenv.mkDerivation { ++ configureFlags ++ map (mod: "--add-module=${mod.src}") modules; - NIX_CFLAGS_COMPILE = toString ([ + env.NIX_CFLAGS_COMPILE = toString ([ "-I${libxml2.dev}/include/libxml2" "-Wno-error=implicit-fallthrough" ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ diff --git a/pkgs/servers/http/tengine/default.nix b/pkgs/servers/http/tengine/default.nix index 746552fc622..6ab952af263 100644 --- a/pkgs/servers/http/tengine/default.nix +++ b/pkgs/servers/http/tengine/default.nix @@ -98,7 +98,7 @@ stdenv.mkDerivation rec { ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" ++ map (mod: "--add-module=${mod.src}") modules; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -Wno-error=implicit-fallthrough" + env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -Wno-error=implicit-fallthrough" + optionalString stdenv.isDarwin " -Wno-error=deprecated-declarations"; preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); diff --git a/pkgs/servers/mail/archiveopteryx/default.nix b/pkgs/servers/mail/archiveopteryx/default.nix index 2bcd87c3b84..99e482323a4 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+ and gcc11+ - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ "-std=c++11" # c++17+ has errors "-Wno-error=builtin-declaration-mismatch" "-Wno-error=deprecated-copy" @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { "-Wno-error=nonnull" ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ "-Wno-error=mismatched-new-delete" - ]; + ]); buildPhase = ''jam "-j$NIX_BUILD_CORES" ''; installPhase = '' diff --git a/pkgs/servers/mail/dspam/default.nix b/pkgs/servers/mail/dspam/default.nix index 852de800a6c..f32316428a6 100644 --- a/pkgs/servers/mail/dspam/default.nix +++ b/pkgs/servers/mail/dspam/default.nix @@ -68,7 +68,7 @@ in stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: .libs/hash_drv.o:/build/dspam-3.10.2/src/util.h:96: multiple definition of `verified_user'; # .libs/libdspam.o:/build/dspam-3.10.2/src/util.h:96: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # Lots of things are hardwired to paths like sysconfdir. That's why we install with both "prefix" and "DESTDIR" # and fix directory structure manually after that. diff --git a/pkgs/servers/mail/mlmmj/default.nix b/pkgs/servers/mail/mlmmj/default.nix index aba0664b8f4..2795ba1af35 100644 --- a/pkgs/servers/mail/mlmmj/default.nix +++ b/pkgs/servers/mail/mlmmj/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: getlistdelim.o:/build/mlmmj-1.3.0/src/../include/mlmmj.h:84: multiple definition of # `subtype_strs'; mlmmj-send.o:/build/mlmmj-1.3.0/src/../include/mlmmj.h:84: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; postInstall = '' # grab all documentation files diff --git a/pkgs/servers/mail/opensmtpd/extras.nix b/pkgs/servers/mail/opensmtpd/extras.nix index 5759e57d3b4..f179bf96368 100644 --- a/pkgs/servers/mail/opensmtpd/extras.nix +++ b/pkgs/servers/mail/opensmtpd/extras.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { "--with-table-redis" ]; - NIX_CFLAGS_COMPILE = lib.optionalString enableRedis + env.NIX_CFLAGS_COMPILE = lib.optionalString enableRedis "-I${hiredis}/include/hiredis -lhiredis" + lib.optionalString enableMysql " -L${libmysqlclient}/lib/mysql"; diff --git a/pkgs/servers/mail/postfix/pfixtools.nix b/pkgs/servers/mail/postfix/pfixtools.nix index df04ade5b45..d57aaa4ef29 100644 --- a/pkgs/servers/mail/postfix/pfixtools.nix +++ b/pkgs/servers/mail/postfix/pfixtools.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation { --replace /bin/bash ${bash}/bin/bash; ''; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=nonnull-compare -Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=nonnull-compare -Wno-error=format-truncation"; makeFlags = [ "DESTDIR=$(out)" "prefix=" ]; diff --git a/pkgs/servers/memcached/default.nix b/pkgs/servers/memcached/default.nix index 83721ed601d..aa7e4136017 100644 --- a/pkgs/servers/memcached/default.nix +++ b/pkgs/servers/memcached/default.nix @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ] - ++ lib.optional stdenv.isDarwin "-Wno-error"; + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error=deprecated-declarations" ] + ++ lib.optional stdenv.isDarwin "-Wno-error"); meta = with lib; { description = "A distributed memory object caching system"; diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index ac778cd6d50..c1d7d4fbd56 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 - 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/mpd/default.nix b/pkgs/servers/mpd/default.nix index d1d94b3a82c..2ea8ee144a4 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -166,7 +166,7 @@ let ++ lib.optional (builtins.elem "documentation" features_) "man"; # FIXME: workaround for Pipewire 0.3.64 deprecated API change, remove when fixed upstream - NIX_CFLAGS_COMPILE = [ "-DPW_ENABLE_DEPRECATED" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DPW_ENABLE_DEPRECATED" ]; CXXFLAGS = lib.optionals stdenv.isDarwin [ "-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0" diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix index 68d3ce9f101..3d15654300c 100644 --- a/pkgs/servers/nosql/arangodb/default.nix +++ b/pkgs/servers/nosql/arangodb/default.nix @@ -48,7 +48,7 @@ gcc10Stdenv.mkDerivation rec { # prevent failing with "cmake-3.13.4/nix-support/setup-hook: line 10: ./3rdParty/rocksdb/RocksDBConfig.cmake.in: No such file or directory" dontFixCmake = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; postPatch = '' sed -ie 's!/bin/echo!echo!' 3rdParty/V8/gypfiles/*.gypi diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index 10febf0fd5c..643d82a7fd2 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -131,7 +131,7 @@ in stdenv.mkDerivation rec { --replace 'engine("wiredTiger")' 'engine("mmapv1")' ''; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; sconsFlags = [ diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 0bba23e7e38..0f788dd9d38 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; - 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/openbgpd/default.nix b/pkgs/servers/openbgpd/default.nix index dc39a81dccf..f9ccdcf26d1 100644 --- a/pkgs/servers/openbgpd/default.nix +++ b/pkgs/servers/openbgpd/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: bgpd-rde_peer.o:/build/source/src/bgpd/bgpd.h:133: multiple definition of `bgpd_process'; # bgpd-bgpd.o:/build/source/src/bgpd/bgpd.h:133: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = diff --git a/pkgs/servers/osrm-backend/default.nix b/pkgs/servers/osrm-backend/default.nix index cddda5d399f..452163ee82c 100644 --- a/pkgs/servers/osrm-backend/default.nix +++ b/pkgs/servers/osrm-backend/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ bzip2 libxml2 libzip boost lua luabind tbb expat ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=stringop-overflow" "-Wno-error=uninitialized" diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index 0a3c0f00f91..47e4f04bac8 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ protobuf rustPlatform.bindgenHook pkg-config ]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-faligned-allocation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; meta = with lib; { description = "Vector Search Engine for the next generation of AI applications"; diff --git a/pkgs/servers/sip/freeswitch/default.nix b/pkgs/servers/sip/freeswitch/default.nix index b43d31a33f2..4be9a13404a 100644 --- a/pkgs/servers/sip/freeswitch/default.nix +++ b/pkgs/servers/sip/freeswitch/default.nix @@ -123,7 +123,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; # Using c++14 because of build error # gsm_at.h:94:32: error: ISO C++17 does not allow dynamic exception specifications diff --git a/pkgs/servers/sql/cockroachdb/default.nix b/pkgs/servers/sql/cockroachdb/default.nix index 2026ad05f3f..19a128dfc00 100644 --- a/pkgs/servers/sql/cockroachdb/default.nix +++ b/pkgs/servers/sql/cockroachdb/default.nix @@ -24,7 +24,7 @@ buildGoPackage rec { sha256 = "0mm3hfr778c7djza8gr1clwa8wca4d3ldh9hlg80avw4x664y5zi"; }; - 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/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index c5e08b8279a..38f3dfb96f2 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -62,7 +62,7 @@ let buildFlags = [ "world" ]; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; + env.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/servers/tvheadend/default.nix b/pkgs/servers/tvheadend/default.nix index 325632da48c..75466c0ee21 100644 --- a/pkgs/servers/tvheadend/default.nix +++ b/pkgs/servers/tvheadend/default.nix @@ -75,13 +75,13 @@ in stdenv.mkDerivation { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-error=format-truncation" "-Wno-error=stringop-truncation" ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ # Needed with GCC 12 but unrecognized with GCC 9 "-Wno-error=use-after-free" - ]; + ]); configureFlags = [ # disable dvbscan, as having it enabled causes a network download which diff --git a/pkgs/servers/ucarp/default.nix b/pkgs/servers/ucarp/default.nix index a3b02d493e2..b9a8bbea480 100644 --- a/pkgs/servers/ucarp/default.nix +++ b/pkgs/servers/ucarp/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: daemonize.o:/build/ucarp-1.5.2/src/ip_carp.h:73: multiple definition of # `__packed'; ucarp.o:/build/ucarp-1.5.2/src/ip_carp.h:73: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "Userspace implementation of CARP"; diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix index 0014ad32598..89b1dd7f550 100644 --- a/pkgs/servers/varnish/default.nix +++ b/pkgs/servers/varnish/default.nix @@ -32,7 +32,7 @@ let ''; # https://github.com/varnishcache/varnish-cache/issues/1875 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fexcess-precision=standard"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fexcess-precision=standard"; outputs = [ "out" "dev" "man" ]; diff --git a/pkgs/servers/varnish/digest.nix b/pkgs/servers/varnish/digest.nix index 31aaad835bd..c3bac64ef85 100644 --- a/pkgs/servers/varnish/digest.nix +++ b/pkgs/servers/varnish/digest.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ]; doCheck = true; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index d0a2ec88121..d82f987b2f4 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -458,7 +458,7 @@ self: super: xf86videowsfb = super.xf86videowsfb.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; }); xf86videoomap = super.xf86videoomap.overrideAttrs (attrs: { - NIX_CFLAGS_COMPILE = [ "-Wno-error=format-overflow" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format-overflow" ]; }); xf86videoamdgpu = super.xf86videoamdgpu.overrideAttrs (attrs: { @@ -592,7 +592,7 @@ self: super: xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: { buildInputs = attrs.buildInputs ++ [ mesa mesa.driversdev llvm ]; # for libxatracker - NIX_CFLAGS_COMPILE = [ "-Wno-error=address" ]; # gcc12 + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address" ]; # gcc12 meta = attrs.meta // { platforms = ["i686-linux" "x86_64-linux"]; }; @@ -893,7 +893,7 @@ self: super: "--disable-tls" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix index 932e81a5177..00b4a707ed0 100644 --- a/pkgs/shells/bash/5.nix +++ b/pkgs/shells/bash/5.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { separateDebugInfo = true; - NIX_CFLAGS_COMPILE = '' + env.NIX_CFLAGS_COMPILE = '' -DSYS_BASHRC="/etc/bashrc" -DSYS_BASH_LOGOUT="/etc/bash_logout" '' + lib.optionalString (!forFHSEnv) '' diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 42d19a0fad4..8ff64ff9a3a 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -142,7 +142,7 @@ rec { Example: stdenvNoOptimise = addAttrsToDerivation - { NIX_CFLAGS_COMPILE = "-O0"; } + { env.NIX_CFLAGS_COMPILE = "-O0"; } stdenv; */ addAttrsToDerivation = extraAttrs: stdenv: stdenv.override (old: { @@ -176,7 +176,7 @@ rec { stdenv.override (old: { mkDerivationFromStdenv = extendMkDerivationArgs old (args: { dontStrip = true; - NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og"; + env.NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og"; }); }); @@ -197,7 +197,7 @@ rec { impureUseNativeOptimizations = stdenv: stdenv.override (old: { mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -march=native"; + env.NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -march=native"; NIX_ENFORCE_NO_NATIVE = false; preferLocalBuild = true; @@ -222,7 +222,7 @@ rec { withCFlags = compilerFlags: stdenv: stdenv.override (old: { mkDerivationFromStdenv = extendMkDerivationArgs old (args: { - NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " ${toString compilerFlags}"; + env.NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " ${toString compilerFlags}"; }); }); } diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix index bad6eb7ba7a..c7bb07f625e 100644 --- a/pkgs/test/stdenv/default.nix +++ b/pkgs/test/stdenv/default.nix @@ -113,7 +113,7 @@ in # Assumption: the first output* variable to be configured is # _overrideFirst outputDev "dev" "out" - expectedMsg = "_assignFirst: could not find a non-empty variable to assign to outputDev. The following variables were all unset or empty: dev out."; + expectedMsg = "error: _assignFirst: could not find a non-empty variable to assign to outputDev.\n The following variables were all unset or empty:\n dev out"; } '' grep -F "$expectedMsg" $result/testBuildFailure.log >/dev/null touch $out diff --git a/pkgs/test/stdenv/hooks.nix b/pkgs/test/stdenv/hooks.nix index 3d72efae6c4..d7c409e6215 100644 --- a/pkgs/test/stdenv/hooks.nix +++ b/pkgs/test/stdenv/hooks.nix @@ -115,7 +115,7 @@ name = "test-reproducible-builds"; buildCommand = '' # can't be tested more precisely because the value of random-seed changes depending on the output - [[ $NIX_CFLAGS_COMPILE =~ "-frandom-seed=" ]] + [[ $env.NIX_CFLAGS_COMPILE =~ "-frandom-seed=" ]] touch $out ''; }; diff --git a/pkgs/tools/X11/nx-libs/default.nix b/pkgs/tools/X11/nx-libs/default.nix index 64fa84ba4a1..b5aff927163 100644 --- a/pkgs/tools/X11/nx-libs/default.nix +++ b/pkgs/tools/X11/nx-libs/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { xorg.xkbcomp xorg.xkeyboardconfig libtirpc ]; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-ltirpc" ]; postPatch = '' diff --git a/pkgs/tools/X11/xbindkeys-config/default.nix b/pkgs/tools/X11/xbindkeys-config/default.nix index 13234a81497..e9d6d42b068 100644 --- a/pkgs/tools/X11/xbindkeys-config/default.nix +++ b/pkgs/tools/X11/xbindkeys-config/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; nativeBuildInputs = [ pkg-config makeWrapper ]; buildInputs = [ gtk ]; diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 2f793e31808..72cb79388cf 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -156,7 +156,7 @@ in buildPythonApplication rec { ]); # error: 'import_cairo' defined but not used - NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; setupPyBuildFlags = [ "--with-Xdummy" diff --git a/pkgs/tools/admin/adtool/default.nix b/pkgs/tools/admin/adtool/default.nix index ac009e1b091..62d6fa3803e 100644 --- a/pkgs/tools/admin/adtool/default.nix +++ b/pkgs/tools/admin/adtool/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: ../../src/lib/libactive_directory.a(active_directory.o):/build/adtool-1.3.3/src/lib/active_directory.h:31: # multiple definition of `system_config_file'; adtool.o:/build/adtool-1.3.3/src/tools/../../src/lib/active_directory.h:31: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; enableParallelBuilding = true; diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix index 2c282514d33..d48171b1958 100644 --- a/pkgs/tools/admin/tigervnc/default.nix +++ b/pkgs/tools/admin/tigervnc/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "out"}/bin" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" ]; diff --git a/pkgs/tools/archivers/7zz/default.nix b/pkgs/tools/archivers/7zz/default.nix index 9685a3d7582..06fb4aae1a0 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 ''; - 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/archivers/bomutils/default.nix b/pkgs/tools/archivers/bomutils/default.nix index 90a97af0367..1b147d10ec2 100644 --- a/pkgs/tools/archivers/bomutils/default.nix +++ b/pkgs/tools/archivers/bomutils/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # fix # src/lsbom.cpp:70:10: error: reference to 'data' is ambiguous # which refers to std::data from C++17 - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; meta = with lib; { homepage = "https://github.com/hogliux/bomutils"; diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix index b38a9aa185a..43be673ca2c 100644 --- a/pkgs/tools/archivers/p7zip/default.nix +++ b/pkgs/tools/archivers/p7zip/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; passthru.updateScript = ./update.sh; diff --git a/pkgs/tools/audio/darkice/default.nix b/pkgs/tools/audio/darkice/default.nix index 73c71ee6f1a..2c9143d51f8 100644 --- a/pkgs/tools/audio/darkice/default.nix +++ b/pkgs/tools/audio/darkice/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { libopus libvorbis libogg libpulseaudio alsa-lib libsamplerate libjack2 lame ]; - NIX_CFLAGS_COMPILE = "-fpermissive"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; configureFlags = [ "--with-faac-prefix=${faac}" diff --git a/pkgs/tools/audio/gvolicon/default.nix b/pkgs/tools/audio/gvolicon/default.nix index fb9ef49c548..e15a048b991 100644 --- a/pkgs/tools/audio/gvolicon/default.nix +++ b/pkgs/tools/audio/gvolicon/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { makeFlags = [ "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE"; + env.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/audio/mpris-scrobbler/default.nix b/pkgs/tools/audio/mpris-scrobbler/default.nix index 0c051047c0f..ba80aa6ad0e 100644 --- a/pkgs/tools/audio/mpris-scrobbler/default.nix +++ b/pkgs/tools/audio/mpris-scrobbler/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { "-Dversion=${version}" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ # Needed with GCC 12 "-Wno-error=address" ] ++ lib.optionals stdenv.isDarwin [ @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { "-Wno-array-bounds" "-Wno-free-nonheap-object" "-Wno-stringop-truncation" - ]; + ]); passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/tools/audio/pa-applet/default.nix b/pkgs/tools/audio/pa-applet/default.nix index 3d881717e79..0a82f37e04d 100644 --- a/pkgs/tools/audio/pa-applet/default.nix +++ b/pkgs/tools/audio/pa-applet/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { ''; # work around a problem related to gtk3 updates - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; postInstall = ""; diff --git a/pkgs/tools/backup/btar/default.nix b/pkgs/tools/backup/btar/default.nix index 00fee941476..f1033d275aa 100644 --- a/pkgs/tools/backup/btar/default.nix +++ b/pkgs/tools/backup/btar/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: listindex.o:/build/btar-1.1.1/loadindex.h:12: multiple definition of # `ptr'; main.o:/build/btar-1.1.1/loadindex.h:12: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildInputs = [ librsync ]; diff --git a/pkgs/tools/backup/zbackup/default.nix b/pkgs/tools/backup/zbackup/default.nix index 9b618ccec50..24b4684745c 100644 --- a/pkgs/tools/backup/zbackup/default.nix +++ b/pkgs/tools/backup/zbackup/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { # zbackup uses dynamic exception specifications which are not # allowed in C++17 - NIX_CFLAGS_COMPILE = [ "--std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "--std=c++14" ]; buildInputs = [ zlib openssl protobuf lzo libunwind ]; nativeBuildInputs = [ cmake protobufc ]; diff --git a/pkgs/tools/cd-dvd/cdrdao/default.nix b/pkgs/tools/cd-dvd/cdrdao/default.nix index 0fa67bbd932..d3aa726afbb 100644 --- a/pkgs/tools/cd-dvd/cdrdao/default.nix +++ b/pkgs/tools/cd-dvd/cdrdao/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; # Needed on gcc >= 6. - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; meta = with lib; { description = "A tool for recording audio or data CD-Rs in disk-at-once (DAO) mode"; diff --git a/pkgs/tools/cd-dvd/cdrkit/default.nix b/pkgs/tools/cd-dvd/cdrkit/default.nix index 6f9c7a656d1..efa66380994 100644 --- a/pkgs/tools/cd-dvd/cdrkit/default.nix +++ b/pkgs/tools/cd-dvd/cdrkit/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ libcap zlib bzip2 perl ]; hardeningDisable = [ "format" ]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.hostPlatform.isMusl "-D__THROW="; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-D__THROW="; # efi-boot-patch extracted from http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=174244 patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ./cdrkit-1.1.11-fno-common.patch ]; diff --git a/pkgs/tools/cd-dvd/vobsub2srt/default.nix b/pkgs/tools/cd-dvd/vobsub2srt/default.nix index 612f4ebf04d..159be4e14b6 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="; }; - 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/compression/pbzip2/default.nix b/pkgs/tools/compression/pbzip2/default.nix index 6d27b84e8c4..81144fb14b1 100644 --- a/pkgs/tools/compression/pbzip2/default.nix +++ b/pkgs/tools/compression/pbzip2/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal"; meta = with lib; { homepage = "http://compression.ca/pbzip2/"; diff --git a/pkgs/tools/filesystems/9pfs/default.nix b/pkgs/tools/filesystems/9pfs/default.nix index d9c609d7c0a..5ca592aa456 100644 --- a/pkgs/tools/filesystems/9pfs/default.nix +++ b/pkgs/tools/filesystems/9pfs/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { # gcc-10. Otherwise build fails as: # ld: lib/auth_rpc.o:/build/source/lib/../9pfs.h:35: multiple definition of # `logfile'; 9pfs.o:/build/source/9pfs.h:35: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; enableParallelBuilding = true; diff --git a/pkgs/tools/filesystems/afpfs-ng/default.nix b/pkgs/tools/filesystems/afpfs-ng/default.nix index b56bfba62cd..02dd1a7aafe 100644 --- a/pkgs/tools/filesystems/afpfs-ng/default.nix +++ b/pkgs/tools/filesystems/afpfs-ng/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { # avoid build failures like: # ld: afpcmd-cmdline_main.o:/build/source/cmdline/cmdline_afp.h:4: multiple definition of # `full_url'; afpcmd-cmdline_afp.o:/build/source/cmdline/cmdline_afp.c:27: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildInputs = [ fuse readline libgcrypt gmp ]; diff --git a/pkgs/tools/filesystems/blobfuse/default.nix b/pkgs/tools/filesystems/blobfuse/default.nix index b9bed9cc20c..a74d182fb35 100644 --- a/pkgs/tools/filesystems/blobfuse/default.nix +++ b/pkgs/tools/filesystems/blobfuse/default.nix @@ -24,7 +24,7 @@ in stdenv.mkDerivation rec { pname = "blobfuse"; inherit version src; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=deprecated-declarations" "-Wno-error=catch-value" diff --git a/pkgs/tools/filesystems/djmount/default.nix b/pkgs/tools/filesystems/djmount/default.nix index bf1f7ba55d2..d3a75e420db 100644 --- a/pkgs/tools/filesystems/djmount/default.nix +++ b/pkgs/tools/filesystems/djmount/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: libupnp/upnp/.libs/libupnp.a(libupnp_la-gena_ctrlpt.o):libupnp/upnp/src/inc/upnpapi.h:163: # multiple definition of `pVirtualDirList'; libupnp/upnp/.libs/libupnp.a(libupnp_la-upnpapi.o):libupnp/upnp/src/inc/upnpapi.h:163: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = { homepage = "https://djmount.sourceforge.net/"; diff --git a/pkgs/tools/filesystems/idsk/default.nix b/pkgs/tools/filesystems/idsk/default.nix index 34a32c4a6df..5e78a126687 100644 --- a/pkgs/tools/filesystems/idsk/default.nix +++ b/pkgs/tools/filesystems/idsk/default.nix @@ -14,10 +14,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - 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/filesystems/irods/default.nix b/pkgs/tools/filesystems/irods/default.nix index afe1f2ffcd9..c11e416f71a 100644 --- a/pkgs/tools/filesystems/irods/default.nix +++ b/pkgs/tools/filesystems/irods/default.nix @@ -36,7 +36,7 @@ rec { patches = [ ./irods_root_path.patch ]; # fix build with recent llvm versions - NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations"; postPatch = common.postPatch + '' patchShebangs ./test diff --git a/pkgs/tools/filesystems/jfsutils/default.nix b/pkgs/tools/filesystems/jfsutils/default.nix index 104c9807c48..0ddd6cfd4da 100644 --- a/pkgs/tools/filesystems/jfsutils/default.nix +++ b/pkgs/tools/filesystems/jfsutils/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: extract.o:/build/jfsutils-1.1.15/fscklog/extract.c:67: multiple definition of # `xchklog_buffer'; display.o:/build/jfsutils-1.1.15/fscklog/display.c:57: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; # this required for wipefreespace postInstall = '' diff --git a/pkgs/tools/filesystems/reiserfsprogs/default.nix b/pkgs/tools/filesystems/reiserfsprogs/default.nix index c6583410ff3..8c3986d817d 100644 --- a/pkgs/tools/filesystems/reiserfsprogs/default.nix +++ b/pkgs/tools/filesystems/reiserfsprogs/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libuuid ]; - NIX_CFLAGS_COMPILE = [ "-std=gnu90" "-D_GNU_SOURCE" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=gnu90" "-D_GNU_SOURCE" ]; meta = { inherit version; diff --git a/pkgs/tools/filesystems/sasquatch/default.nix b/pkgs/tools/filesystems/sasquatch/default.nix index ba5fd9ccfc1..258814b8905 100644 --- a/pkgs/tools/filesystems/sasquatch/default.nix +++ b/pkgs/tools/filesystems/sasquatch/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: unsquashfs_xattr.o:/build/squashfs4.4/squashfs-tools/error.h:34: multiple definition of # `verbose'; unsquashfs.o:/build/squashfs4.4/squashfs-tools/error.h:34: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installFlags = [ "INSTALL_DIR=\${out}/bin" ]; diff --git a/pkgs/tools/filesystems/sshfs-fuse/common.nix b/pkgs/tools/filesystems/sshfs-fuse/common.nix index 262c081e350..932c7693dc8 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/common.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/common.nix @@ -26,7 +26,7 @@ in stdenv.mkDerivation rec { buildInputs = [ fuse glib ]; nativeCheckInputs = [ which python3Packages.pytest ]; - NIX_CFLAGS_COMPILE = lib.optionalString + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; diff --git a/pkgs/tools/filesystems/svnfs/default.nix b/pkgs/tools/filesystems/svnfs/default.nix index cd6cbe5e799..e892d89dc3b 100644 --- a/pkgs/tools/filesystems/svnfs/default.nix +++ b/pkgs/tools/filesystems/svnfs/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: svnclient.o:/build/svnfs-0.4/src/svnfs.h:40: multiple definition of # `dirbuf'; svnfs.o:/build/svnfs-0.4/src/svnfs.h:40: first defined here - NIX_CFLAGS_COMPILE="-I ${subversion.dev}/include/subversion-1 -fcommon"; + env.NIX_CFLAGS_COMPILE = "-I ${subversion.dev}/include/subversion-1 -fcommon"; NIX_LDFLAGS="-lsvn_client-1 -lsvn_subr-1"; meta = { diff --git a/pkgs/tools/filesystems/udftools/default.nix b/pkgs/tools/filesystems/udftools/default.nix index ec3fd6efefa..f50f98d33dc 100644 --- a/pkgs/tools/filesystems/udftools/default.nix +++ b/pkgs/tools/filesystems/udftools/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "fortify" ]; - NIX_CFLAGS_COMPILE = "-std=gnu90"; + env.NIX_CFLAGS_COMPILE = "-std=gnu90"; preConfigure = '' sed -e '1i#include ' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c diff --git a/pkgs/tools/filesystems/zkfuse/default.nix b/pkgs/tools/filesystems/zkfuse/default.nix index 98c9ae525f4..c58dbff9ac7 100644 --- a/pkgs/tools/filesystems/zkfuse/default.nix +++ b/pkgs/tools/filesystems/zkfuse/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # c++17 (gcc-11's default) breaks the build as: # zkadapter.h:616:33: error: ISO C++17 does not allow dynamic exception specifications - NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 8e287f00734..bfeb5ff195e 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"; + env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; postInstall = '' mv $out/share/info/asymptote/*.info $out/share/info/ diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index ac777051d10..1a1b52502f7 100644 --- a/pkgs/tools/graphics/cuneiform/default.nix +++ b/pkgs/tools/graphics/cuneiform/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { # gcc-10. Otherwise build fails as: # ld: CMakeFiles/rbal.dir/src/statsearchbl.cpp.o:(.bss+0x0): # multiple definition of `minrow'; CMakeFiles/rbal.dir/src/linban.c.o:(.bss+0xa3a): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; postPatch = '' rm cuneiform_src/Kern/hhh/tigerh/h/strings.h diff --git a/pkgs/tools/graphics/fim/default.nix b/pkgs/tools/graphics/fim/default.nix index 252510f8059..6722e1d7819 100644 --- a/pkgs/tools/graphics/fim/default.nix +++ b/pkgs/tools/graphics/fim/default.nix @@ -35,7 +35,7 @@ gcc9Stdenv.mkDerivation rec { ++ optional jpegSupport libjpeg ++ optional pngSupport libpng; - NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL"; + env.NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL"; meta = with lib; { description = "A lightweight, highly customizable and scriptable image viewer"; diff --git a/pkgs/tools/graphics/hobbits/default.nix b/pkgs/tools/graphics/hobbits/default.nix index 2406df81526..d6c63aee956 100644 --- a/pkgs/tools/graphics/hobbits/default.nix +++ b/pkgs/tools/graphics/hobbits/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DUSE_SYSTEM_PFFFT=ON" ]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"; meta = with lib; { description = "A multi-platform GUI for bit-based analysis, processing, and visualization"; diff --git a/pkgs/tools/graphics/icoutils/default.nix b/pkgs/tools/graphics/icoutils/default.nix index 07f605a4cbf..b450537b5a4 100644 --- a/pkgs/tools/graphics/icoutils/default.nix +++ b/pkgs/tools/graphics/icoutils/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin # upgrades to a newer SDK. - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0"; patchPhase = '' patchShebangs extresso/extresso diff --git a/pkgs/tools/graphics/ifm/default.nix b/pkgs/tools/graphics/ifm/default.nix index 7b9d49b1273..854a35262b0 100644 --- a/pkgs/tools/graphics/ifm/default.nix +++ b/pkgs/tools/graphics/ifm/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: libvars.a(vars-freeze-lex.o):src/libvars/vars-freeze-lex.l:23: # multiple definition of `line_number'; ifm-main.o:src/ifm-main.c:46: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; enableParallelBuilding = false; # ifm-scan.l:16:10: fatal error: ifm-parse.h: No such file or directory diff --git a/pkgs/tools/graphics/qrcode/default.nix b/pkgs/tools/graphics/qrcode/default.nix index 2067d1a97e2..c759b23b79a 100644 --- a/pkgs/tools/graphics/qrcode/default.nix +++ b/pkgs/tools/graphics/qrcode/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "0v81745nx5gny2g05946k8j553j18a29ikmlyh6c3syq6c15k8cf"; }; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-result"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result"; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; diff --git a/pkgs/tools/graphics/quirc/default.nix b/pkgs/tools/graphics/quirc/default.nix index 0cf407faa0d..88993dbe8ce 100644 --- a/pkgs/tools/graphics/quirc/default.nix +++ b/pkgs/tools/graphics/quirc/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { buildInputs = [ SDL SDL_gfx libjpeg libpng opencv ]; makeFlags = [ "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL -I${SDL_gfx}/include/SDL"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL -I${SDL_gfx}/include/SDL"; # Disable building of linux-only demos on darwin systems patches = lib.optionals stdenv.isDarwin [ ./0001-dont-build-demos.patch ]; diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index 9bf4a281e06..3542c06ac09 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { ]; # Disable assertions which include -dev QtBase file paths. - NIX_CFLAGS_COMPILE = "-DQT_NO_DEBUG"; + env.NIX_CFLAGS_COMPILE = "-DQT_NO_DEBUG"; configureFlags = [ "--without-python" diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix index 5422efb9d38..5a5fb2da228 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ fcitx gettext ]; - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; preInstall = '' substituteInPlace src/cmake_install.cmake \ diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index a89621e8fe5..8ecbe342034 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -149,10 +149,10 @@ stdenv.mkDerivation rec { NIX_LDFLAGS = optionalString selinuxSupport "-lsepol"; FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1"; - NIX_CFLAGS_COMPILE = [] + env.NIX_CFLAGS_COMPILE = toString ([] # Work around a bogus warning in conjunction with musl. ++ optional stdenv.hostPlatform.isMusl "-Wno-error" - ++ optional stdenv.hostPlatform.isAndroid "-D__USE_FORTIFY_LEVEL=0"; + ++ optional stdenv.hostPlatform.isAndroid "-D__USE_FORTIFY_LEVEL=0"); # Works around a bug with 8.26: # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop. diff --git a/pkgs/tools/misc/edk2-uefi-shell/default.nix b/pkgs/tools/misc/edk2-uefi-shell/default.nix index d399c7dabc1..7547f9b3e47 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; - 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 cefc80d3fe0..2f430dea25c 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) - 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/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index aa3d16a5fa5..6aee2be9118 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ''; # do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse"; nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 16db1cb2ef1..b6125b9faf7 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -339,7 +339,7 @@ stdenv.mkDerivation rec { separateDebugInfo = !xenSupport; # Work around a bug in the generated flex lexer (upstream flex bug?) - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; preConfigure = '' for i in "tests/util/"*.in diff --git a/pkgs/tools/misc/grub/trusted.nix b/pkgs/tools/misc/grub/trusted.nix index e4efceea888..559eec9bbdd 100644 --- a/pkgs/tools/misc/grub/trusted.nix +++ b/pkgs/tools/misc/grub/trusted.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "stackprotector" "pic" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; # generated code redefines yyfree + env.NIX_CFLAGS_COMPILE = "-Wno-error"; # generated code redefines yyfree preConfigure = '' for i in "tests/util/"*.in diff --git a/pkgs/tools/misc/gtklp/default.nix b/pkgs/tools/misc/gtklp/default.nix index 8eafd98e267..af98ed1ae1b 100644 --- a/pkgs/tools/misc/gtklp/default.nix +++ b/pkgs/tools/misc/gtklp/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: libgtklp.a(libgtklp.o):libgtklp/libgtklp.h:83: multiple definition of `progressBar'; # file.o:libgtklp/libgtklp.h:83: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' substituteInPlace include/defaults.h --replace "netscape" "firefox" diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix index c3a0c5aa906..d82c24dba91 100644 --- a/pkgs/tools/misc/ipxe/default.nix +++ b/pkgs/tools/misc/ipxe/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { # not possible due to assembler code hardeningDisable = [ "pic" "stackprotector" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; makeFlags = [ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here. diff --git a/pkgs/tools/misc/ldmtool/default.nix b/pkgs/tools/misc/ldmtool/default.nix index 9635f8e1a8c..45cd9638238 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"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; configureScript = "sh autogen.sh"; diff --git a/pkgs/tools/misc/lilo/default.nix b/pkgs/tools/misc/lilo/default.nix index f72cdc422be..17b485ca8da 100644 --- a/pkgs/tools/misc/lilo/default.nix +++ b/pkgs/tools/misc/lilo/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: identify.o:(.bss+0x0): multiple definition of `identify'; # common.o:(.bss+0x160): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "DESTDIR=${placeholder "out"}" diff --git a/pkgs/tools/misc/lockfile-progs/default.nix b/pkgs/tools/misc/lockfile-progs/default.nix index 8fdee47befb..624a89ef979 100644 --- a/pkgs/tools/misc/lockfile-progs/default.nix +++ b/pkgs/tools/misc/lockfile-progs/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ liblockfile ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=format-overflow" ]; diff --git a/pkgs/tools/misc/pipelight/default.nix b/pkgs/tools/misc/pipelight/default.nix index 9cabb74b231..cdf77b0af42 100644 --- a/pkgs/tools/misc/pipelight/default.nix +++ b/pkgs/tools/misc/pipelight/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { buildInputs = [ wine_custom libX11 libGLU libGL curl ]; - NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ]; patches = [ ./pipelight.patch diff --git a/pkgs/tools/misc/rockbox-utility/default.nix b/pkgs/tools/misc/rockbox-utility/default.nix index 2ca7478b742..b5762fd651a 100644 --- a/pkgs/tools/misc/rockbox-utility/default.nix +++ b/pkgs/tools/misc/rockbox-utility/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { # ld: libmkimxboot.a(elf.c.o):utils/imxtools/sbtools/misc.h:43: multiple definition of `g_nr_keys'; # libmkimxboot.a(mkimxboot.c.o):utils/imxtools/sbtools/misc.h:43: first defined here # TODO: try to remove with 1.5.1 update. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' runHook preInstall diff --git a/pkgs/tools/misc/sfeed/default.nix b/pkgs/tools/misc/sfeed/default.nix index 57bcd98b89d..36ef0fdc96a 100644 --- a/pkgs/tools/misc/sfeed/default.nix +++ b/pkgs/tools/misc/sfeed/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=$(out)" ]; # otherwise does not find SIGWINCH - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE"; meta = with lib; { homepage = "https://codemadness.org/sfeed-simple-feed-parser.html"; diff --git a/pkgs/tools/misc/shallot/default.nix b/pkgs/tools/misc/shallot/default.nix index 93f67bd2def..46c5714ce96 100644 --- a/pkgs/tools/misc/shallot/default.nix +++ b/pkgs/tools/misc/shallot/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: src/shallot.o:(.bss+0x8): multiple definition of `lucky_thread'; src/error.o:(.bss+0x8): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/shim/default.nix b/pkgs/tools/misc/shim/default.nix index a988d496276..ea13cc1bd66 100644 --- a/pkgs/tools/misc/shim/default.nix +++ b/pkgs/tools/misc/shim/default.nix @@ -24,7 +24,7 @@ in stdenv.mkDerivation rec { buildInputs = [ elfutils ]; - NIX_CFLAGS_COMPILE = [ "-I${toString elfutils.dev}/include" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${toString elfutils.dev}/include" ]; makeFlags = lib.optional (vendorCertFile != null) "VENDOR_CERT_FILE=${vendorCertFile}" diff --git a/pkgs/tools/misc/snapper/default.nix b/pkgs/tools/misc/snapper/default.nix index c757882c12a..b96aa7c3999 100644 --- a/pkgs/tools/misc/snapper/default.nix +++ b/pkgs/tools/misc/snapper/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; postInstall = '' rm -r $out/etc/cron.* diff --git a/pkgs/tools/misc/topgrade/default.nix b/pkgs/tools/misc/topgrade/default.nix index f3094302cd6..8679a655df9 100644 --- a/pkgs/tools/misc/topgrade/default.nix +++ b/pkgs/tools/misc/topgrade/default.nix @@ -31,10 +31,10 @@ rustPlatform.buildRustPackage rec { Foundation ]; - 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/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 16f4d1eb551..4511d3be744 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ which ]; # used for tests with checkFlags = [ "DEBUG=true" ]; checkTarget = "tests"; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; meta = with lib; { description = "Lightweight implementation of some Unix command line utilities"; diff --git a/pkgs/tools/misc/wimboot/default.nix b/pkgs/tools/misc/wimboot/default.nix index 267272b0b66..5499cac9a8a 100644 --- a/pkgs/tools/misc/wimboot/default.nix +++ b/pkgs/tools/misc/wimboot/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ libbfd zlib libiberty ]; makeFlags = [ "wimboot.x86_64.efi" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=array-bounds" ]; diff --git a/pkgs/tools/misc/wv2/default.nix b/pkgs/tools/misc/wv2/default.nix index 365a2ddabaf..d5700144940 100644 --- a/pkgs/tools/misc/wv2/default.nix +++ b/pkgs/tools/misc/wv2/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libgsf glib libxml2 ]; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; + env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; meta = { description = "Excellent MS Word filter lib, used in most Office suites"; diff --git a/pkgs/tools/networking/altermime/default.nix b/pkgs/tools/networking/altermime/default.nix index 703af40864a..290b3788997 100644 --- a/pkgs/tools/networking/altermime/default.nix +++ b/pkgs/tools/networking/altermime/default.nix @@ -9,7 +9,7 @@ gccStdenv.mkDerivation rec { sha256 = "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"; }; - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format" "-Wno-error=format-truncation" "-Wno-error=pointer-compare" diff --git a/pkgs/tools/networking/argus-clients/default.nix b/pkgs/tools/networking/argus-clients/default.nix index 30367eb14e4..8198b21e909 100644 --- a/pkgs/tools/networking/argus-clients/default.nix +++ b/pkgs/tools/networking/argus-clients/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-uNTvi6zbrYHAivQMPkhlNCoqRW9GOkgKvCf3mInds80="; }; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; postPatch = '' for file in ./examples/*/*.pl; do diff --git a/pkgs/tools/networking/atftp/default.nix b/pkgs/tools/networking/atftp/default.nix index 06b04170a3f..a8db0e93d5d 100644 --- a/pkgs/tools/networking/atftp/default.nix +++ b/pkgs/tools/networking/atftp/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { ]; # Expects pre-GCC5 inline semantics - NIX_CFLAGS_COMPILE = "-std=gnu89"; + env.NIX_CFLAGS_COMPILE = "-std=gnu89"; doCheck = true; diff --git a/pkgs/tools/networking/atinout/default.nix b/pkgs/tools/networking/atinout/default.nix index 561211fe33d..7ff1b06c3b8 100644 --- a/pkgs/tools/networking/atinout/default.nix +++ b/pkgs/tools/networking/atinout/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "atinout"; version = "0.9.2-alpha"; - NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.cc.isClang) "-Werror=implicit-fallthrough=0"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.cc.isClang) "-Werror=implicit-fallthrough=0"; LANG = if stdenv.isDarwin then "en_US.UTF-8" else "C.UTF-8"; nativeBuildInputs = [ ronn mount ]; diff --git a/pkgs/tools/networking/bsd-finger/default.nix b/pkgs/tools/networking/bsd-finger/default.nix index 12e429b7bcb..48e64b202c6 100644 --- a/pkgs/tools/networking/bsd-finger/default.nix +++ b/pkgs/tools/networking/bsd-finger/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # outputs = [ "out" "man" ]; - NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; + env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; patches = [ ./ubuntu-0.17-9.patch diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index d46d8bd2c57..45e6a33e3c8 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -35,14 +35,14 @@ rustPlatform.buildRustPackage rec { libuv ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString ([ "-O2" "-Wno-error=array-bounds" "-Wno-error=stringop-overflow" "-Wno-error=stringop-truncation" ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ "-Wno-error=stringop-overread" - ]; + ]); passthru.tests.basic = nixosTests.cjdns; diff --git a/pkgs/tools/networking/connman/connman-ncurses/default.nix b/pkgs/tools/networking/connman/connman-ncurses/default.nix index 976708c038c..9d638c48000 100644 --- a/pkgs/tools/networking/connman/connman-ncurses/default.nix +++ b/pkgs/tools/networking/connman/connman-ncurses/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { buildInputs = [ dbus ncurses json_c connman ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; installPhase = '' mkdir -p "$out/bin" diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index 7446403f6b2..757a7208c4d 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ++ lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "BUILD_CC=$(CC_FOR_BUILD)"; - NIX_CFLAGS_COMPILE = builtins.toString [ + env.NIX_CFLAGS_COMPILE = builtins.toString [ "-Wno-error=pointer-compare" "-Wno-error=format-truncation" "-Wno-error=stringop-truncation" diff --git a/pkgs/tools/networking/dibbler/default.nix b/pkgs/tools/networking/dibbler/default.nix index b6e5229a2f2..92254231bf7 100644 --- a/pkgs/tools/networking/dibbler/default.nix +++ b/pkgs/tools/networking/dibbler/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: ./Port-linux/libLowLevel.a(libLowLevel_a-interface.o):(.bss+0x4): multiple definition of `interface_auto_up'; # ./Port-linux/libLowLevel.a(libLowLevel_a-lowlevel-linux-link-state.o):(.bss+0x74): first defined here - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__APPLE_USE_RFC_2292=1" + " -fcommon"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__APPLE_USE_RFC_2292=1" + " -fcommon"; meta = with lib; { description = "Portable DHCPv6 implementation"; diff --git a/pkgs/tools/networking/dirb/default.nix b/pkgs/tools/networking/dirb/default.nix index 957cbed6310..1ff6c33bcc2 100644 --- a/pkgs/tools/networking/dirb/default.nix +++ b/pkgs/tools/networking/dirb/default.nix @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: resume.o:/build/dirb222/src/variables.h:15: multiple definition of `curl'; # crea_wordlist.o:/build/dirb222/src/variables.h:15: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; postInstall = '' mkdir -p $out/share/dirb/ diff --git a/pkgs/tools/networking/dsniff/default.nix b/pkgs/tools/networking/dsniff/default.nix index 5d0c92f2bfb..592ec230865 100644 --- a/pkgs/tools/networking/dsniff/default.nix +++ b/pkgs/tools/networking/dsniff/default.nix @@ -61,7 +61,7 @@ in gcc9Stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook rpcsvc-proto ]; buildInputs = [ glib pcap libtirpc libnsl ]; NIX_CFLAGS_LINK = "-lglib-2.0 -lpthread -ltirpc"; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; postPatch = '' for patch in debian/patches/*.patch; do patch < $patch diff --git a/pkgs/tools/networking/iftop/default.nix b/pkgs/tools/networking/iftop/default.nix index 137ce03b252..100164ff3db 100644 --- a/pkgs/tools/networking/iftop/default.nix +++ b/pkgs/tools/networking/iftop/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: tui.o:/build/iftop-1.0pre4/ui_common.h:41: multiple definition of `service_hash'; # iftop.o:/build/iftop-1.0pre4/ui_common.h:41: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; passthru.tests = { inherit (nixosTests) iftop; }; diff --git a/pkgs/tools/networking/iodine/default.nix b/pkgs/tools/networking/iodine/default.nix index 226cfb9ce8e..a684f3a580f 100644 --- a/pkgs/tools/networking/iodine/default.nix +++ b/pkgs/tools/networking/iodine/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patchPhase = ''sed -i "s,/sbin/route,${nettools}/bin/route," src/tun.c''; - NIX_CFLAGS_COMPILE = "-DIFCONFIGPATH=\"${nettools}/bin/\""; + env.NIX_CFLAGS_COMPILE = "-DIFCONFIGPATH=\"${nettools}/bin/\""; installFlags = [ "prefix=\${out}" ]; diff --git a/pkgs/tools/networking/iouyap/default.nix b/pkgs/tools/networking/iouyap/default.nix index 0b3c8007af6..d2754469fad 100644 --- a/pkgs/tools/networking/iouyap/default.nix +++ b/pkgs/tools/networking/iouyap/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: netmap.o:(.bss+0x20): multiple definition of `sizecheck'; iouyap.o:(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' install -D -m555 iouyap $out/bin/iouyap; diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix index 025169a9fd3..9026a60e2f3 100644 --- a/pkgs/tools/networking/jwhois/default.nix +++ b/pkgs/tools/networking/jwhois/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { # Work around error from on aarch64-darwin: # error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] # TODO: this should probably be fixed at a lower level than this? - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-undef-prefix"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-undef-prefix"; meta = { description = "A client for the WHOIS protocol allowing you to query the owner of a domain name"; diff --git a/pkgs/tools/networking/libnids/default.nix b/pkgs/tools/networking/libnids/default.nix index f02e3bef9e1..e6df2850a1c 100644 --- a/pkgs/tools/networking/libnids/default.nix +++ b/pkgs/tools/networking/libnids/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { this is necessary for dsniff to compile; otherwise g_thread_init is a missing symbol when linking (?!?) */ - NIX_CFLAGS_COMPILE="-Dg_thread_init= "; + env.NIX_CFLAGS_COMPILE = "-Dg_thread_init= "; meta = with lib; { description = "An E-component of Network Intrusion Detection System which emulates the IP stack of Linux 2.0.x"; diff --git a/pkgs/tools/networking/lsh/default.nix b/pkgs/tools/networking/lsh/default.nix index 7c5e09b950a..f5fc34487aa 100644 --- a/pkgs/tools/networking/lsh/default.nix +++ b/pkgs/tools/networking/lsh/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { # ld: liblsh.a(unix_user.o):/build/lsh-2.0.4/src/server_userauth.h:108: multiple definition of # `server_userauth_none_preauth'; lshd.o:/build/lsh-2.0.4/src/server_userauth.h:108: first defined here # Should be present in upcoming 2.1 release. - NIX_CFLAGS_COMPILE = "-std=gnu90 -fcommon"; + env.NIX_CFLAGS_COMPILE = "-std=gnu90 -fcommon"; buildInputs = [ gperf guile gmp zlib liboop readline gnum4 pam libxcrypt ]; diff --git a/pkgs/tools/networking/ncftp/default.nix b/pkgs/tools/networking/ncftp/default.nix index 8156caad7c3..02dd29c0fda 100644 --- a/pkgs/tools/networking/ncftp/default.nix +++ b/pkgs/tools/networking/ncftp/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: bookmark.o: (.bss+0x20): multiple definition of `gBm'; # gpshare.o:(.bss+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' find -name Makefile.in | xargs sed -i '/^TMPDIR=/d' diff --git a/pkgs/tools/networking/networkmanager/iodine/default.nix b/pkgs/tools/networking/networkmanager/iodine/default.nix index 8d09977b4e5..aff411ea0ed 100644 --- a/pkgs/tools/networking/networkmanager/iodine/default.nix +++ b/pkgs/tools/networking/networkmanager/iodine/default.nix @@ -33,7 +33,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ intltool autoreconfHook pkg-config ]; # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; preConfigure = "intltoolize"; configureFlags = [ diff --git a/pkgs/tools/networking/nfstrace/default.nix b/pkgs/tools/networking/nfstrace/default.nix index 7e2b938e4c8..297ada3cc2a 100644 --- a/pkgs/tools/networking/nfstrace/default.nix +++ b/pkgs/tools/networking/nfstrace/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { # To build with GCC 8+ it needs: CXXFLAGS = "-Wno-class-memaccess -Wno-ignored-qualifiers"; # CMake can't find json_c without: - NIX_CFLAGS_COMPILE = [ "-I${json_c.dev}/include/json-c" "-Wno-error=address-of-packed-member" "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${json_c.dev}/include/json-c" "-Wno-error=address-of-packed-member" "-I${libtirpc.dev}/include/tirpc" ]; NIX_LDFLAGS = [ "-ltirpc" ]; doCheck = false; # requires network access diff --git a/pkgs/tools/networking/oonf-olsrd2/default.nix b/pkgs/tools/networking/oonf-olsrd2/default.nix index e86bfbd1961..bc7cbe8d491 100644 --- a/pkgs/tools/networking/oonf-olsrd2/default.nix +++ b/pkgs/tools/networking/oonf-olsrd2/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # ld: CMakeFiles/oonf_dlep_proxy.dir/router/dlep_router_session.c.o:(.bss+0x0): # multiple definition of `LOG_DLEP_ROUTER'; CMakeFiles/oonf_dlep_proxy.dir/router/dlep_router.c.o:(.bss+0x0): first defined here # Can be removed once release with https://github.com/OLSR/OONF/pull/40 is out. - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; cmakeFlags = [ "-DOONF_NO_WERROR=yes" diff --git a/pkgs/tools/networking/packetdrill/default.nix b/pkgs/tools/networking/packetdrill/default.nix index b06e4558fbb..139078f2f6f 100644 --- a/pkgs/tools/networking/packetdrill/default.nix +++ b/pkgs/tools/networking/packetdrill/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { export sourceRoot=$(realpath */gtests/net/packetdrill) ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=unused-result" "-Wno-error=stringop-truncation" "-Wno-error=address-of-packed-member" diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index 09e7578a718..eee0dfd0306 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { # still builds. # # [1]: https://github.com/ppp-project/ppp/commit/c2881a6b71a36d28a89166e82820dc5e711fd775 - NIX_CFLAGS_COMPILE = + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-UIPX_CHANGE"; installPhase = '' diff --git a/pkgs/tools/networking/reaver-wps/default.nix b/pkgs/tools/networking/reaver-wps/default.nix index 9fe7d88f12c..050cadf3ed6 100644 --- a/pkgs/tools/networking/reaver-wps/default.nix +++ b/pkgs/tools/networking/reaver-wps/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: crypto/dh_groups.o:src/crypto/../globule.h:141: multiple definition of # `globule'; /build/ccrzO6vA.o:src/globule.h:141: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; setSourceRoot = '' sourceRoot=$(echo */src) diff --git a/pkgs/tools/networking/redfang/default.nix b/pkgs/tools/networking/redfang/default.nix index 9e18d687dc0..8e799b7d41f 100644 --- a/pkgs/tools/networking/redfang/default.nix +++ b/pkgs/tools/networking/redfang/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out)" ]; - NIX_CFLAGS_COMPILE = "-Wno-format-security"; + env.NIX_CFLAGS_COMPILE = "-Wno-format-security"; buildInputs = [ bluez ]; diff --git a/pkgs/tools/networking/ripmime/default.nix b/pkgs/tools/networking/ripmime/default.nix index 0dfeb900c9a..6584edca5e6 100644 --- a/pkgs/tools/networking/ripmime/default.nix +++ b/pkgs/tools/networking/ripmime/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { mkdir -p "$out/bin" "$out/share/man/man1" ''; - NIX_CFLAGS_COMPILE=" -Wno-error "; + env.NIX_CFLAGS_COMPILE = " -Wno-error "; meta = with lib; { description = "Attachment extractor for MIME messages"; diff --git a/pkgs/tools/networking/sipsak/default.nix b/pkgs/tools/networking/sipsak/default.nix index 89a7d706ccd..c2aeaaa18e0 100644 --- a/pkgs/tools/networking/sipsak/default.nix +++ b/pkgs/tools/networking/sipsak/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: transport.o:/build/source/sipsak.h:323: multiple definition of # `address'; auth.o:/build/source/sipsak.h:323: first defined here - NIX_CFLAGS_COMPILE = "-std=gnu89 -fcommon"; + env.NIX_CFLAGS_COMPILE = "-std=gnu89 -fcommon"; src = fetchFromGitHub { owner = "sipwise"; diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index 4a65620e48b..9602e197cbf 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; - 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/tftp-hpa/default.nix b/pkgs/tools/networking/tftp-hpa/default.nix index 987315b8351..15fd0473532 100644 --- a/pkgs/tools/networking/tftp-hpa/default.nix +++ b/pkgs/tools/networking/tftp-hpa/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: main.o:/build/tftp-hpa-5.2/tftp/main.c:98: multiple definition of # `toplevel'; tftp.o:/build/tftp-hpa-5.2/tftp/tftp.c:51: first defined here - NIX_CFLAGS_COMPILE="-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; meta = with lib; { description = "TFTP tools - a lot of fixes on top of BSD TFTP"; diff --git a/pkgs/tools/networking/tgt/default.nix b/pkgs/tools/networking/tgt/default.nix index bf2587d8c65..6ce4d96d765 100644 --- a/pkgs/tools/networking/tgt/default.nix +++ b/pkgs/tools/networking/tgt/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { "SD_NOTIFY=1" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" ]; diff --git a/pkgs/tools/networking/trickle/default.nix b/pkgs/tools/networking/trickle/default.nix index f07bf5bdca3..5d1ca8e4ee7 100644 --- a/pkgs/tools/networking/trickle/default.nix +++ b/pkgs/tools/networking/trickle/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ''; NIX_LDFLAGS = [ "-levent" "-ltirpc" ]; - NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ]; configureFlags = [ "--with-libevent" ]; diff --git a/pkgs/tools/networking/uqmi/default.nix b/pkgs/tools/networking/uqmi/default.nix index 067bc51854a..31c00498635 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 ]; - 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/networking/uwimap/default.nix b/pkgs/tools/networking/uwimap/default.nix index 4bd2f872caf..fa80f7348ab 100644 --- a/pkgs/tools/networking/uwimap/default.nix +++ b/pkgs/tools/networking/uwimap/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { sed -i src/osdep/unix/Makefile -e 's,^SSLLIB=.*,SSLLIB=${lib.getLib openssl}/lib,' ''; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${openssl.dev}/include/openssl"; installPhase = '' diff --git a/pkgs/tools/networking/webalizer/default.nix b/pkgs/tools/networking/webalizer/default.nix index cf49ad0be3e..4c2354b5f7f 100644 --- a/pkgs/tools/networking/webalizer/default.nix +++ b/pkgs/tools/networking/webalizer/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: dns_resolv.o:(.bss+0x20): multiple definition of `system_info'; webalizer.o:(.bss+0x76e0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' diff --git a/pkgs/tools/networking/wrk/default.nix b/pkgs/tools/networking/wrk/default.nix index 74280724ca4..20efd6f0182 100644 --- a/pkgs/tools/networking/wrk/default.nix +++ b/pkgs/tools/networking/wrk/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { done ''; - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + env.NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/package-management/apk-tools/default.nix b/pkgs/tools/package-management/apk-tools/default.nix index db114d6b98f..87bba496859 100644 --- a/pkgs/tools/package-management/apk-tools/default.nix +++ b/pkgs/tools/package-management/apk-tools/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { "PKGCONFIGDIR=$(out)/lib/pkgconfig" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=unused-result" "-Wno-error=deprecated-declarations" ]; diff --git a/pkgs/tools/package-management/appimagekit/default.nix b/pkgs/tools/package-management/appimagekit/default.nix index 556b96ea209..3fa9528add1 100644 --- a/pkgs/tools/package-management/appimagekit/default.nix +++ b/pkgs/tools/package-management/appimagekit/default.nix @@ -40,7 +40,7 @@ let # Workaround build failure on -fno-common toolchains: # ld: libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x8): # multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' sed -i "/PKG_CHECK_MODULES.*/,/,:./d" configure diff --git a/pkgs/tools/package-management/cde/default.nix b/pkgs/tools/package-management/cde/default.nix index 43a32eccda1..2e0ceb53e4f 100644 --- a/pkgs/tools/package-management/cde/default.nix +++ b/pkgs/tools/package-management/cde/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: ../readelf-mini/libreadelf-mini.a(dwarf.o):/build/source/readelf-mini/dwarf.c:64: # multiple definition of `do_wide'; ../readelf-mini/libreadelf-mini.a(readelf-mini.o):/build/source/readelf-mini/readelf-mini.c:170: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installPhase = '' install -d $out/bin diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index 0e491fcbb27..7cb1dd91c26 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ] ++ lib.optional stdenv.isLinux elfutils; - NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss"; + env.NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss"; configureFlags = [ "--with-external-db" diff --git a/pkgs/tools/package-management/xbps/default.nix b/pkgs/tools/package-management/xbps/default.nix index eb71b514780..c948c66b47f 100644 --- a/pkgs/tools/package-management/xbps/default.nix +++ b/pkgs/tools/package-management/xbps/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { }) ]; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=deprecated-declarations"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=deprecated-declarations"; postPatch = '' # fix unprefixed ranlib (needed on cross) diff --git a/pkgs/tools/security/aflplusplus/default.nix b/pkgs/tools/security/aflplusplus/default.nix index 7817329f06d..11b276ca05d 100644 --- a/pkgs/tools/security/aflplusplus/default.nix +++ b/pkgs/tools/security/aflplusplus/default.nix @@ -51,7 +51,7 @@ let --replace '"clang++"' '"clang++-UNSUPPORTED"' ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=use-after-free" ]; diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index b897fe61871..2acdc9bb09f 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -40,7 +40,7 @@ python3.pkgs.buildPythonApplication rec { mkdir -p $CHIPSEC_BUILD_LIB/chipsec/helper/linux ''; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # Needed with GCC 12 "-Wno-error=dangling-pointer" ]; diff --git a/pkgs/tools/security/dieharder/default.nix b/pkgs/tools/security/dieharder/default.nix index b85a5c39656..51370ad8dcc 100644 --- a/pkgs/tools/security/dieharder/default.nix +++ b/pkgs/tools/security/dieharder/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: include/dieharder/parse.h:21: multiple definition of `splitbuf'; # include/dieharder/parse.h:21: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildInputs = [ gsl ]; diff --git a/pkgs/tools/security/gnupg/1.nix b/pkgs/tools/security/gnupg/1.nix index 5fa9bc0bedd..390665fe44f 100644 --- a/pkgs/tools/security/gnupg/1.nix +++ b/pkgs/tools/security/gnupg/1.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: ../util/libutil.a(estream-printf.o):/build/gnupg-1.4.23/util/../include/memory.h:100: multiple definition of # `memory_debug_mode'; gpgsplit.o:/build/gnupg-1.4.23/tools/../include/memory.h:100: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; doCheck = true; diff --git a/pkgs/tools/security/haka/default.nix b/pkgs/tools/security/haka/default.nix index 3ea38e06040..b20abbb8bf2 100644 --- a/pkgs/tools/security/haka/default.nix +++ b/pkgs/tools/security/haka/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { sha256 = "0dm39g3k77sa70zrjsqadidg27a6iqq61jzfdxazpllnrw4mjy4w"; }; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; preConfigure = '' sed -i 's,/etc,'$out'/etc,' src/haka/haka.c diff --git a/pkgs/tools/security/iaito/default.nix b/pkgs/tools/security/iaito/default.nix index 95b126bce0c..4e7567d45fd 100644 --- a/pkgs/tools/security/iaito/default.nix +++ b/pkgs/tools/security/iaito/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { ]; # the radare2 binary package seems to not install all necessary headers. - NIX_CFLAGS_COMPILE = [ "-I" "${radare2.src}/shlr/sdb/include/sdb" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I" "${radare2.src}/shlr/sdb/include/sdb" ]; postBuild = '' pushd ../../../iaito-translations diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix index 54cf67ecb9d..51e9434f82e 100644 --- a/pkgs/tools/security/opensc/default.nix +++ b/pkgs/tools/security/opensc/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.isDarwin Carbon ++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]); - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; configureFlags = [ "--enable-zlib" diff --git a/pkgs/tools/security/ossec/default.nix b/pkgs/tools/security/ossec/default.nix index 3c43c51c103..1aa606f5927 100644 --- a/pkgs/tools/security/ossec/default.nix +++ b/pkgs/tools/security/ossec/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: src/common/mgmt/pint-worker-external.po:(.data.rel.local+0x0): multiple definition of # `PINT_worker_external_impl'; src/common/mgmt/pint-mgmt.po:(.bss+0x20): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; buildPhase = '' echo "en diff --git a/pkgs/tools/security/pcsc-cyberjack/default.nix b/pkgs/tools/security/pcsc-cyberjack/default.nix index 40736cdc86b..b420263c209 100644 --- a/pkgs/tools/security/pcsc-cyberjack/default.nix +++ b/pkgs/tools/security/pcsc-cyberjack/default.nix @@ -23,7 +23,7 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; configureFlags = [ "--with-usbdropdir=${placeholder "out"}/pcsc/drivers" diff --git a/pkgs/tools/security/super/default.nix b/pkgs/tools/security/super/default.nix index 1c2e9cbd4ab..8000ae9afc8 100644 --- a/pkgs/tools/security/super/default.nix +++ b/pkgs/tools/security/super/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: pam.o:/build/super-3.30.0/super.h:293: multiple definition of # `Method'; super.o:/build/super-3.30.0/super.h:293: first defined here - NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE -fcommon"; + env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE -fcommon"; configureFlags = [ "--sysconfdir=/etc" diff --git a/pkgs/tools/security/trousers/default.nix b/pkgs/tools/security/trousers/default.nix index bec2084fd14..5502de2d627 100644 --- a/pkgs/tools/security/trousers/default.nix +++ b/pkgs/tools/security/trousers/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-usercheck" ]; - NIX_CFLAGS_COMPILE = [ "-DALLOW_NON_TSS_CONFIG_FILE" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-DALLOW_NON_TSS_CONFIG_FILE" ]; enableParallelBuilding = true; meta = with lib; { diff --git a/pkgs/tools/security/truecrack/default.nix b/pkgs/tools/security/truecrack/default.nix index e90eed4d661..aebbbc79f8f 100644 --- a/pkgs/tools/security/truecrack/default.nix +++ b/pkgs/tools/security/truecrack/default.nix @@ -33,7 +33,7 @@ gccStdenv.mkDerivation rec { # `t_rc'; CpuCore.o:/build/source/src/Crypto/CpuAes.h:1237: first defined here # TODO: remove on upstream fixes it: # https://gitlab.com/kalilinux/packages/truecrack/-/issues/1 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; installFlags = [ "prefix=$(out)" ]; enableParallelBuilding = true; diff --git a/pkgs/tools/system/acpica-tools/default.nix b/pkgs/tools/system/acpica-tools/default.nix index 98ac2254fb6..92f30e4ddbc 100644 --- a/pkgs/tools/system/acpica-tools/default.nix +++ b/pkgs/tools/system/acpica-tools/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { "iasl" ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ "-O3" # Needed with GCC 12 "-Wno-dangling-pointer" diff --git a/pkgs/tools/system/ddrutility/default.nix b/pkgs/tools/system/ddrutility/default.nix index ce5e16e4eb4..fc81c35fa46 100644 --- a/pkgs/tools/system/ddrutility/default.nix +++ b/pkgs/tools/system/ddrutility/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: /build/ccltHly5.o:(.bss+0x119f8): multiple definition of `start_time'; /build/cc9evx3L.o:(.bss+0x10978): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "DESTDIR=$(out)" ]; diff --git a/pkgs/tools/system/facter/default.nix b/pkgs/tools/system/facter/default.nix index 0e746b0d07a..c6c091c1fba 100644 --- a/pkgs/tools/system/facter/default.nix +++ b/pkgs/tools/system/facter/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { "-DRUBY_LIB_INSTALL=${placeholder "out"}/lib/ruby" ]; - NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ cmake ]; buildInputs = [ boost cpp-hocon curl leatherman libwhereami yaml-cpp openssl ruby util-linux ]; diff --git a/pkgs/tools/system/foremost/default.nix b/pkgs/tools/system/foremost/default.nix index 0e1f118c205..140ce91fd66 100644 --- a/pkgs/tools/system/foremost/default.nix +++ b/pkgs/tools/system/foremost/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # -fcommon: Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.isDarwin [ "mac" ]; diff --git a/pkgs/tools/system/ipmiutil/default.nix b/pkgs/tools/system/ipmiutil/default.nix index d691a86e246..b08d705cad1 100644 --- a/pkgs/tools/system/ipmiutil/default.nix +++ b/pkgs/tools/system/ipmiutil/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sed -e "s@/var@$out/var@g" -i Makefile */Makefile */*/Makefile ''; - NIX_CFLAGS_COMPILE = "-fno-stack-protector"; + env.NIX_CFLAGS_COMPILE = "-fno-stack-protector"; meta = with lib; { description = "An easy-to-use IPMI server management utility"; diff --git a/pkgs/tools/system/mac-fdisk/default.nix b/pkgs/tools/system/mac-fdisk/default.nix index 292b77d2d2c..94e7996c161 100644 --- a/pkgs/tools/system/mac-fdisk/default.nix +++ b/pkgs/tools/system/mac-fdisk/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; + env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; hardeningDisable = [ "format" ]; diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 5f24ddf6260..d5612331e82 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -67,7 +67,7 @@ in stdenv.mkDerivation rec { # We pick zlib.dev as a simple canary package with pkg-config input. disallowedReferences = [ zlib.dev ]; - NIX_CFLAGS_COMPILE = lib.optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; postInstall = '' ln -s ${go-d-plugin}/lib/netdata/conf.d/* $out/lib/netdata/conf.d diff --git a/pkgs/tools/system/pdisk/default.nix b/pkgs/tools/system/pdisk/default.nix index e0a78b6b940..b10d9e81caa 100644 --- a/pkgs/tools/system/pdisk/default.nix +++ b/pkgs/tools/system/pdisk/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { IOKit ]; - NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; + env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; enableParallelBuilding = true; diff --git a/pkgs/tools/system/rowhammer-test/default.nix b/pkgs/tools/system/rowhammer-test/default.nix index 993bfdaf834..f360697efbd 100644 --- a/pkgs/tools/system/rowhammer-test/default.nix +++ b/pkgs/tools/system/rowhammer-test/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "1fbfcnm5gjish47wdvikcsgzlb5vnlfqlzzm6mwiw2j5qkq0914i"; }; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-Wno-error=format"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-Wno-error=format"; buildPhase = "sh -e make.sh"; diff --git a/pkgs/tools/system/stress-ng/default.nix b/pkgs/tools/system/stress-ng/default.nix index aea767e323a..7c94c9c89e5 100644 --- a/pkgs/tools/system/stress-ng/default.nix +++ b/pkgs/tools/system/stress-ng/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { "BASHDIR=${placeholder "out"}/share/bash-completion/completions" ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1"; # Won't build on i686 because the binary will be linked again in the # install phase without checking the dependencies. This will prevent diff --git a/pkgs/tools/system/testdisk/default.nix b/pkgs/tools/system/testdisk/default.nix index 10cbed47068..8bc290d6a67 100644 --- a/pkgs/tools/system/testdisk/default.nix +++ b/pkgs/tools/system/testdisk/default.nix @@ -41,7 +41,7 @@ assert enableQt -> qwt != null; nativeBuildInputs = [ pkg-config ]; - NIX_CFLAGS_COMPILE="-Wno-unused"; + env.NIX_CFLAGS_COMPILE = "-Wno-unused"; meta = with lib; { homepage = "https://www.cgsecurity.org/wiki/Main_Page"; diff --git a/pkgs/tools/system/vboot_reference/default.nix b/pkgs/tools/system/vboot_reference/default.nix index 77e030eb086..96ce3fcd412 100644 --- a/pkgs/tools/system/vboot_reference/default.nix +++ b/pkgs/tools/system/vboot_reference/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { patches = [ ./dont_static_link.patch ]; - NIX_CFLAGS_COMPILE = [ + env.NIX_CFLAGS_COMPILE = toString [ # fix build with gcc9 "-Wno-error" # workaround build failure on -fno-common toolchains: diff --git a/pkgs/tools/text/kytea/default.nix b/pkgs/tools/text/kytea/default.nix index 9cbc2c030a4..322fa77ebad 100644 --- a/pkgs/tools/text/kytea/default.nix +++ b/pkgs/tools/text/kytea/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { patches = [ ./gcc-O3.patch ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; meta = with lib; { homepage = "http://www.phontron.com/kytea/"; diff --git a/pkgs/tools/text/qgrep/default.nix b/pkgs/tools/text/qgrep/default.nix index 4145ec656d2..7db56539bf2 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 ]; - 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 \ diff --git a/pkgs/tools/text/sgml/jade/default.nix b/pkgs/tools/text/sgml/jade/default.nix index 891e26017e6..a744300bfdd 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"; + env.NIX_CFLAGS_COMPILE = "-Wno-deprecated"; # Makefile is missing intra-library depends, fails build as: # ld: cannot find -lsp diff --git a/pkgs/tools/text/silver-searcher/default.nix b/pkgs/tools/text/silver-searcher/default.nix index 53146ddd061..94c5c8cf02f 100644 --- a/pkgs/tools/text/silver-searcher/default.nix +++ b/pkgs/tools/text/silver-searcher/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # ld: src/zfile.o:/build/source/src/log.h:12: multiple definition of # `print_mtx'; src/ignore.o:/build/source/src/log.h:12: first defined here # TODO: remove once next release has https://github.com/ggreer/the_silver_searcher/pull/1377 - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s"; nativeBuildInputs = [ autoreconfHook pkg-config ]; diff --git a/pkgs/tools/text/smu/default.nix b/pkgs/tools/text/smu/default.nix index 02a29a91f47..85e593982e8 100644 --- a/pkgs/tools/text/smu/default.nix +++ b/pkgs/tools/text/smu/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; # _FORTIFY_SOURCE requires compiling with optimization (-O) - NIX_CFLAGS_COMPILE = "-O"; + env.NIX_CFLAGS_COMPILE = "-O"; makeFlags = [ "PREFIX=${placeholder "out"}" diff --git a/pkgs/tools/video/mjpegtools/default.nix b/pkgs/tools/video/mjpegtools/default.nix index b9b1b228efa..675dfc109de 100644 --- a/pkgs/tools/video/mjpegtools/default.nix +++ b/pkgs/tools/video/mjpegtools/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ libdv libjpeg libpng ] ++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ]; - NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${lib.getDev SDL}/include/SDL"; + env.NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${lib.getDev SDL}/include/SDL"; postPatch = '' sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure diff --git a/pkgs/tools/video/swfmill/default.nix b/pkgs/tools/video/swfmill/default.nix index dbad79e61ad..c2b0efbdec8 100644 --- a/pkgs/tools/video/swfmill/default.nix +++ b/pkgs/tools/video/swfmill/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; # Fixes build with GCC 6 - NIX_CFLAGS_COMPILE = "-std=c++03"; + env.NIX_CFLAGS_COMPILE = "-std=c++03"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ libxslt freetype libpng libxml2 ]; diff --git a/pkgs/tools/virtualization/google-guest-oslogin/default.nix b/pkgs/tools/virtualization/google-guest-oslogin/default.nix index 7e1fcff3984..0e2aae22f72 100644 --- a/pkgs/tools/virtualization/google-guest-oslogin/default.nix +++ b/pkgs/tools/virtualization/google-guest-oslogin/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl.dev pam json_c ]; - NIX_CFLAGS_COMPILE = [ "-I${json_c.dev}/include/json-c" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I${json_c.dev}/include/json-c" ]; makeFlags = [ "VERSION=${version}" diff --git a/pkgs/tools/wayland/wlrctl/default.nix b/pkgs/tools/wayland/wlrctl/default.nix index 4de7699b35f..3915e3a18a0 100644 --- a/pkgs/tools/wayland/wlrctl/default.nix +++ b/pkgs/tools/wayland/wlrctl/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson pkg-config scdoc ninja wayland-scanner ]; buildInputs = [ libxkbcommon wayland ]; - NIX_CFLAGS_COMPILE = "-Wno-error=type-limits"; + env.NIX_CFLAGS_COMPILE = "-Wno-error=type-limits"; meta = with lib; { description = "Command line utility for miscellaneous wlroots Wayland extensions"; diff --git a/pkgs/top-level/emscripten-packages.nix b/pkgs/top-level/emscripten-packages.nix index d5f820d0d60..5e64739b865 100644 --- a/pkgs/top-level/emscripten-packages.nix +++ b/pkgs/top-level/emscripten-packages.nix @@ -142,7 +142,7 @@ rec { (old: { nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkg-config ]; # we need to reset this setting! - NIX_CFLAGS_COMPILE=""; + env = (old.env or { }) // { NIX_CFLAGS_COMPILE = ""; }; dontStrip = true; outputs = [ "out" ]; buildPhase = '' diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 70bfd903a4f..c75df40fce2 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -1147,7 +1147,7 @@ let hash = "sha256-gxJyAnHHrdxLvuwzEs3divS5kKxjYgSllsB5M61sY0o="; }; buildInputs = [ pkgs.zlib TestWarn ]; - NIX_CFLAGS_COMPILE = "-I${pkgs.zlib.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.zlib.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.zlib.out}/lib -lz"; meta = { description = "Fast C metadata and tag reader for all common audio file formats"; @@ -1544,7 +1544,7 @@ let url = "mirror://cpan/authors/id/M/ML/MLEHMANN/${pname}-${version}.tar.gz"; hash = "sha256-o/LKnSuu/BqqQJCLL5y5KS/aPn15fji7146rudna62s="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.db4.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.db4.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.db4.out}/lib -ldb"; buildInputs = [ pkgs.db4 ]; propagatedBuildInputs = [ commonsense ]; @@ -4726,7 +4726,7 @@ let hash = "sha256-UeekeuWUz1X2bAdi9mkhVIbn2LNGC9rf55NQzPJtrzg="; }; buildInputs = [ pkgs.gmp DevelChecklib TestRequires ]; - NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.gmp.out}/lib -lgmp"; meta = { description = "Crypt::DH Using GMP Directly"; @@ -5084,7 +5084,7 @@ let url = "mirror://cpan/authors/id/M/MG/MGREGORO/Crypt-Sodium-0.11.tar.gz"; hash = "sha256-kHxzoQVs6gV9qYGa6kipKreG5qqq858c3ZZHsj8RbHg="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.libsodium.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.libsodium.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.libsodium.out}/lib -lsodium"; meta = { description = "Perl bindings for libsodium (NaCL)"; @@ -5144,7 +5144,7 @@ let url = "mirror://cpan/authors/id/T/TT/TTAR/Crypt-OpenSSL-AES-0.02.tar.gz"; hash = "sha256-tm+rUU7fl/wy9Y2iV1gnBKIQwrNeKX1cMbf6L/0I6Qg="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto"; meta = { description = "Perl wrapper around OpenSSL's AES library"; @@ -5159,7 +5159,7 @@ let url = "mirror://cpan/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-0.09.tar.gz"; hash = "sha256-I05y+4OW1FUn5v1F5DdZxcPzogjPjynmoiFhqZb9Qtw="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto"; meta = { description = "OpenSSL's multiprecision integer arithmetic"; @@ -5188,7 +5188,7 @@ let url = "mirror://cpan/authors/id/R/RU/RURBAN/Crypt-OpenSSL-Random-0.15.tar.gz"; hash = "sha256-8IdvqhujER45uGqnMMYDIR7/KQXkYMcqV7YejPR1zvQ="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto"; buildInputs = [ CryptOpenSSLGuess ]; meta = { @@ -5206,7 +5206,7 @@ let hash = "sha256-vb5jD21vVAMldGrZmXcnKshmT/gb0Z8K2rptb0Xv2GQ="; }; propagatedBuildInputs = [ CryptOpenSSLRandom ]; - NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto"; buildInputs = [ CryptOpenSSLGuess ]; meta = { @@ -5222,7 +5222,7 @@ let url = "mirror://cpan/authors/id/J/JO/JONASBN/Crypt-OpenSSL-X509-1.914.tar.gz"; hash = "sha256-ScV1JX5kCK1aiQEeW1gA1Zj5zK/fQucQBO2Byy9E7no="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto"; buildInputs = [ CryptOpenSSLGuess ]; propagatedBuildInputs = [ ConvertASN1 ]; @@ -14452,7 +14452,7 @@ let }; buildInputs = [ pkgs.gmp ]; doCheck = false; - NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.gmp.out}/lib -lgmp"; propagatedBuildInputs = [ MathBigInt ]; meta = { @@ -14524,7 +14524,7 @@ let hash = "sha256-Ftpfge9SdChiuzyHhASq/bJM2rT4rL/KEoAzJIe8VV8="; }; buildInputs = [ pkgs.gmp AlienGMP ]; - NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.gmp.out}/lib -lgmp"; meta = { description = "High speed arbitrary size integer math"; @@ -14605,7 +14605,7 @@ let # Workaround build failure on -fno-common toolchains: # ld: libPARI/libPARI.a(compat.o):(.bss+0x8): multiple definition of # `overflow'; Pari.o:(.bss+0x80): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = "cp ${pari_tgz} pari-${pariversion}.tgz"; makeMakerFlags = [ "pari_tgz=pari-${pariversion}.tgz" ]; src = fetchurl { @@ -14658,7 +14658,7 @@ let hash = "sha256-JpfH/Vx+Nf3sf1DtVqZ76Aei8iZXWJ5jfa01knRAA74="; }; buildInputs = [ pkgs.gmp ]; - NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.gmp.dev}/include"; NIX_CFLAGS_LINK = "-L${pkgs.gmp.out}/lib -lgmp"; meta = { description = "Utilities related to prime numbers, using GMP"; @@ -17187,7 +17187,7 @@ let }; buildInputs = [ ModuleBuildXSUtil TestException TestFatal TestLeakTrace TestOutput TestRequires TryTiny ]; perlPreHook = "export LD=$CC"; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fno-stack-protector"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fno-stack-protector"; hardeningDisable = lib.optional stdenv.isi686 "stackprotector"; meta = { description = "Moose minus the antlers"; @@ -18628,7 +18628,7 @@ let # fix "error: format not a string literal and no format arguments [-Werror=format-security]" hardeningDisable = [ "format" ]; # Make the async API accessible - NIX_CFLAGS_COMPILE = "-DTHREADED"; + env.NIX_CFLAGS_COMPILE = "-DTHREADED"; NIX_CFLAGS_LINK = "-L${pkgs.zookeeper_mt.out}/lib -lzookeeper_mt"; # Most tests are skipped as no server is available in the sandbox. # `t/35_log.t` seems to suffer from a race condition; remove it. See @@ -25022,7 +25022,7 @@ let }; propagatedBuildInputs = [ pkgs.aspell ]; ASPELL_CONF = "dict-dir ${pkgs.aspellDicts.en}/lib/aspell"; - NIX_CFLAGS_COMPILE = "-I${pkgs.aspell}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.aspell}/include"; NIX_CFLAGS_LINK = "-L${pkgs.aspell}/lib -laspell"; meta = { description = "Perl interface to the GNU Aspell library"; @@ -25721,7 +25721,7 @@ let hash = "sha256-J45u/Jsk82mclh77NuvmAqNAi1QVcgF97hMdFScocys="; }; # https://rt.cpan.org/Public/Bug/Display.html?id=124815 - NIX_CFLAGS_COMPILE = "-DHAS_VPRINTF"; + env.NIX_CFLAGS_COMPILE = "-DHAS_VPRINTF"; meta = { description = "Remove accents from a string"; license = with lib.licenses; [ gpl2Only ]; @@ -26849,7 +26849,7 @@ let name = "WWWCurl-curl-7.71.0.patch"; }) ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-return-type"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-return-type"; buildInputs = [ pkgs.curl ]; doCheck = false; # performs network access meta = { @@ -27870,7 +27870,7 @@ let url = "mirror://cpan/authors/id/Z/ZN/ZNMSTR/Zonemaster-LDNS-3.1.0.tar.gz"; hash = "sha256-Rr4uoQg5g9/ZLVnFQiLAz5MB+Uj39U24YWEa+o2+9HE="; }; - NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include -I${pkgs.libidn2}.dev}/include"; + env.NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include -I${pkgs.libidn2}.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -L${lib.getLib pkgs.libidn2}/lib -lcrypto -lidn2"; makeMakerFlags = [ "--prefix-openssl=${pkgs.openssl.dev}" ]; diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 3f1aa277de9..f819d2fd365 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -563,7 +563,7 @@ lib.makeScope pkgs.newScope (self: with self; { name = "xmlreader"; buildInputs = [ libxml2 ]; internalDeps = [ php.extensions.dom ]; - NIX_CFLAGS_COMPILE = [ "-I../.." "-DHAVE_DOM" ]; + env.NIX_CFLAGS_COMPILE = toString [ "-I../.." "-DHAVE_DOM" ]; doCheck = false; configureFlags = [ "--enable-xmlreader"