treewide: move NIX_CFLAGS_COMPILE to the env attrset

with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
This commit is contained in:
Artturin 2023-02-19 21:23:32 +02:00
parent 6f6cc4a22d
commit f9fdf2d402
743 changed files with 781 additions and 781 deletions

View File

@ -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";

View File

@ -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"
]);

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
lv2 libX11 libGL libGLU mesa
];
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=array-bounds"
"-Wno-error=stringop-overflow"

View File

@ -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 ];

View File

@ -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/"
]);

View File

@ -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

View File

@ -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;

View File

@ -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" ];

View File

@ -63,7 +63,7 @@ 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 = 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"

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
"-w"
"-Wno-error"
];

View File

@ -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

View File

@ -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.optional stdenv.isDarwin "-DTARGET_OS_IPHONE=0";
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/{Applications,bin,lib}

View File

@ -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;

View File

@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
"--install-roboto-font"
] ++ optional optimizationSupport "--optimization";
NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ];
env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ];
meta = with lib; {
description = "A virtual guitar amplifier for Linux running with JACK";

View File

@ -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

View File

@ -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" ];

View File

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.isLinux [ "PLATFORM=DEB" ]
++ lib.optionals stdenv.isDarwin [ "PLATFORM=OSX" ];
NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ] ++
env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ] ++
lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing";
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework Foundation";

View File

@ -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"}

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
NIX_CFLAGS_COMPILE = toString [ "-fgnu89-inline" ];
env.NIX_CFLAGS_COMPILE = toString [ "-fgnu89-inline" ];
buildPhase = "./cc";
installPhase = ''

View File

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
pcre2
] ++ lib.optional pulseaudioSupport libpulseaudio;
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=free-nonheap-object"
];

View File

@ -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"

View File

@ -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 ];

View File

@ -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")) ]

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
libsamplerate libsndfile lilv lrdf lv2 qtsvg rtaudio rubberband sord
];
NIX_CFLAGS_COMPILE = toString [ "-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/";

View File

@ -22,7 +22,7 @@ in stdenv.mkDerivation rec {
sha256 = "1rk71ls33a38wx8i22plsi7d89cqqxrfxknq5i4f9igsw1ipm4gn";
};
NIX_CFLAGS_COMPILE = toString [ "-Wno-narrowing" ];
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-narrowing" ];
buildFlags = [ "VSTSDK_PATH=${vst-sdk}/VST2_SDK" ];

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ];
NIX_CFLAGS_COMPILE = toString [ "-I${SDL2.dev}/include/SDL2" ];
env.NIX_CFLAGS_COMPILE = toString [ "-I${SDL2.dev}/include/SDL2" ];
hardeningDisable = [ "format" ];

View File

@ -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")

View File

@ -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")

View File

@ -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";

View File

@ -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 [

View File

@ -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";

View File

@ -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 ];

View File

@ -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 = ''

View File

@ -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";

View File

@ -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";

View File

@ -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
'';

View File

@ -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;

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "17ckkxfzbqvvfdnh10if4aqdcq98q3vl6dn1v6f4lhr4ifnyjdlk";
};
buildInputs = [ ncurses ];
NIX_CFLAGS_COMPILE = toString [ "-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 {

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
patches = [ ./gcc7.patch ];
NIX_CFLAGS_COMPILE = toString [ "-Wno-narrowing" ];
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-narrowing" ];
meta = with lib; {
description = "File editor/viewer/analyzer for executables";

View File

@ -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";

View File

@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
speexdsp
];
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
"-I${SDL2_image}/include/SDL2"
"-I${SDL2_net}/include/SDL2"
];

View File

@ -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";

View File

@ -117,7 +117,7 @@ stdenv.mkDerivation rec {
--subst-var-by mamePath "$out/opt/mame"
'';
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=use-after-free"
];

View File

@ -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

View File

@ -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"

View File

