1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

treewide: NIX_CFLAGS_COMPILE -> string

This commit is contained in:
Robin Gloster 2019-10-30 00:53:51 +01:00 committed by Jan Tojnar
parent 4db0860814
commit e5ded57aab
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
11 changed files with 21 additions and 24 deletions

View file

@ -4,9 +4,6 @@ stdenv.mkDerivation rec {
pname = "gdbm"; pname = "gdbm";
version = "1.18.1"; version = "1.18.1";
# FIXME: remove on update to > 1.18.1
NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-Wno-error=return-type" else null;
src = fetchurl { src = fetchurl {
url = "mirror://gnu/gdbm/${pname}-${version}.tar.gz"; url = "mirror://gnu/gdbm/${pname}-${version}.tar.gz";
sha256 = "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"; sha256 = "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6";

View file

@ -118,7 +118,7 @@ stdenv.mkDerivation rec {
"-Ddevbindir=${placeholder ''dev''}/bin" "-Ddevbindir=${placeholder ''dev''}/bin"
]; ];
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString [
"-Wno-error=nonnull" "-Wno-error=nonnull"
# Default for release buildtype but passed manually because # Default for release buildtype but passed manually because
# we're using plain # we're using plain

View file

@ -39,13 +39,13 @@ stdenv.mkDerivation rec {
--replace "-Xlinker --version-script=$(VERSION_SCRIPT)" "-Xlinker" --replace "-Xlinker --version-script=$(VERSION_SCRIPT)" "-Xlinker"
''; '';
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString ([
"-UDEFAULT_EGL_VENDOR_CONFIG_DIRS" "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS"
# FHS paths are added so that non-NixOS applications can find vendor files. # FHS paths are added so that non-NixOS applications can find vendor files.
"-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${addOpenGLRunpath.driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"" "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${addOpenGLRunpath.driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\""
"-Wno-error=array-bounds" "-Wno-error=array-bounds"
] ++ lib.optional stdenv.cc.isClang "-Wno-error"; ] ++ lib.optional stdenv.cc.isClang "-Wno-error");
# Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268 # Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268
configureFlags = stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-tls"; configureFlags = stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-tls";

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation (rec {
"SYS=${stdenv.hostPlatform.uname.system}" "SYS=${stdenv.hostPlatform.uname.system}"
]; ];
NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; NIX_CFLAGS_COMPILE = "-Wno-error";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Helper library to program the performance monitoring events"; description = "Helper library to program the performance monitoring events";

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
configureFlags = stdenv.lib.optional stdenv.isLinux configureFlags = stdenv.lib.optional stdenv.isLinux
"--with-module-dir=${mesa.drivers.driverLink}/lib/vdpau"; "--with-module-dir=${mesa.drivers.driverLink}/lib/vdpau";
NIX_LDFLAGS = if stdenv.isDarwin then "-lX11" else null; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lX11";
installFlags = [ "moduledir=$(out)/lib/vdpau" ]; installFlags = [ "moduledir=$(out)/lib/vdpau" ];

View file

@ -35,9 +35,9 @@ stdenv.mkDerivation rec {
++ optional pulseSupport libpulseaudio ++ optional pulseSupport libpulseaudio
++ optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ]; ++ optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
NIX_LDFLAGS = [] NIX_LDFLAGS = toString ([]
++ optional alsaSupport "-lasound" ++ optional alsaSupport "-lasound"
++ optional pulseSupport "-lpulse"; ++ optional pulseSupport "-lpulse");
meta = { meta = {
description = "OpenAL alternative"; description = "OpenAL alternative";

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline"; configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline";
NIX_CFLAGS_COMPILE = [ NIX_CFLAGS_COMPILE = toString [
"-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_COLUMN_METADATA"
"-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_DBSTAT_VTAB"
"-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_JSON1"

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
# command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
hardeningDisable = [ "fortify" ]; hardeningDisable = [ "fortify" ];
NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; NIX_CFLAGS_COMPILE = "-Wno-error";
makeFlags = [ makeFlags = [
"PREFIX=$(out)" "PREFIX=$(out)"

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
"SHLIBDIR=$(out)/lib" "SHLIBDIR=$(out)/lib"
]; ];
NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; NIX_CFLAGS_COMPILE = "-Wno-error";
passthru = { inherit se_release se_url; }; passthru = { inherit se_release se_url; };

View file

@ -180,18 +180,18 @@ in stdenv.mkDerivation {
--replace "SYSTEMD_CGROUP_AGENT_PATH" "_SYSTEMD_CGROUP_AGENT_PATH" --replace "SYSTEMD_CGROUP_AGENT_PATH" "_SYSTEMD_CGROUP_AGENT_PATH"
''; '';
NIX_CFLAGS_COMPILE = NIX_CFLAGS_COMPILE = toString [
[ # Can't say ${polkit.bin}/bin/pkttyagent here because that would # Can't say ${polkit.bin}/bin/pkttyagent here because that would
# lead to a cyclic dependency. # lead to a cyclic dependency.
"-UPOLKIT_AGENT_BINARY_PATH" "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\"" "-UPOLKIT_AGENT_BINARY_PATH" "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\""
# Set the release_agent on /sys/fs/cgroup/systemd to the # Set the release_agent on /sys/fs/cgroup/systemd to the
# currently running systemd (/run/current-system/systemd) so # currently running systemd (/run/current-system/systemd) so
# that we don't use an obsolete/garbage-collected release agent. # that we don't use an obsolete/garbage-collected release agent.
"-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\"" "-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\""
"-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\"" "-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\""
]; ];
doCheck = false; # fails a bunch of tests doCheck = false; # fails a bunch of tests

View file

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
''; '';
# do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries # do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-msse2" "-mfpmath=sse" ]; NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse";
nativeBuildInputs = [ pkgconfig autoconf automake gnum4 libtool perl gettext ]; nativeBuildInputs = [ pkgconfig autoconf automake gnum4 libtool perl gettext ];
buildInputs = [ buildInputs = [