treewide: NIX_*_COMPILE -> string
This commit is contained in:
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
||||
stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ patch-argp-fmtstream ]
|
||||
++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [ patch-throw-in-funcdef patch-shared ];
|
||||
|
||||
patchFlags = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "-p0";
|
||||
patchFlags = stdenv.lib.optional stdenv.hostPlatform.isDarwin "-p0";
|
||||
|
||||
preConfigure = stdenv.lib.optionalString stdenv.hostPlatform.isLinux "export CFLAGS='-fgnu89-inline'";
|
||||
|
||||
|
||||
@@ -13,10 +13,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
|
||||
"-Wno-nullability-extension"
|
||||
"-Wno-typedef-redefinition"
|
||||
];
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin
|
||||
"-Wno-nullability-extension -Wno-typedef-redefinition";
|
||||
|
||||
meta = with lib; {
|
||||
description = "AWS SDK for C common core";
|
||||
|
||||
@@ -27,9 +27,7 @@ stdenv.mkDerivation rec {
|
||||
cp ${gcc7PlatformPatch} glm/simd/platform.h
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.isDarwin [
|
||||
"-DGLM_COMPILER=0"
|
||||
];
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-DGLM_COMPILER=0";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $doc/share/doc/glm
|
||||
|
||||
@@ -47,12 +47,12 @@ stdenv.mkDerivation rec {
|
||||
# fit in the limit. https://github.com/NixOS/nix/pull/1085
|
||||
++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
NIX_CFLAGS_COMPILE = toString (
|
||||
# qgpgme uses Q_ASSERT which retains build inputs at runtime unless
|
||||
# debugging is disabled
|
||||
lib.optional (qtbase != null) "-DQT_NO_DEBUG"
|
||||
# https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html
|
||||
++ lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64";
|
||||
++ lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64");
|
||||
|
||||
checkInputs = [ which ];
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isx86_64 "-mno-fma";
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isx86_64 "-mno-fma";
|
||||
|
||||
# https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
|
||||
doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux";
|
||||
|
||||
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.isx86_64 "-mno-fma";
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isx86_64 "-mno-fma";
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
|
||||
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
propagatedBuildInputs = optional withAACS libaacs;
|
||||
|
||||
NIX_LDFLAGS = [
|
||||
NIX_LDFLAGS = toString [
|
||||
(optionalString withAACS "-L${libaacs}/lib -laacs")
|
||||
(optionalString withBDplus "-L${libbdplus}/lib -lbdplus")
|
||||
];
|
||||
|
||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# glib-2.62 deprecations
|
||||
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
|
||||
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
|
||||
|
||||
# Patches from Gentoo portage
|
||||
patches = [
|
||||
|
||||
@@ -208,7 +208,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;
|
||||
|
||||
@@ -206,13 +206,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
NIX_CFLAGS_COMPILE = toString (
|
||||
# with gcc7 the warnings blow the log over Hydra's limit
|
||||
[ "-Wno-expansion-to-defined" "-Wno-unused-local-typedefs" ]
|
||||
++ lib.optional stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin
|
||||
++ lib.optionals (stdenv.isFreeBSD || stdenv.isDarwin)
|
||||
[ "-I${glib.dev}/include/glib-2.0" "-I${glib.out}/lib/glib-2.0/include" ]
|
||||
++ lib.optional stdenv.isDarwin "-I${libcxx}/include/c++/v1";
|
||||
++ lib.optional stdenv.isDarwin "-I${libcxx}/include/c++/v1");
|
||||
|
||||
NIX_LDFLAGS = lib.optionalString (stdenv.isFreeBSD || stdenv.isDarwin) "-lglib-2.0";
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ let
|
||||
qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ]
|
||||
++ (args.qmakeFlags or []);
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
NIX_CFLAGS_COMPILE = toString (
|
||||
optional (!debug) "-DQT_NO_DEBUG"
|
||||
++ lib.toList (args.NIX_CFLAGS_COMPILE or []);
|
||||
++ lib.toList (args.NIX_CFLAGS_COMPILE or []));
|
||||
|
||||
cmakeFlags =
|
||||
(args.cmakeFlags or [])
|
||||
|
||||
@@ -200,20 +200,17 @@ stdenv.mkDerivation {
|
||||
done
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
[
|
||||
"-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields
|
||||
''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"''
|
||||
''-D${if compareVersion "5.11.0" >= 0 then "LIBRESOLV_SO" else "NIXPKGS_LIBRESOLV"}="${stdenv.cc.libc.out}/lib/libresolv"''
|
||||
''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
|
||||
]
|
||||
|
||||
++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
|
||||
NIX_CFLAGS_COMPILE = toString ([
|
||||
"-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields
|
||||
''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"''
|
||||
''-D${if compareVersion "5.11.0" >= 0 then "LIBRESOLV_SO" else "NIXPKGS_LIBRESOLV"}="${stdenv.cc.libc.out}/lib/libresolv"''
|
||||
''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
|
||||
] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
|
||||
++ lib.optionals withGtk3 [
|
||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
||||
]
|
||||
++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC";
|
||||
++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC");
|
||||
|
||||
prefixKey = "-prefix ";
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ in stdenv.mkDerivation {
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
stdenv.lib.optional stdenv.isDarwin "-mmacosx-version-min=10.9";
|
||||
stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9";
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
buildPhase = ''
|
||||
|
||||
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ libusb ];
|
||||
|
||||
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||
+ optionalString withMesa "${libGLU.out}/lib ${libGL.out}/lib ";
|
||||
|
||||
# Work around a bug in configure.
|
||||
NIX_CFLAGS_COMPILE = [ "-DHAVE_X11_XLIB_H=1" "-lX11" "-lcairo" "-Wno-narrowing" ];
|
||||
NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1 -lX11 -lcairo -Wno-narrowing";
|
||||
|
||||
preConfigure = "
|
||||
substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
|
||||
|
||||
Reference in New Issue
Block a user