Merge pull request #217206 from Artturin/stdenvimprovements1

This commit is contained in:
Bernardo Meurer 2023-02-23 12:07:47 +00:00 committed by GitHub
commit 42008a14a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
767 changed files with 867 additions and 866 deletions

View file

@ -60,7 +60,7 @@ See the `zlib` example:
(old: rec { (old: rec {
buildInputs = old.buildInputs ++ [ pkg-config ]; buildInputs = old.buildInputs ++ [ pkg-config ];
# we need to reset this setting! # we need to reset this setting!
NIX_CFLAGS_COMPILE=""; env = (old.env or { }) // { NIX_CFLAGS_COMPILE = ""; };
configurePhase = '' configurePhase = ''
# FIXME: Some tests require writing at $HOME # FIXME: Some tests require writing at $HOME
HOME=$TMPDIR HOME=$TMPDIR

View file

@ -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. 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: This needs to be turned off or fixed for errors similar to:

View file

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
libtool libtool
]; ];
NIX_CFLAGS_COMPILE = "-Wno-error=narrowing"; env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing";
meta = with lib; { meta = with lib; {
description = "ReplayGain for AAC files"; description = "ReplayGain for AAC files";

View file

@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
"-DADLplug_Jack=${if withJack then "ON" else "OFF"}" "-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 # "fp.h" file not found
"-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers" "-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 lv2 libX11 libGL libGLU mesa
]; ];
NIX_CFLAGS_COMPILE = [ env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12 # Needed with GCC 12
"-Wno-error=array-bounds" "-Wno-error=array-bounds"
"-Wno-error=stringop-overflow" "-Wno-error=stringop-overflow"

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
}; };
# https://bugs.launchpad.net/audio-recorder/+bug/1784622 # 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 ]; nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ];

View file

@ -108,7 +108,7 @@ stdenv.mkDerivation rec {
CoreAudioKit 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 # Fails to find fp.h on its own
"-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Versions/Current/Headers/" "-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: # gcc-10. Otherwise build fails as:
# ld: brightonCLI.o:/build/bristol-0.60.11/brighton/brightonCLI.c:139: multiple definition of # 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 # `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 = '' preInstall = ''
sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol 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 # 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; doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
configureFlags = oldAttrs.configureFlags ++ [ "--enable-openssl-compatibility" ]; 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" ]); (makeSDLFlags [ SDL SDL_ttf SDL_gfx ] ++ [ "-I${libxml2.dev}/include/libxml2" ]);
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View file

@ -63,11 +63,11 @@ stdenv.mkDerivation rec {
"-DWARNINGS_ARE_ERRORS=ON" "-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) # Needed with GCC 12 but breaks on darwin (with clang) or aarch64 (old gcc)
"-Wno-error=mismatched-new-delete" "-Wno-error=mismatched-new-delete"
"-Wno-error=use-after-free" "-Wno-error=use-after-free"
]; ]);
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 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 # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a

View file

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

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
# Workaround build failure on -fno-common toolchains: # Workaround build failure on -fno-common toolchains:
# ld: src/net/../gnauralnet.h:233: multiple definition of `GN_ScheduleFingerprint'; # ld: src/net/../gnauralnet.h:233: multiple definition of `GN_ScheduleFingerprint';
# src/net/../../src/gnauralnet.h:233: first defined here # src/net/../../src/gnauralnet.h:233: first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
postInstall = '' postInstall = ''
mkdir -p $out/share/applications mkdir -p $out/share/applications

View file

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
"-DINSTALL_DEPEND=OFF" "-DINSTALL_DEPEND=OFF"
] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=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 '' postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/{Applications,bin,lib} mkdir -p $out/{Applications,bin,lib}

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: .libs/autodetection.o:/build/gtkpod-2.1.5/libgtkpod/gtkpod_app_iface.h:248: multiple definition of # 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 # `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; enableParallelBuilding = true;

View file

