treewide: NIX_*_COMPILE -> string

This commit is contained in:
Robin Gloster 2019-10-30 02:29:30 +01:00 committed by Jan Tojnar
parent ab0cfd9e03
commit 5f2b92e3ec
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
61 changed files with 73 additions and 111 deletions

View File

@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
patches = [ ./darwin-limits.patch ]; patches = [ ./darwin-limits.patch ];
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-missing-sysroot"; NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework MultitouchSupport"; NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
postPatch = '' postPatch = ''
substituteInPlace src/core/makefile.x/makefile.osx \ substituteInPlace src/core/makefile.x/makefile.osx \

View File

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

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation {
cp lang/*.bin $out/share/pico/lang cp lang/*.bin $out/share/pico/lang
''; '';
NIX_CFLAGS_COMPILE = [ "-include stdint.h" ]; NIX_CFLAGS_COMPILE = "-include stdint.h";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Text-to-speech engine"; description = "Text-to-speech engine";

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-error=format-security"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=format-security";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://doomseeker.drdteam.org/; homepage = http://doomseeker.drdteam.org/;

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs"; sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs";
}; };
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = builtins.toString [
"-Wno-error=format-truncation" "-Wno-error=format-truncation"
"-Wno-error=deprecated-declarations" "-Wno-error=deprecated-declarations"
"-Wno-error=stringop-overflow" "-Wno-error=stringop-overflow"

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
}) })
]; ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" "-Wno-error=duplicate-decl-specifier" ]; NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=duplicate-decl-specifier";
meta = { meta = {
description = "An IRC proxy (bouncer)"; description = "An IRC proxy (bouncer)";

View File

@ -13,9 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ arpack spooles openblas ]; buildInputs = [ arpack spooles openblas ];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-I${spooles}/include/spooles";
"-I${spooles}/include/spooles"
];
patches = [ patches = [
./calculix.patch ./calculix.patch

View File

@ -23,9 +23,7 @@ stdenv.mkDerivation {
"SVN_INCLUDE=${subversion.dev}/include/subversion-1" "SVN_INCLUDE=${subversion.dev}/include/subversion-1"
]; ];
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lsvn_fs-1";
"-lsvn_fs-1"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/svn-all-fast-export/svn2git; homepage = https://github.com/svn-all-fast-export/svn2git;

View File

@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
make $checkFlags check || print_logs_and_fail make $checkFlags check || print_logs_and_fail
''; '';
NIX_CFLAGS_COMPILE = [ "-std=c99" ]; NIX_CFLAGS_COMPILE = "-std=c99";
hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "format"; hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "format";

View File

@ -53,9 +53,7 @@ rec {
patchPhase = '' patchPhase = ''
''; '';
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-DMINIMAL=ON";
"-DMINIMAL=ON"
];
}); });
in in
stdenv.mkDerivation ((optionalAttrs (stdenv.isLinux) { stdenv.mkDerivation ((optionalAttrs (stdenv.isLinux) {

View File

@ -13,10 +13,7 @@ stdenv.mkDerivation rec {
patchPhase = "sed -i /tini-static/d CMakeLists.txt"; patchPhase = "sed -i /tini-static/d CMakeLists.txt";
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37";
"-DPR_SET_CHILD_SUBREAPER=36"
"-DPR_GET_CHILD_SUBREAPER=37"
];
buildInputs = [ cmake glibc glibc.static ]; buildInputs = [ cmake glibc glibc.static ];

View File

@ -167,7 +167,7 @@ callPackage (import ./generic.nix (rec {
xenpmdpatch xenpmdpatch
]; ];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString [
# Fix build on Glibc 2.24 # Fix build on Glibc 2.24
"-Wno-error=deprecated-declarations" "-Wno-error=deprecated-declarations"
# Fix build with GCC8 # Fix build with GCC8

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
libxdg_basedir libxdg_basedir
]; ];
NIX_CFLAGS_COMPILE = [ "-fno-strict-aliasing" ]; NIX_CFLAGS_COMPILE = "-fno-strict-aliasing";
mesonFlags = [ mesonFlags = [
"-Dbuild_docs=true" "-Dbuild_docs=true"

View File

@ -128,7 +128,7 @@ stdenv.mkDerivation rec {
source "$setupHook" source "$setupHook"
''; '';
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
postInstall = '' postInstall = ''
# fix use of $out variable # fix use of $out variable

View File

@ -16,5 +16,5 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk2 intltool GConf enchant isocodes gnome_icon_theme ]; buildInputs = [ gtk2 intltool GConf enchant isocodes gnome_icon_theme ];
NIX_LDFLAGS = [ "-lgthread-2.0" ]; NIX_LDFLAGS = "-lgthread-2.0";
} }

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isGNU "-Wno-error=format-truncation"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
/* /*
** We patch out a very annoying 'feature' in ./configure, which ** We patch out a very annoying 'feature' in ./configure, which

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ]; buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];
NIX_CFLAGS_COMPILE = [ "-fPIC" ]; NIX_CFLAGS_COMPILE = "-fPIC";
postPatch = '' postPatch = ''
sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gambit rsync bash ] buildInputs = [ gambit rsync bash ]
++ buildInputs_libraries ++ buildInputs_staticLibraries; ++ buildInputs_libraries ++ buildInputs_staticLibraries;
NIX_CFLAGS_COMPILE = [ "-I${libmysqlclient}/include/mysql" "-L${libmysqlclient}/lib/mysql" ]; NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql";
postPatch = '' postPatch = ''
echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm

View File

@ -242,10 +242,7 @@ in rec {
'method->name_and_sig_as_C_string(), p2i(method->native_function()), p2i(entry)' || exit -1 'method->name_and_sig_as_C_string(), p2i(method->native_function()), p2i(entry)' || exit -1
''; '';
hardeningDisable = [ "fortify" ]; hardeningDisable = [ "fortify" ];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-Wno-error=format-overflow -Wno-error=nonnull";
"-Wno-error=format-overflow" # newly detected by gcc7
"-Wno-error=nonnull"
];
buildPhase = '' buildPhase = ''
export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild
export MX_CACHE_DIR=${makeMxCache jvmci8-mxcache} export MX_CACHE_DIR=${makeMxCache jvmci8-mxcache}

View File

@ -61,13 +61,13 @@ let
separateDebugInfo = true; separateDebugInfo = true;
NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; NIX_CFLAGS_COMPILE = "-Wno-error";
NIX_LDFLAGS = lib.optionals (!headless) [ NIX_LDFLAGS = toString (lib.optionals (!headless) [
"-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
] ++ lib.optionals (!headless && enableGnome2) [ ] ++ lib.optionals (!headless && enableGnome2) [
"-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
]; ]);
buildFlags = [ "all" ]; buildFlags = [ "all" ];

View File

@ -84,7 +84,7 @@ in makePackage {
''; '';
# glib-2.62 deprecations # glib-2.62 deprecations
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
stripDebugList = [ "." ]; stripDebugList = [ "." ];

View File

@ -88,9 +88,7 @@ stdenv.mkDerivation rec {
doCheck = false; doCheck = false;
# glib-2.62 deprecations # glib-2.62 deprecations
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
"-DGLIB_DISABLE_DEPRECATION_WARNINGS"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Application matching framework"; description = "Application matching framework";

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib ]; buildInputs = [ zlib ];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString [
"-Wno-error=deprecated-declarations" "-Wno-error=deprecated-declarations"
"-Wno-error=format-truncation" "-Wno-error=format-truncation"
"-Wno-error=cast-function-type" "-Wno-error=cast-function-type"

View File

@ -11,9 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ bison ]; buildInputs = [ bison ];
patches = [ ./gcc-4.3.3-fixes.patch ]; patches = [ ./gcc-4.3.3-fixes.patch ];
configureFlags = [ "CFLAGS=-O3" "CXXFLAGS=-O3" ]; configureFlags = [ "CFLAGS=-O3" "CXXFLAGS=-O3" ];
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lm";
"-lm"
];
doCheck = true; doCheck = true;
meta = { meta = {

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
owner = "puppetlabs"; owner = "puppetlabs";
}; };
NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ]; NIX_CFLAGS_COMPILE = "-Wno-error=catch-value";
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake sqlite libmysqlclient postgresql unixODBC ]; buildInputs = [ cmake sqlite libmysqlclient postgresql unixODBC ];
cmakeFlags = [ "--no-warn-unused-cli" ]; cmakeFlags = [ "--no-warn-unused-cli" ];
NIX_CFLAGS_COMPILE = [ "-I${libmysqlclient}/include/mysql" "-L${libmysqlclient}/lib/mysql" ]; NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://cppcms.com/sql/cppdb/; homepage = http://cppcms.com/sql/cppdb/;

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ gflags ]; buildInputs = [ gflags ];
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isAarch64 "-march=armv8-a+crc"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/google/crc32c; homepage = https://github.com/google/crc32c;

View File

@ -23,9 +23,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lbluetooth";
"-lbluetooth"
];
postInstall = '' postInstall = ''
# Some programs (for example, cabal-install) have problems with the double 0 # Some programs (for example, cabal-install) have problems with the double 0

View File

@ -52,9 +52,7 @@ stdenv.mkDerivation rec {
doCheck = false; # TODO: some issues with temporary files doCheck = false; # TODO: some issues with temporary files
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lpthread";
"-lpthread"
];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -40,9 +40,7 @@ stdenv.mkDerivation rec {
]; ];
# Allow use of old proj_api.h # Allow use of old proj_api.h
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1";
"-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"
];
# Prevent this: # Prevent this:
# #

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
sha256 = "1svhbjibm448ybq6gnjjzj0ak42srhihssafj0w402aj71lgaq4a"; sha256 = "1svhbjibm448ybq6gnjjzj0ak42srhihssafj0w402aj71lgaq4a";
}; };
NIX_CFLAGS_COMPILE = [ "-Wno-error=misleading-indentation" "-Wno-error=pointer-compare" ]; NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View File

@ -16,9 +16,8 @@ stdenv.mkDerivation rec {
substituteInPlace libtool --replace stdc++ c++ substituteInPlace libtool --replace stdc++ c++
''; '';
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.isDarwin [ NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin
"-D_XOPEN_SOURCE" "-Wno-aligned-allocation-unavailable" "-D_XOPEN_SOURCE -Wno-aligned-allocation-unavailable";
];
# some packages want to link to the static tcmalloc_minimal # some packages want to link to the static tcmalloc_minimal
# to drop the runtime dependency on gperftools # to drop the runtime dependency on gperftools

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
owner = "puppetlabs"; owner = "puppetlabs";
}; };
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = builtins.toString [
"-Wno-error=ignored-qualifiers" "-Wno-error=ignored-qualifiers"
"-Wno-error=class-memaccess" "-Wno-error=class-memaccess"
"-Wno-error=catch-value" "-Wno-error=catch-value"

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation {
buildInputs = [ libevent ]; buildInputs = [ libevent ];
propagatedBuildInputs = [ cyrus_sasl ]; propagatedBuildInputs = [ cyrus_sasl ];
NIX_CFLAGS_COMPILE = [ "-fpermissive"/*gcc7*/ ]; NIX_CFLAGS_COMPILE = "-fpermissive";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://libmemcached.org; homepage = https://libmemcached.org;

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b"; sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b";
}; };
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" ]; NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation";
buildInputs = [ ncurses perl ]; buildInputs = [ ncurses perl ];

