treewide: NIX_*_FLAGS -> string

gstqt5
Robin Gloster 2019-10-30 12:34:47 +01:00 committed by Jan Tojnar
parent f9f46dc327
commit 313da176d3
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
89 changed files with 108 additions and 158 deletions

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
"PREFIX=${placeholder ''out''}"
];
NIX_CFLAGS_COMPILE = [ "-DLSP_NO_EXPERIMENTAL" ];
NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL";
doCheck = true;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation {
preConfigure = "cd src";
buildInputs = [ alsaLib cmake makeWrapper libGLU libGL qt4 ];
NIX_LDFLAGS = [ "-lGL" "-lpthread" ];
NIX_LDFLAGS = "-lGL -lpthread";
postInstall = ''
wrapProgram $out/bin/pianobooster \

View File

@ -19,9 +19,7 @@ stdenv.mkDerivation rec {
preConfigure = "./autogen.sh";
NIX_LDFLAGS = [
"-lm"
];
NIX_LDFLAGS = "-lm";
meta = {
description = "JACK audio recorder";

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation {
git
python3
];
NIX_LDFLAGS = [ "-lz" ];
NIX_LDFLAGS = "-lz";
postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +

View File

@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
NIX_LDFLAGS = [ "-lz" ]
++ stdenv.lib.optionals (!isGdkQuartzBackend) [ "-lX11" ];
NIX_LDFLAGS = "-lz"
+ stdenv.lib.optionalString (!isGdkQuartzBackend) " -lX11";
desktopItem = makeDesktopItem {
name = name;

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = [ "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ];
NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
postInstall = ''
wrapProgram $out/bin/merkaartor \

View File

@ -62,10 +62,8 @@ in stdenv.mkDerivation rec {
patchShebangs tools/get_wb_version.sh
'';
NIX_CFLAGS_COMPILE = [
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
"-Wno-error=deprecated-declarations"
];
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
cmakeFlags = [
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"

View File

@ -35,8 +35,8 @@ stdenv.mkDerivation rec {
patches = [ ./CMakeLists.txt.patch ];
NIX_CFLAGS_COMPILE = optional sdlSupport "-I${SDL.dev}/include/SDL"
++ optional speechdSupport "-I${speechd}/include/speech-dispatcher";
NIX_CFLAGS_COMPILE = toString (optional sdlSupport "-I${SDL.dev}/include/SDL"
++ optional speechdSupport "-I${speechd}/include/speech-dispatcher");
# we choose only cmdline and speech-dispatcher speech options.
# espeak builtins is made for non-cmdline OS as winCE

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
];
NIX_CFLAGS_COMPILE=[ "-Wno-error=implicit-fallthrough" ];
NIX_CFLAGS_COMPILE= "-Wno-error=implicit-fallthrough";
meta = with stdenv.lib; {
homepage = http://www.netsurf-browser.org/;

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" ];
NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
buildInputs = [ libroxml proj libyamlcpp boost ];

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gettext gtk2 gconf curl libexif sqlite libxml2 ];
NIX_LDFLAGS = [ "-lm" ];
NIX_LDFLAGS = "-lm";
# bogus includes fail with newer library version
postPatch = ''

View File

@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ SDL SDL_image SDL_ttf SDL_gfx ];
NIX_CFLAGS_COMPILE = makeSDLFlags [ SDL SDL_image SDL_ttf SDL_gfx ];
NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ SDL SDL_image SDL_ttf SDL_gfx ]);
patches = [
./parse.patch # Fixes compilation error by avoiding redundant definitions.

View File

@ -31,8 +31,8 @@ rustPlatform.buildRustPackage rec {
make
'';
NIX_CFLAGS_COMPILE = [ "-Wno-error=sign-compare" ]
++ stdenv.lib.optional stdenv.isDarwin "-Wno-error=format-security";
NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare"
+ stdenv.lib.optionalString stdenv.isDarwin " -Wno-error=format-security";
doCheck = true;

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "1gjm0z4wa5vi9x1xk43rany5pffrwg958n180ahdj9a7sa8a4hpm";
};
NIX_CFLAGS_COMPILE = [
NIX_CFLAGS_COMPILE = builtins.toString [
# glib-2.62 deprecations
"-DGLIB_DISABLE_DEPRECATION_WARNINGS"
# override "-O0 -Werror" set by build system

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=cast-function-type" ];
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ pidgin libwebp libgcrypt gettext ];

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation {
patches = [ ./conference.patch ];
buildInputs = [ cmake lame id3lib libvorbis qt4 libogg ];
NIX_LDFLAGS = [ "-lvorbis" ];
NIX_LDFLAGS = "-lvorbis";
meta = {
homepage = http://atdot.ch/scr/;

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
propagatedUserEnvPkgs = [ GConf ];
NIX_CFLAGS_COMPILE = [
NIX_CFLAGS_COMPILE = toString [
"-I${libxml2.dev}/include/libxml2"
"-I${miniupnpc}/include/miniupnpc"
"-I${qtwebkit.dev}/include/QtWebKit"

View File

@ -46,7 +46,7 @@ in (if !buildClient then stdenv.mkDerivation else mkDerivation) rec {
enableParallelBuilding = true;
# Prevent ``undefined reference to `qt_version_tag''' in SSL check
NIX_CFLAGS_COMPILE = [ "-DQT_NO_VERSION_TAGGING=1" ];
NIX_CFLAGS_COMPILE = "-DQT_NO_VERSION_TAGGING=1";
buildInputs =
[ cmake makeWrapper qtbase ]

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
};
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
perl mkfiles.pl

View File

@ -46,7 +46,7 @@ in stdenv.mkDerivation {
];
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
preConfigure = ''./autogen.sh'';
configureFlags = [

View File

@ -50,9 +50,7 @@ stdenv.mkDerivation rec {
Mako cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl
];
NIX_LDFLAGS = [
"-lpthread"
];
NIX_LDFLAGS = "-lpthread";
enableParallelBuilding = true;

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
buildInputs = [ glib pkgconfig gtk2 hamlib ];

View File

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = [
NIX_CFLAGS_COMPILE = builtins.toString [
# igrone glib-2.62 deprecations
# Drop in next stable release.
"-DGLIB_DISABLE_DEPRECATION_WARNINGS"

View File

@ -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 = [
NIX_CFLAGS_COMPILE = toString [
# Fix build on Glibc 2.24.
"-Wno-error=deprecated-declarations"
# Fix build with GCC 8

View File

@ -148,11 +148,9 @@ stdenv.mkDerivation rec {
"-Dudev_dir=${placeholder "out"}/lib/udev"
];
NIX_CFLAGS_COMPILE = [
# Default for release buildtype but passed manually because
# we're using plain
"-DG_DISABLE_CAST_CHECKS"
];
NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS";
passthru = {
updateScript = gnome3.updateScript {

View File

@ -9,7 +9,7 @@ mkXfceDerivation {
nativeBuildInputs = [ automakeAddFlags ];
NIX_CFLAGS_COMPILE = [ "-I${dbus-glib.dev}/include/dbus-1.0" "-I${dbus.dev}/include/dbus-1.0" ];
NIX_CFLAGS_COMPILE = "-I${dbus-glib.dev}/include/dbus-1.0 -I${dbus.dev}/include/dbus-1.0";
postPatch = ''
substituteInPlace configure.ac.in --replace gio-2.0 gio-unix-2.0

View File

@ -14,13 +14,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_LDFLAGS = [
"-lcrypto"
"-lpcre"
"-lreadline"
"-lgc"
"-lsqlite3"
];
NIX_LDFLAGS = "-lcrypto -lpcre -lreadline -lgc -lsqlite3";
# we could create a separate derivation for the "written in c" version of nim
# used for bootstrapping, but koch insists on moving the nim compiler around

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--enable-tabling=yes" ];
NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
NIX_CFLAGS_COMPILE = "-fpermissive";
meta = {
homepage = http://www.dcc.fc.up.pt/~vsc/Yap/;

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ bison flex makeWrapper ];
propagatedBuildInputs = [ llvm gmp mpfr readline ];
NIX_LDFLAGS = [ "-lLLVMJIT" ];
NIX_LDFLAGS = "-lLLVMJIT";
postPatch = ''
for f in expr.cc matcher.cc printer.cc symtable.cc parserdefs.hh; do

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ sqlite ];
# needed for 1.116.0 to build with gcc7
NIX_CFLAGS_COMPILE = [
NIX_CFLAGS_COMPILE = toString [
"-Wno-implicit-fallthrough"
"-Wno-error=clobbered"
"-Wno-error=cast-function-type"

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig python ];
# error: ISO C does not support '__FUNCTION__' predefined identifier [-Werror=pedantic]
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
NIX_CFLAGS_COMPILE = "-Wno-error";
configureFlags = [ "--without-gobject" "CFLAGS=--std=gnu99" ];

View File

@ -221,7 +221,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake pkgconfig unzip ];
NIX_CFLAGS_COMPILE = lib.optional enableEXR "-I${ilmbase.dev}/include/OpenEXR";
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;

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
"-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}"
];
NIX_LDFLAGS = [ "-ldl" ];
NIX_LDFLAGS = "-ldl";
meta = {
description = "Prometheus Client Library for Modern C++";

View File

@ -18,8 +18,8 @@ stdenv.mkDerivation {
buildInputs = [ qt5.qtbase qca2-qt5 ];
nativeBuildInputs = [ qt5.qmake ];
NIX_CFLAGS_COMPILE = [ "-I${qca2-qt5}/include/Qca-qt5/QtCrypto" ];
NIX_LDFLAGS = [ "-lqca-qt5" ];
NIX_CFLAGS_COMPILE = "-I${qca2-qt5}/include/Qca-qt5/QtCrypto";
NIX_LDFLAGS = "-lqca-qt5";
meta = with stdenv.lib; {
description = "Qt library for OAuth authentication";

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "13mngf9kl0y2wfxqvkad0smdaag7k8fvw82b4312gx62nwhc1i6r";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" ];
NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation";
preConfigure = ''
cd src

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_LDFLAGS = [ "-lsqlite3" ];
NIX_LDFLAGS = "-lsqlite3";
meta = {
description = "A complete sqlite3-compatible CLI front-end for libspatialite";

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-dpdk=${dpdk}" ];
NIX_CFLAGS_COMPILE = [ "-mssse3" ]; # Necessary to compile.
NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
enableParallelBuilding = true;

View File

@ -100,16 +100,16 @@
sqlite = stdenv.mkDerivation rec {
pname = "sqlite-connector-odbc";
version = "0.9993";
src = fetchurl {
url = "http://www.ch-werner.de/sqliteodbc/sqliteodbc-${version}.tar.gz";
sha256 = "0dgsj28sc7f7aprmdd0n5a1rmcx6pv7170c8dfjl0x1qsjxim6hs";
};
buildInputs = [ unixODBC sqlite zlib libxml2 ];
configureFlags = [ "--with-odbc=${unixODBC}" ];
installTargets = [ "install-3" ];
# move libraries to $out/lib where they're expected to be
@ -117,7 +117,7 @@
mkdir -p "$out/lib"
mv "$out"/*.* "$out/lib"
'';
passthru = {
fancyName = "SQLite";
driver = "lib/libsqlite3odbc.so";

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=parentheses" ];
NIX_CFLAGS_COMPILE = "-Wno-error=parentheses";
nativeBuildInputs = [ cmake doxygen ];

View File

@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
# with gcc8, -Wclass-memaccess became part of -Wall and causes logging limit
# to be exceeded
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isGNU "-Wno-class-memaccess";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-class-memaccess";
nativeBuildInputs = [ gn ninja pkgconfig python ]
++ stdenv.lib.optionals stdenv.isDarwin [ xcbuild darwin.DarwinTools ];

View File

@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ zeroc_mcpp bzip2 expat openssl lmdb ]
++ lib.optionals stdenv.isDarwin [ darwin.cctools libiconv Security ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=class-memaccess" "-Wno-error=deprecated-copy" ];
NIX_CFLAGS_COMPILE = "-Wno-error=class-memaccess -Wno-error=deprecated-copy";
prePatch = lib.optional stdenv.isDarwin ''
substituteInPlace Make.rules.Darwin \

View File

@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
setSourceRoot = "export sourceRoot=${zookeeper.name}/src/c";
NIX_CFLAGS_COMPILE = stdenv.lib.optionals (!stdenv.isDarwin) [ "-Wno-error=format-overflow" "-Wno-error=stringop-truncation" ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-Wno-error=format-overflow -Wno-error=stringop-truncation";
buildInputs = [ zookeeper bash ];

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ocaml findlib ];
# Fix build for recent ncurses versions
NIX_CFLAGS_COMPILE = [ "-DNCURSES_INTERNALS=1" ];
NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
createFindlibDestdir = true;

View File

@ -12,7 +12,7 @@ buildPythonPackage rec {
buildInputs = [ udev ];
NIX_CFLAGS_LINK = [ "-ludev" ];
NIX_CFLAGS_LINK = "-ludev";
meta = with stdenv.lib; {
description = "Pythonic API to Linux uinput kernel module";

View File

@ -266,7 +266,7 @@ let
'';
# FIXME: Tensorflow uses dlopen() for CUDA libraries.
NIX_LDFLAGS = lib.optionals cudaSupport [ "-lcudart" "-lcublas" "-lcufft" "-lcurand" "-lcusolver" "-lcusparse" "-lcudnn" ];
NIX_LDFLAGS = lib.optionalString cudaSupport "-lcudart -lcublas -lcufft -lcurand -lcusolver -lcusparse -lcudnn";
hardeningDisable = [ "format" ];

View File

@ -16,9 +16,7 @@ mkDerivation rec {
nativeBuildInputs = [ cmake qttools ];
NIX_LDFLAGS = [
"-lQt5PrintSupport"
];
NIX_LDFLAGS = "-lQt5PrintSupport";
enableParallelBuilding = true;

View File

@ -25,13 +25,13 @@ stdenv.mkDerivation rec {
"--enable-remote-bitbang"
];
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
"-Wno-implicit-fallthrough"
"-Wno-format-truncation"
"-Wno-format-overflow"
"-Wno-error=tautological-compare"
"-Wno-error=array-bounds"
];
]);
postInstall = lib.optionalString stdenv.isLinux ''
mkdir -p "$out/etc/udev/rules.d"

View File

@ -21,9 +21,7 @@ stdenv.mkDerivation {
})
];
NIX_LDFLAGS = [
"-lpcre"
];
NIX_LDFLAGS = "-lpcre";
buildPhase = ''
HOME=$TMPDIR

View File

@ -40,14 +40,9 @@ mkDerivation {
];
# these libraries are only searched for at runtime so we need to force-link them
NIX_LDFLAGS = [
"-lgvc"
"-lmysqlclient"
"-lecpg"
"-lssl"
];
NIX_LDFLAGS = "-lgvc -lmysqlclient -lecpg -lssl";
NIX_CFLAGS_COMPILE = [ "-L${libmysqlclient}/lib/mysql" "-I${libmysqlclient}/include/mysql" ];
NIX_CFLAGS_COMPILE = "-L${libmysqlclient}/lib/mysql -I${libmysqlclient}/include/mysql";
qtWrapperArgs = [
''--prefix PATH : ${lib.getBin graphviz}/bin''

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
nvidia-texture-tools libsodium
] ++ lib.optional withEditor wxGTK;
NIX_CFLAGS_COMPILE = [
NIX_CFLAGS_COMPILE = toString [
"-I${xorgproto}/include/X11"
"-I${libX11.dev}/include/X11"
"-I${libXcursor.dev}/include/X11"

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_LDFLAGS = [ "-lX11" ];
NIX_LDFLAGS = "-lX11";
meta = {
description = "Mascot Constructive Pilot for X";

View File

@ -40,7 +40,7 @@ let
"-DOpenGL_GL_PREFERENCE=GLVND"
];
NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3
NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3
nativeBuildInputs = [ cmake doxygen graphviz ];

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
configureFlags = [ "--no-werror" ];
# Without this libvorbisfile.so is not getting linked properly for some reason.
NIX_CFLAGS_LINK = [ "-lvorbisfile" ];
NIX_CFLAGS_LINK = "-lvorbisfile";
preBuild = ''
sed -i 's/.dll//g' Makefile

View File

@ -15,9 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake ogre cegui boost sfml openal ois ];
NIX_LDFLAGS = [
"-lpthread"
];
NIX_LDFLAGS = "-lpthread";
meta = with stdenv.lib; {
description = "An open source, real time strategy game sharing game elements with the Dungeon Keeper series and Evil Genius.";

View File

@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_LINK = [ "-lopenal" ];
NIX_CFLAGS_LINK = "-lopenal";
meta = with stdenv.lib; {
description = "A compatible client of Ace of Spades 0.75";

View File

@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
"pokerth.pro"
];
NIX_CFLAGS_COMPILE = [ "-I${SDL.dev}/include/SDL" ];
NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL";
enableParallelBuilding = true;

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation {
buildInputs = [ ncurses ];
# Fix build for recent ncurses versions
NIX_CFLAGS_COMPILE = [ "-DNCURSES_INTERNALS=1" ];
NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
meta = with stdenv.lib; {
homepage = http://rogue.rogueforge.net/rogue-5-4/;

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-fftw=${fftwSinglePrec.dev}" ];
NIX_LDFLAGS = [ "-lopenal" ];
NIX_LDFLAGS = "-lopenal";
meta = with stdenv.lib; {
homepage = http://scorched3d.co.uk/;

View File

@ -91,7 +91,7 @@ EOF
enableParallelBuilding = true;
sconsFlags = [ "BUILD=release" "TARGET_ARCH=x64" ];
NIX_CFLAGS_COMPILE = ["-Wno-error=format-security"];
NIX_CFLAGS_COMPILE = "-Wno-error=format-security";
meta = with stdenv.lib; {
description = "The Dark Mod - stealth FPS inspired by the Thief series";
homepage = "http://www.thedarkmod.com";

View File

@ -41,11 +41,7 @@ in 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"
];
NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_ttf}/include/SDL2";
makeFlags = [ "config=release" ];

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libX11 libXpm libXt motif ];
NIX_CFLAGS_LINK = [ "-lXpm" ];
NIX_CFLAGS_LINK = "-lXpm";
configureFlags = [
"--with-x"

View File

@ -4,21 +4,15 @@
stdenv.mkDerivation rec {
name = "zoom-1.1.5";
src = fetchurl {
url = "https://www.logicalshift.co.uk/unix/zoom/${name}.tar.gz";
sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj";
};
buildInputs = [ perl expat xlibsWrapper freetype ];
NIX_CFLAGS_COMPILE = [
# Zoom doesn't add the right directory in the include path.
"-I" (freetype + "/include/freetype2")
# for gcc5; c11 inline semantics breaks the build
"-fgnu89-inline"
];
buildInputs = [ perl expat xlibsWrapper freetype ];
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2 -fgnu89-inline";
meta = with stdenv.lib; {
description = "Player for Z-Code, TADS and HUGO stories or games";

View File

@ -26,11 +26,7 @@ stdenv.mkDerivation rec {
libusb.dev
];
NIX_CFLAGS_COMPILE = [
"-Wno-error=deprecated-declarations"
"-Wno-error=parentheses"
"-Wno-error=unused-variable"
];
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=parentheses -Wno-error=unused-variable";
postPatch = ''
# remove vendored dependencies

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ flex bison ];
buildInputs = [ libxml2 ncurses ];
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ];
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
meta = with stdenv.lib; {
description = "Performance monitoring tool for Linux";

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus libnotify udisks2 gdk-pixbuf ];
NIX_CFLAGS_COMPILE = [ "-DENABLE_NOTIFICATIONS" ];
NIX_CFLAGS_COMPILE = "-DENABLE_NOTIFICATIONS";
installPhase = ''
mkdir -p $out/bin

View File

@ -33,7 +33,7 @@ let
sed -i '/management/d' CMakeLists.txt
'';
NIX_CFLAGS_COMPILE = [
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=deprecated-declarations"
"-Wno-error=int-in-bool-context"
"-Wno-error=maybe-uninitialized"

View File

@ -25,9 +25,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
# added to fix build with gcc7
NIX_CFLAGS_COMPILE = [
"-Wno-error" "-fpermissive"
];
NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive";
postPatch = ''
substituteInPlace Makefile.am \

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip postgresql ];
nativeBuildInputs = [ perl ];
NIX_CFLAGS_COMPILE = ["-I${libxml2.dev}/include/libxml2"];
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
preConfigure = ''
patchShebangs .

View File

@ -84,10 +84,8 @@ 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"
] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
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);

View File

@ -76,11 +76,10 @@ stdenv.mkDerivation rec {
"--with-table-redis"
];
NIX_CFLAGS_COMPILE =
stdenv.lib.optional enableRedis
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString enableRedis
"-I${hiredis}/include/hiredis -lhiredis"
++ stdenv.lib.optional enableMysql
"-L${libmysqlclient}/lib/mysql";
+ stdenv.lib.optionalString enableMysql
" -L${libmysqlclient}/lib/mysql";
meta = with stdenv.lib; {
homepage = https://www.opensmtpd.org/;

View File

@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
make makefiles CCARGS='${ccargs}' AUXLIBS='${auxlibs}'
'';
NIX_LDFLAGS = lib.optional withLDAP "-llber";
NIX_LDFLAGS = lib.optionalString withLDAP "-llber";
installTargets = [ "non-interactive-package" ];

View File

@ -66,7 +66,7 @@ in stdenv.mkDerivation {
--replace 'engine("wiredTiger")' 'engine("mmapv1")'
'';
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unused-command-line-argument";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";
sconsFlags = [
"--release"

View File

@ -60,10 +60,8 @@ in buildPythonApplication rec {
ipaddress idna
];
NIX_CFLAGS_COMPILE = [
# error: 'import_cairo' defined but not used
"-Wno-error=unused-function"
];
NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
setupPyBuildFlags = [
"--with-Xdummy"

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ expat proj bzip2 zlib boost postgresql lua ];
NIX_CFLAGS_COMPILE = [ "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ];
NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
meta = with stdenv.lib; {
description = "OpenStreetMap data to PostgreSQL converter";

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook intltool pkgconfig wrapGAppsHook ];
buildInputs = [ gtk2 hicolor-icon-theme ];
NIX_LDFLAGS = [ "-lgio-2.0" ];
NIX_LDFLAGS = "-lgio-2.0";
preFixup = ''
# Need which and xdotool on path to fix auto-pasting.

View File

@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libX11 libXtst qt4 ];
NIX_LDFLAGS = [ "-lX11" ];
NIX_LDFLAGS = "-lX11";
patchPhase = ''
cd src
substituteInPlace config --replace /bin/bash ${stdenv.shell}

View File

@ -49,9 +49,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = [
"-I${libxml2.dev}/include/libxml2"
];
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
postInstall = ''
rm -r $out/etc/cron.*

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0zlrg602q781q8dij62lwdprpfliyy9j1rqfqcz8p2wgndpivddj";
};
NIX_CFLAGS_COMPILE = [ "-DNCURSES_INTERNALS=1" ];
NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
preConfigure = ''
substituteInPlace curses/curses.ml --replace 'pp gcc' "pp $CC"

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation {
};
# These flags were added to compile v3.18. Try to lift them when updating.
NIX_CFLAGS_COMPILE = [ "-Wno-error=redundant-decls" "-Wno-error=format-nonliteral"
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=redundant-decls" "-Wno-error=format-nonliteral"
# these flags were added to build with gcc7
"-Wno-error=implicit-fallthrough"
"-Wno-error=format-truncation"

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ intltool pkgconfig ];
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
configureFlags = [
"--without-libnm-glib"

View File

@ -54,8 +54,8 @@ stdenv.mkDerivation rec {
sed 's|LIBS += -lstdc++.6||' -i Makefile
'';
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]
++ stdenv.lib.optional stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal";
NIX_CFLAGS_COMPILE = "-fpermissive"
+ stdenv.lib.optionalString stdenv.cc.isClang " -Wno-error=reserved-user-defined-literal";
meta = with stdenv.lib; {
description = "High-speed web-based traffic analysis and flow collection tool";

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation {
buildInputs = stdenv.lib.optional tlsSupport openssl;
NIX_LDFLAGS = stdenv.lib.optional tlsSupport [ "-lcrypto" ];
NIX_LDFLAGS = stdenv.lib.optionalString tlsSupport "-lcrypto";
meta = with stdenv.lib; {
platforms = platforms.linux;

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-lua=yes" ];
NIX_LDFLAGS = [ "${libpcap}/lib/libpcap.so" "${libcrafter}/lib/libcrafter.so" ];
NIX_LDFLAGS = "${libpcap}/lib/libpcap.so ${libcrafter}/lib/libcrafter.so";
preAutoreconf = ''
substituteInPlace Makefile.am --replace "noinst" ""

View File

@ -22,13 +22,13 @@ stdenv.mkDerivation rec {
done
'';
NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3
NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3
installPhase = ''
mkdir -p $out/bin
cp wrk $out/bin
'';
meta = with stdenv.lib; {
description = "HTTP benchmarking tool";
homepage = https://github.com/wg/wrk;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
patches = [ ./cert-paths.patch ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" ];
NIX_CFLAGS_COMPILE = "-Wno-error=unused-result";
postPatch = ''
# fix unprefixed ranlib (needed on cross)

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
./no-files-in-etc-and-var.patch
];
NIX_CFLAGS_COMPILE = optional withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1";
NIX_CFLAGS_COMPILE = optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1";
postInstall = optionalString (!stdenv.isDarwin) ''
# rename this plugin so netdata will look for setuid wrapper

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation {
sha256 = "1fbfcnm5gjish47wdvikcsgzlb5vnlfqlzzm6mwiw2j5qkq0914i";
};
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isi686 "-Wno-error=format";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-Wno-error=format";
buildPhase = "sh -e make.sh";

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
"BASHDIR=${placeholder "out"}/share/bash-completion/completions"
];
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1";
NIX_CFLAGS_COMPILE = stdenv.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

View File

@ -9,9 +9,7 @@ stdenv.mkDerivation {
buildInputs = [ libmtsupport libfacet libbtree multitrandata ];
NIX_LDFLAGS = [
"-lbtree"
];
NIX_LDFLAGS = "-lbtree";
patchPhase = ''
sed -i -e 's@\$(DESTDIR)/usr@'$out'@' \