@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
"--install-roboto-font" "--install-roboto-font"
] ++ optional optimizationSupport "--optimization"; ] ++ optional optimizationSupport "--optimization";
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ];
meta = with lib; { meta = with lib; {
description = "A virtual guitar amplifier for Linux running with JACK"; 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: # gcc-10. Otherwise build fails as:
# ld: jamin-preferences.o:/build/jamin-0.95.0/src/hdeq.h:64: multiple definition of # 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 # `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 = '' postInstall = ''
wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa 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 # ld: libengine_gui.a(gui_menu.o):(.bss+0x0): multiple definition of
# `menu_t'; objs.release/action.o:(.bss+0x20): first defined here # `menu_t'; objs.release/action.o:(.bss+0x20): first defined here
# TODO: remove it for 1.7.7+ release as it was fixed upstream. # 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" ]; buildFlags = [ "PREFIX=${placeholder "out"}" "CFG=release" ];

View file

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

View file

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
"PREFIX=${placeholder "out"}" "PREFIX=${placeholder "out"}"
]; ];
NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL"; env.NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL";
configurePhase = '' configurePhase = ''
make config PREFIX=${placeholder "out"} make config PREFIX=${placeholder "out"}

View file

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

View file

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

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
libvorbis libvorbis
] ++ lib.optional stdenv.isDarwin SDL; ] ++ lib.optional stdenv.isDarwin SDL;
NIX_CFLAGS_COMPILE = toString ([ env.NIX_CFLAGS_COMPILE = toString ([
"-Wno-narrowing" "-Wno-narrowing"
] ++ lib.optionals stdenv.cc.isClang [ ] ++ lib.optionals stdenv.cc.isClang [
"-Wno-reserved-user-defined-literal" "-Wno-reserved-user-defined-literal"

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
# Workaround build failure on -fno-common toolchains like upstream # Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as: # 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 # 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 ]; buildInputs = [ gettext libmpcdec libao ];

View file

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: volume.o:/build/mpg321-0.3.2-orig/mpg321.h:119: multiple definition of # 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 # `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 = configureFlags =
[ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ] [ ("--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 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; { meta = with lib; {
homepage = "https://muse-sequencer.github.io/"; homepage = "https://muse-sequencer.github.io/";

View file

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

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ]; 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" ]; hardeningDisable = [ "format" ];

View file

@ -83,7 +83,7 @@ mkDerivation rec {
CFLAGS = [ "-DHAVE_PARANOIA_NEW_INCLUDES" ]; 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 = '' postInstall = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") 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 # 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 = '' postInstall = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") 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. # Without it doesn't find all of the boost libraries.
BOOST_LIB_DIR = "${boost}/lib"; BOOST_LIB_DIR = "${boost}/lib";
# uses the deprecated get_generic_category() in boost_system # 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"; LC_ALL = "en_US.UTF-8";

View file

@ -82,7 +82,7 @@ stdenv.mkDerivation rec {
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" --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 # tenacity only looks for ffmpeg at runtime, so we need to link it in manually
NIX_LDFLAGS = toString [ NIX_LDFLAGS = toString [

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: tcextract-extract_pcm.o:/build/transcode-1.1.7/import/extract_pcm.c:36: multiple definition of # 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 # `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; { meta = with lib; {
description = "Suite of command line utilities for transcoding video and audio codecs, and for converting between different container formats"; 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'; # 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 # 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). # 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 ]; nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libmpdclient openssl ]; buildInputs = [ libmpdclient openssl ];

View file

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
# Force optimization to fix: # Force optimization to fix:
# warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) # 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 # Remove pre-built y.tab.c to generate with nixpkgs bison
preBuild = '' preBuild = ''

View file

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
# ld: cgminer-driver-modminer.o:/build/source/miner.h:285: # ld: cgminer-driver-modminer.o:/build/source/miner.h:285:
# multiple definition of `bitforce_drv'; cgminer-cgminer.o:/build/source/miner.h:285: # multiple definition of `bitforce_drv'; cgminer-cgminer.o:/build/source/miner.h:285:
# first defined here # first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
meta = with lib; { meta = with lib; {
description = "CPU/GPU miner in c for bitcoin"; 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+. # 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; { meta = with lib; {
description = "GTK based greeter for greetd, to be run under cage or similar"; 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: { irony = super.irony.overrideAttrs (old: {
cmakeFlags = old.cmakeFlags or [ ] ++ [ "-DCMAKE_INSTALL_BINDIR=bin" ]; cmakeFlags = old.cmakeFlags or [ ] ++ [ "-DCMAKE_INSTALL_BINDIR=bin" ];
NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR"; env.NIX_CFLAGS_COMPILE = "-UCLANG_RESOURCE_DIR";
preConfigure = '' preConfigure = ''
cd server cd server
''; '';

View file

@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
doCheck = true; 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 { passthru.updateScript = gnome.updateScript {
packageName = pname; packageName = pname;

View file

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "17ckkxfzbqvvfdnh10if4aqdcq98q3vl6dn1v6f4lhr4ifnyjdlk"; sha256 = "17ckkxfzbqvvfdnh10if4aqdcq98q3vl6dn1v6f4lhr4ifnyjdlk";
}; };
buildInputs = [ ncurses ]; 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 = [ patches = [
# gcc7 compat # gcc7 compat
(fetchpatch { (fetchpatch {

View file

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

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
# the linux config works fine on darwin too! # the linux config works fine on darwin too!
buildFlags = lib.optional (stdenv.isLinux || stdenv.isDarwin) "linux"; 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 = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View file

@ -11,7 +11,7 @@ mkDerivation rec {
buildInputs = [ qtbase qtscript poppler zlib qtwebengine ]; buildInputs = [ qtbase qtscript poppler zlib qtwebengine ];
nativeBuildInputs = [ pkg-config poppler qmake ]; nativeBuildInputs = [ pkg-config poppler qmake ];
NIX_CFLAGS_COMPILE="-I${poppler.dev}/include/poppler"; env.NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler";
qmakeFlags = [ qmakeFlags = [
"DESKTOPDIR=${placeholder "out"}/share/applications" "DESKTOPDIR=${placeholder "out"}/share/applications"

View file

@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
"-C desktop-ui" "-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; { meta = with lib; {
homepage = "https://ares-emu.net"; homepage = "https://ares-emu.net";

View file

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

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
# Work around build failures on recent GTK. # Work around build failures on recent GTK.
# See http://ubuntuforums.org/showthread.php?p=10535837 # 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; { meta = with lib; {
homepage = "https://segaretro.org/Gens/GS"; homepage = "https://segaretro.org/Gens/GS";

View file

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

View file

@ -157,7 +157,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
# TODO Remove when bumping past rev22 # 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 '' buildPhase = optionalString enableSDL ''
cd sdl2 cd sdl2

View file

@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: AboutDlg.o:/build/pcsxr/gui/Linux.h:42: multiple definition of `cfgfile'; # ld: AboutDlg.o:/build/pcsxr/gui/Linux.h:42: multiple definition of `cfgfile';
# LnxMain.o:/build/pcsxr/gui/Linux.h:42: first defined here # LnxMain.o:/build/pcsxr/gui/Linux.h:42: first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
dynarecTarget = dynarecTarget =
if stdenv.isx86_64 then "x86_64" 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. # Workaround to build against upstream gcc-10 and clang-11.
# Can be removed when next release contains # Can be removed when next release contains
# https://github.com/simh/simh/issues/794 # 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" ]; makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ glib gtk2 libticonv libtifiles2 libticables2 libticalcs2 ]; buildInputs = [ glib gtk2 libticonv libtifiles2 libticables2 libticalcs2 ];
NIX_CFLAGS_COMPILE = [ "-lm" ]; env.NIX_CFLAGS_COMPILE = toString [ "-lm" ];
meta = with lib; { meta = with lib; {
homepage = "http://lpg.ticalc.org/prj_tilem/"; homepage = "http://lpg.ticalc.org/prj_tilem/";
description = "Emulator and debugger for Texas Instruments Z80-based graphing calculators"; 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: # Workaround build failure on -fno-common toolchains:
# ld: bsdsocket.o:(.bss+0x0): multiple definition of # ld: bsdsocket.o:(.bss+0x0): multiple definition of
# `socketbases'; main.o:(.bss+0x2792c0): first defined here # `socketbases'; main.o:(.bss+0x2792c0): first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
LDFLAGS = [ "-lm" ]; LDFLAGS = [ "-lm" ];
meta = { meta = {

View file

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

View file

@ -35,7 +35,7 @@ in stdenv.mkDerivation {
# Workaround build failure on -fno-common toolchains: # Workaround build failure on -fno-common toolchains:
# ld: initc.o:(.bss+0x28): multiple definition of `HacksDisable'; cfg.o:(.bss+0x59e3): first defined here # 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) # 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 = '' preConfigure = ''
cd src cd src

View file

@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ];
buildInputs = [ readline ncurses ] ++ lib.optional stdenv.hostPlatform.isMusl musl-fts; 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"; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts";
makeFlags = [ "PREFIX=$(out)" ] 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 # `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 # TODO: can be removed once https://github.com/IgnorantGuru/spacefm/pull/772
# or equivalent is merged upstream. # or equivalent is merged upstream.
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
configureFlags = [ configureFlags = [
"--with-bash-path=${pkgs.bash}/bin/bash" "--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.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsa-lib fontconfig libGLU ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ]; ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ];
NIX_CFLAGS_COMPILE = [ env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12 # Needed with GCC 12
"-Wno-error=array-bounds" "-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 --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 = { meta = {
description = "Open source panorama viewer using GL"; description = "Open source panorama viewer using GL";

View file

@ -154,7 +154,7 @@ in stdenv.mkDerivation rec {
doCheck = true; 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. # Check if librsvg was built with --disable-pixbuf-loader.
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; 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 # Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: interface.o:(.bss+0xe0): multiple definition of `fimg'; plugin.o:(.bss+0x40): first defined here # 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"; NIX_LDFLAGS = "-lm";
src = fetchurl { src = fetchurl {
url = "https://github.com/pixlsus/registry.gimp.org_static/raw/master/registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz"; 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"; 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 ]; nativeBuildInputs = [ pkg-config ];

View file

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

View file

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

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: ../obj/unix/tiles.o:/build/grafx2/src/global.h:306: multiple definition of # 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 # `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" ''; preInstall = '' mkdir -p "$out" '';

View file

@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
# disable installation of the python scripting interface # disable installation of the python scripting interface
cmakeFlags = [ "-DBUILD_HSI:BOOl=OFF" ]; cmakeFlags = [ "-DBUILD_HSI:BOOl=OFF" ];
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
postInstall = '' postInstall = ''
for p in $out/bin/*; do for p in $out/bin/*; do

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-EkVE6BgoA1lo4oqlNETTxLILIVvGXspFyXykxpmYk8M="; sha256 = "sha256-EkVE6BgoA1lo4oqlNETTxLILIVvGXspFyXykxpmYk8M=";
}; };
NIX_CFLAGS_COMPILE = "-Wno-error"; env.NIX_CFLAGS_COMPILE = "-Wno-error";
meta = with lib; { meta = with lib; {
description = "It's like cat, but for images"; description = "It's like cat, but for images";

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation {
# gcc-10. Otherwise build fails as: # gcc-10. Otherwise build fails as:
# ld: src/util.o:(.bss+0x0): multiple definition of `progname'; /build/ccBZT2Za.o:(.bss+0x20): first defined here # 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 # https://github.com/danielgtaylor/jpeg-archive/issues/119
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [ makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc" "CC=${stdenv.cc.targetPrefix}cc"

View file

@ -33,8 +33,8 @@ mkDerivation rec {
xsimd xsimd
]; ];
NIX_CFLAGS_COMPILE = [ "-I${ilmbase.dev}/include/OpenEXR" ] env.NIX_CFLAGS_COMPILE = toString ([ "-I${ilmbase.dev}/include/OpenEXR" ]
++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy"; ++ 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. # 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. # Patch the PYTHONPATH so python scripts can import sip successfully.

View file

@ -15,7 +15,7 @@ mkDerivation rec {
sha256 = "1izmgjjp8mgyxv57sjjr05z7g7059ykb5wchlcn4wrnnb6aslnvn"; sha256 = "1izmgjjp8mgyxv57sjjr05z7g7059ykb5wchlcn4wrnnb6aslnvn";
}; };
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
buildInputs = [ buildInputs = [
qtbase qtdeclarative qttools qtwebengine eigen qtbase qtdeclarative qttools qtwebengine eigen

View file

@ -17,7 +17,7 @@ mkDerivation rec {
qmakeFlags = [ "PREFIX=${placeholder "out"}" ]; qmakeFlags = [ "PREFIX=${placeholder "out"}" ];
NIX_CFLAGS_COMPILE = "-I${graphicsmagick}/include/GraphicsMagick"; env.NIX_CFLAGS_COMPILE = "-I${graphicsmagick}/include/GraphicsMagick";
meta = with lib; { meta = with lib; {
description = "A cross-platform image editor with a powerful features and a very friendly graphical user interface"; 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" ]; outputs = [ "out" "dev" ];
# Fix build with cups deprecations etc. # Fix build with cups deprecations etc.
# See: https://github.com/NixOS/nixpkgs/issues/73334 # 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"; sha256 = "1n4xiic8lqnv3mqi7wpdv866gyyakax71gffv3n9427rmcld465i";
}; };
NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler"; env.NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler";
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
''; '';
# error: 'regparm' is not valid on this platform # 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__"; "-D__STRICT_ANSI__";
meta = with lib; { meta = with lib; {

View file

@ -132,7 +132,7 @@ stdenv.mkDerivation rec {
"-DOPTIX_ROOT_DIR=${optix}" "-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 # Since some dependencies are built with gcc 6, we need gcc 6's
# libstdc++ in our RPATH. Sigh. # libstdc++ in our RPATH. Sigh.

View file

@ -30,7 +30,7 @@ stdenv.mkDerivation {
# avoid build failures like: # avoid build failures like:
# ld: stats.o:/build/cataract-675e647/src/stats.h:24: multiple definition of # 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 # `stats_images'; cgg.o:/build/cataract-675e647/src/stats.h:24: first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
installPhase = '' installPhase = ''
mkdir $out/{bin,share} -p mkdir $out/{bin,share} -p

View file

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs"; sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs";
}; };
NIX_CFLAGS_COMPILE = builtins.toString ( env.NIX_CFLAGS_COMPILE = builtins.toString (
[ "-Wno-error=deprecated-declarations" ] [ "-Wno-error=deprecated-declarations" ]
++ lib.optionals (!stdenv.cc.isClang) [ ++ lib.optionals (!stdenv.cc.isClang) [
"-Wno-error=format-truncation" "-Wno-error=format-truncation"

View file

@ -22,7 +22,7 @@ stdenv.mkDerivation {
# ld: gmtp-preferences.o:src/main.h:72: multiple definition of # ld: gmtp-preferences.o:src/main.h:72: multiple definition of
# `scrolledwindowMain'; gmtp-about.o:src/main.h:72: first defined here # `scrolledwindowMain'; gmtp-about.o:src/main.h:72: first defined here
# TODO: can be removed when 1.4.0 is released. # TODO: can be removed when 1.4.0 is released.
NIX_CFLAGS_COMPILE = "-fcommon"; env.NIX_CFLAGS_COMPILE = "-fcommon";
preFixup = '' preFixup = ''
gappsWrapperArgs+=(--add-flags "--datapath $out/share"); 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 # Floating point behavior on i686 causes nmea.test failures. Preventing
# extended precision fixes this problem. # 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; doCheck = true;

View file

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
}; };
# glib-2.62 deprecations # glib-2.62 deprecations
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
nativeBuildInputs = [ pkg-config intltool ]; nativeBuildInputs = [ pkg-config intltool ];
buildInputs = [ buildInputs = [

View file

@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-amedKK9nplLVJTldeabN3/c+g/QesrdH+qx+rba2/4s="; 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-old-style-cast"
"-Wno-error" "-Wno-error"
"-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}" "-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}"

View file

@ -45,7 +45,7 @@ mkDerivation rec {
mv $out/lib/klayout $out/bin/ 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" 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 ]; 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 { desktopItems = lib.singleton (makeDesktopItem {
name = "lsd2dsl"; name = "lsd2dsl";

View file

@ -140,7 +140,7 @@ in stdenv.mkDerivation rec {
patchShebangs tools/get_wb_version.sh patchShebangs tools/get_wb_version.sh
''; '';
NIX_CFLAGS_COMPILE = [ env.NIX_CFLAGS_COMPILE = toString ([
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated # error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
"-Wno-error=deprecated-declarations" "-Wno-error=deprecated-declarations"
] ++ lib.optionals stdenv.isAarch64 [ ] ++ lib.optionals stdenv.isAarch64 [
@ -149,7 +149,7 @@ in stdenv.mkDerivation rec {
] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [ ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but problematic with some old GCCs # Needed with GCC 12 but problematic with some old GCCs
"-Wno-error=maybe-uninitalized" "-Wno-error=maybe-uninitalized"
]; ]);
cmakeFlags = [ cmakeFlags = [
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config" "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"

View file

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

View file

@ -117,9 +117,9 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DOCPN_BUNDLE_DOCS=true" ]; 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" "-DSQUISH_USE_SSE=0"
]; ]);
postInstall = lib.optionals stdenv.isDarwin '' postInstall = lib.optionals stdenv.isDarwin ''
mkdir -p $out/Applications mkdir -p $out/Applications

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation {
buildInputs = [ opencv4 ]; buildInputs = [ opencv4 ];
NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3"; env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Wpedantic -ffast-math -O3";
preInstall = '' preInstall = ''
mkdir -p $out/include/aruco mkdir -p $out/include/aruco

View file

@ -42,7 +42,7 @@ in
nativeBuildInputs = [cmake pkg-config ninja copyDesktopItems]; nativeBuildInputs = [cmake pkg-config ninja copyDesktopItems];
buildInputs = [qtbase qttools opencv4 procps eigen libXdmcp libevdev aruco]; 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; dontWrapQtApps = true;
cmakeFlags = [ cmakeFlags = [

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
"INSTALL_MANDIR=${placeholder "out"}/share/man/man1" "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 ]; 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. # Disable compiler warnings that clutter the build log.
# It seems to be a known issue for Eigen: # It seems to be a known issue for Eigen:
# http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221 # 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 # prusa-slicer uses dlopen on `libudev.so` at runtime
NIX_LDFLAGS = lib.optionalString withSystemd "-ludev"; NIX_LDFLAGS = lib.optionalString withSystemd "-ludev";

View file

@ -49,7 +49,7 @@ rustPlatform.buildRustPackage rec {
# enables pipewire API deprecated in 0.3.64 # enables pipewire API deprecated in 0.3.64
# fixes error caused by https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55 # 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; { meta = with lib; {
description = "A simple and elegant pipewire graph editor "; description = "A simple and elegant pipewire graph editor ";

View file

@ -29,7 +29,7 @@ mkDerivation rec {
qmakeFlags = [ "INSTALLROOT=$(out)" ]; qmakeFlags = [ "INSTALLROOT=$(out)" ];
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
postPatch = '' postPatch = ''
patchShebangs . patchShebangs .

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
mkdir locale mkdir locale
''; '';
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"; env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
meta = with lib; { meta = with lib; {
homepage = "https://dushistov.github.io/sdcv/"; homepage = "https://dushistov.github.io/sdcv/";

View file

@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
"-DwxWidgets_LIBRARIES=${wxGTK}/lib" "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
]; ];
NIX_CFLAGS_COMPILE = "-Wno-narrowing"; env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
meta = with lib; { meta = with lib; {
description = "Doom editor"; description = "Doom editor";

View file

@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
"-DwxWidgets_LIBRARIES=${wxGTK}/lib" "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
]; ];
NIX_CFLAGS_COMPILE = "-Wno-narrowing"; env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
meta = with lib; { meta = with lib; {
description = "Doom editor"; description = "Doom editor";

View file

@ -41,7 +41,7 @@ mkDerivation rec {
# Hence we use a C definition with NIX_CFLAGS_COMPILE # Hence we use a C definition with NIX_CFLAGS_COMPILE
./use-nix-path-in-autostart.patch ./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 = [ buildInputs = [
qtbase qtbase

View file

@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
]; ];
# Silences many warnings # 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" cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF"
# NSFilenamesPboardType is deprecated in 10.14+ # NSFilenamesPboardType is deprecated in 10.14+

View file

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

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ SDL SDL_image ]; 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; { meta = with lib; {
homepage = "https://brlcad.org/~erik/"; homepage = "https://brlcad.org/~erik/";

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "0ilx5mhh91ks7dwvykfyynh53l6vkkignjpwkkss8ss6b2k8gdbj"; sha256 = "0ilx5mhh91ks7dwvykfyynh53l6vkkignjpwkkss8ss6b2k8gdbj";
}; };
NIX_CFLAGS_COMPILE = "-O3"; env.NIX_CFLAGS_COMPILE = "-O3";
patches = [ (fetchpatch { patches = [ (fetchpatch {
name = "fix-libmicrohttpd-0-9-71.patch"; 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 ]; 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 = [ patches = [
./parse.patch # Fixes compilation error by avoiding redundant definitions. ./parse.patch # Fixes compilation error by avoiding redundant definitions.

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