View File

@ -30,7 +30,7 @@ mkDerivation rec {
# Make sure libqtav finds its libGL dependency at both link and run time # Make sure libqtav finds its libGL dependency at both link and run time
# by adding libGL to rpath. Not sure why it wasn't done automatically like # by adding libGL to rpath. Not sure why it wasn't done automatically like
# the other libraries as `libGL` is part of our `buildInputs`. # the other libraries as `libGL` is part of our `buildInputs`.
NIX_CFLAGS_LINK = [ "-Wl,-rpath,${libGL}/lib"]; NIX_CFLAGS_LINK = "-Wl,-rpath,${libGL}/lib";
preFixup = '' preFixup = ''
mkdir -p "$out/bin" mkdir -p "$out/bin"

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
owner = "puppetlabs"; owner = "puppetlabs";
}; };
NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ]; NIX_CFLAGS_COMPILE = "-Wno-error=catch-value";
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig unzip ]; 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";
cmakeFlags = [ cmakeFlags = [
(opencvFlag "TIFF" enableTIFF) (opencvFlag "TIFF" enableTIFF)

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
gst-plugins-bad gst-plugins-bad
gst-libav gst-libav
]); ]);
in [ in toString [
# This flag should be picked up through pkgconfig, but it isn't. # This flag should be picked up through pkgconfig, but it isn't.
"-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include" "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"

View File

@ -22,10 +22,10 @@ stdenv.mkDerivation rec {
++ lib.optionals withCplex [ "--with-cplex-incdir=${cplex}/cplex/include/ilcplex" "--with-cplex-lib=-lcplex${cplex.libSuffix}" ]; ++ lib.optionals withCplex [ "--with-cplex-incdir=${cplex}/cplex/include/ilcplex" "--with-cplex-lib=-lcplex${cplex.libSuffix}" ];
NIX_LDFLAGS = NIX_LDFLAGS =
lib.optional withCplex "-L${cplex}/cplex/bin/${cplex.libArch}"; lib.optionalString withCplex "-L${cplex}/cplex/bin/${cplex.libArch}";
# Compile errors # Compile errors
NIX_CFLAGS_COMPILE = [ "-Wno-cast-qual" ]; NIX_CFLAGS_COMPILE = "-Wno-cast-qual";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -21,7 +21,7 @@ buildPythonPackage rec {
libXi libXext libSM libICE libX11 libXi libXext libSM libICE libX11
]; ];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString [
"-I${pkgs.qt5.qtbase.dev}/include/QtCore" "-I${pkgs.qt5.qtbase.dev}/include/QtCore"
"-I${pkgs.qt5.qtbase.dev}/include/QtGui" "-I${pkgs.qt5.qtbase.dev}/include/QtGui"
"-I${pkgs.qt5.qtbase.dev}/include/QtOpenGL" "-I${pkgs.qt5.qtbase.dev}/include/QtOpenGL"

View File

@ -9,10 +9,11 @@ buildPythonPackage {
inherit disabled; inherit disabled;
doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2 doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2
NIX_CFLAGS_COMPILE = NIX_CFLAGS_COMPILE = toString (
# work around python distutils compiling C++ with $CC # work around python distutils compiling C++ with $CC
optional stdenv.isDarwin "-I${libcxx}/include/c++/v1" optional stdenv.isDarwin "-I${libcxx}/include/c++/v1"
++ optional (versionOlder protobuf.version "2.7.0") "-std=c++98"; ++ optional (versionOlder protobuf.version "2.7.0") "-std=c++98"
);
propagatedBuildInputs = [ google_apputils ]; propagatedBuildInputs = [ google_apputils ];
propagatedNativeBuildInputs = [ protobuf ]; # For protoc. propagatedNativeBuildInputs = [ protobuf ]; # For protoc.

View File

@ -65,7 +65,7 @@ rustPlatform.buildRustPackage rec {
# Fix the build with mariadb, which otherwise shows "error adding symbols: # Fix the build with mariadb, which otherwise shows "error adding symbols:
# DSO missing from command line" errors for libz and libssl. # DSO missing from command line" errors for libz and libssl.
NIX_LDFLAGS = lib.optional mysqlSupport "-lz -lssl -lcrypto"; NIX_LDFLAGS = lib.optionalString mysqlSupport "-lz -lssl -lcrypto";
meta = with lib; { meta = with lib; {
description = "Database tool for working with Rust projects that use Diesel"; description = "Database tool for working with Rust projects that use Diesel";

View File

@ -19,11 +19,8 @@ stdenv.mkDerivation {
patchShebangs ./configure patchShebangs ./configure
''; '';
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; NIX_CFLAGS_COMPILE = "-fpermissive";
NIX_LDFLAGS = "-ldl";
NIX_LDFLAGS = [
"-ldl"
];
meta = { meta = {
homepage = http://www.bergo.eng.br/eboard/; homepage = http://www.bergo.eng.br/eboard/;

View File

@ -41,10 +41,7 @@ in stdenv.mkDerivation {
done done
''; '';
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2 -I${SDL2_mixer}/include/SDL2";
"-I${SDL2.dev}/include/SDL2"
"-I${SDL2_mixer}/include/SDL2"
];
makeFlags = [ makeFlags = [
"SDLCONFIG=${SDL2}/bin/sdl2-config" "SDLCONFIG=${SDL2}/bin/sdl2-config"

View File

@ -44,9 +44,7 @@ stdenv.mkDerivation rec {
''; '';
*/ */
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lm";
"-lm"
];
meta = { meta = {
description = "3D dungeon crawling adventure"; description = "3D dungeon crawling adventure";

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "DESTDIR=$(out)" ]; makeFlags = [ "DESTDIR=$(out)" ];
NIX_LDFLAGS = [ "-lX11" ]; NIX_LDFLAGS = "-lX11";
postInstall = postInstall =
'' ''

View File

@ -41,9 +41,7 @@ stdenv.mkDerivation rec {
sconsFlags+=" DATADIR=$out/share/globulation2/glob2" sconsFlags+=" DATADIR=$out/share/globulation2/glob2"
''; '';
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lboost_system";
"-lboost_system"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "RTS without micromanagement"; description = "RTS without micromanagement";

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
libX11 SDL SDL_ttf SDL_image libGLU libGL expat zlib libX11 SDL SDL_ttf SDL_image libGLU libGL expat zlib
]; ];
NIX_LDFLAGS = [ "-lX11" ]; NIX_LDFLAGS = "-lX11";
meta = { meta = {
description = ''A multiplayer space combat game (client part)''; description = ''A multiplayer space combat game (client part)'';

View File

@ -16,10 +16,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libbfd libnl ncurses readline zlib ]; buildInputs = [ libbfd libnl ncurses readline zlib ];
# To avoid running into https://sourceware.org/bugzilla/show_bug.cgi?id=14243 we need to define: # To avoid running into https://sourceware.org/bugzilla/show_bug.cgi?id=14243 we need to define:
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = "-DPACKAGE=${pname} -DPACKAGE_VERSION=${version}";
"-DPACKAGE=${pname}"
"-DPACKAGE_VERSION=${version}"
];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -13,7 +13,7 @@ in stdenv.mkDerivation {
./do-not-create-sharedstatedir.patch ./do-not-create-sharedstatedir.patch
]; ];
NIX_CFLAGS_COMPILE = [ "-I${gnu-efi}/include/efi" "-Wno-error=address-of-packed-member" ]; NIX_CFLAGS_COMPILE = "-I${gnu-efi}/include/efi -Wno-error=address-of-packed-member";
# TODO: Just apply the disable to the efi subdir # TODO: Just apply the disable to the efi subdir
hardeningDisable = [ "stackprotector" ]; hardeningDisable = [ "stackprotector" ];

View File

@ -73,10 +73,10 @@ stdenv.mkDerivation {
++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
++ map (mod: "--add-module=${mod.src}") modules; ++ map (mod: "--add-module=${mod.src}") modules;
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString ([
"-I${libxml2.dev}/include/libxml2" "-I${libxml2.dev}/include/libxml2"
"-Wno-error=implicit-fallthrough" "-Wno-error=implicit-fallthrough"
] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations");
configurePlatforms = []; configurePlatforms = [];

View File

@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
${lib.concatMapStringsSep "\n" (x: x.install or "") needed} ${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
''; '';
NIX_CFLAGS_LINK = lib.optional withSystemd "-lsystemd" ++ lib.concatMap (x: x.NIX_CFLAGS_LINK or []) needed; NIX_CFLAGS_LINK = toString (lib.optional withSystemd "-lsystemd" ++ lib.concatMap (x: x.NIX_CFLAGS_LINK or []) needed);
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://uwsgi-docs.readthedocs.org/en/latest/; homepage = https://uwsgi-docs.readthedocs.org/en/latest/;

View File

@ -16,9 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libzip boost wt4 libconfig ]; buildInputs = [ libzip boost wt4 libconfig ];
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lpthread";
"-lpthread"
];
postInstall = '' postInstall = ''
ln -s ${wt4}/share/Wt/resources $out/share/fileshelter/docroot/resources ln -s ${wt4}/share/Wt/resources $out/share/fileshelter/docroot/resources

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "1qh04z1fsj1l6l12sz9yl2sy9hwlrnzac54hwrr7wvsgv90n9gbp"; sha256 = "1qh04z1fsj1l6l12sz9yl2sy9hwlrnzac54hwrr7wvsgv90n9gbp";
}; };
NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ]; NIX_CFLAGS_COMPILE = "-Wno-error=catch-value";
buildInputs = [ curl gnutls libgcrypt libuuid fuse ]; buildInputs = [ curl gnutls libgcrypt libuuid fuse ];
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
buildInputs = [ fuse3 glib ]; buildInputs = [ fuse3 glib ];
checkInputs = [ which python3Packages.pytest ]; checkInputs = [ which python3Packages.pytest ];
NIX_CFLAGS_COMPILE = stdenv.lib.optional NIX_CFLAGS_COMPILE = stdenv.lib.optionalString
(stdenv.hostPlatform.system == "i686-linux") (stdenv.hostPlatform.system == "i686-linux")
"-D_FILE_OFFSET_BITS=64"; "-D_FILE_OFFSET_BITS=64";

View File

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
++ optional jpegSupport libjpeg ++ optional jpegSupport libjpeg
++ optional pngSupport libpng; ++ optional pngSupport libpng;
NIX_CFLAGS_COMPILE = stdenv.lib.optional x11Support "-lSDL"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString x11Support "-lSDL";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A lightweight, highly customizable and scriptable image viewer"; description = "A lightweight, highly customizable and scriptable image viewer";

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
void sigint(int sig) FUNCATTR_NORETURN; void sigint(int sig) FUNCATTR_NORETURN;
-inline void init(void); -inline void init(void);
+static inline void init(void); +static inline void init(void);
/* clear stuff and exit */ /* clear stuff and exit */
--- a/src/options.c --- a/src/options.c
+++ b/src/options.c +++ b/src/options.c
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
# This code uses inline in the gnu89 sense: see http://clang.llvm.org/compatibility.html#inline # This code uses inline in the gnu89 sense: see http://clang.llvm.org/compatibility.html#inline
NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=gnu89" else null; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-std=gnu89";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A small and simple console-based live network and disk io bandwidth monitor"; description = "A small and simple console-based live network and disk io bandwidth monitor";

View File

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

View File

@ -15,9 +15,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
NIX_LDFLAGS = [ NIX_LDFLAGS = "-lm";
"-lm"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://gdmap.sourceforge.net; homepage = http://gdmap.sourceforge.net;

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation {
buildInputs = [ opencl-clhpp ocl-icd ]; buildInputs = [ opencl-clhpp ocl-icd ];
NIX_LDFLAGS = [ "-lOpenCL" ]; NIX_LDFLAGS = "-lOpenCL";
installPhase = '' installPhase = ''
install -Dm755 opencl-info $out/bin/opencl-info install -Dm755 opencl-info $out/bin/opencl-info