@ -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 = toString [ "-fcommon" ];
env.NIX_CFLAGS_COMPILE = toString [ "-fcommon" ];
makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ glib gtk2 libticonv libtifiles2 libticables2 libticalcs2 ];
NIX_CFLAGS_COMPILE = toString [ "-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";

View File

@ -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 = {

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
dontConfigure = true;
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
# Until upstream fixes the issues...
"-Wp,-D_FORTIFY_SOURCE=0"
];

View File

@ -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

View File

@ -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)" ]

View File

@ -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"

View File

@ -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 = toString [
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=array-bounds"
];

View File

@ -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";

View File

@ -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.optional 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}";

View File

@ -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";

View File

@ -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.optional stdenv.cc.isGNU "-Wno-error=catch-value";
nativeBuildInputs = [ pkg-config ];

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ scons pkg-config wrapGAppsHook ];
buildInputs = [ glfw3 gtk3 libpng12 ];
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=format-truncation"
];

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
NIX_CFLAGS_COMPILE = "-fcommon";
env.NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = "-lm";
meta = with lib; {

View File

@ -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" '';

View File

@ -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

View File

@ -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";

View File

@ -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"

View File

@ -33,7 +33,7 @@ mkDerivation rec {
xsimd
];
NIX_CFLAGS_COMPILE = toString [ "-I${ilmbase.dev}/include/OpenEXR" ]
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.

View File

@ -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

View File

@ -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";

View File

@ -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";
}

View File

@ -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

View File

@ -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; {

View File

@ -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.

View File

@ -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

View File

@ -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"

View File

@ -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");

View File

@ -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.optional stdenv.isi686 "-ffloat-store";
doCheck = true;

View File

@ -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 = [

View File

@ -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"}"

View File

@ -45,7 +45,7 @@ mkDerivation rec {
mv $out/lib/klayout $out/bin/
'';
NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ];
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ];
dontInstall = true; # Installation already happens as part of "build.sh"

View File

@ -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";

View File

@ -140,7 +140,7 @@ in stdenv.mkDerivation rec {
patchShebangs tools/get_wb_version.sh
'';
NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString [
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
"-Wno-error=deprecated-declarations"
] ++ lib.optionals stdenv.isAarch64 [

View File

@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
meta = with lib; {
description = "Network UPS Tools";

View File

@ -117,7 +117,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DOCPN_BUNDLE_DOCS=true" ];
NIX_CFLAGS_COMPILE = lib.optionals (!stdenv.hostPlatform.isx86) [
env.NIX_CFLAGS_COMPILE = lib.optionals (!stdenv.hostPlatform.isx86) [
"-DSQUISH_USE_SSE=0"
];

View File

@ -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

View File

@ -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 = [

View File

@ -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 ];

View File

@ -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";

View File

@ -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 = toString [ "-DPW_ENABLE_DEPRECATED" ];
env.NIX_CFLAGS_COMPILE = toString [ "-DPW_ENABLE_DEPRECATED" ];
meta = with lib; {
description = "A simple and elegant pipewire graph editor ";

View File

@ -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 .

View File

@ -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/";

View File

@ -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";

View File

@ -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";

View File

@ -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

View File

@ -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+

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
"-DPROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc";
NIX_CFLAGS_COMPILE = toString [ "-DTM_VERSION=${finalAttrs.version}" ];
env.NIX_CFLAGS_COMPILE = toString [ "-DTM_VERSION=${finalAttrs.version}" ];
postInstall = ''
installManPage ../docs/man/tilemaker.1

View File

@ -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";

View File

@ -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.

View File

@ -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: ''

View File

@ -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" ];

View File

@ -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";

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation {
"-DENABLE_UNICODE_DATABASE_DOWNLOAD=false"
];
NIX_CFLAGS_COMPILE = toString [
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'

View File

@ -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}/";

Some files were not shown because too many files have changed in this diff Show More