diff --git a/pkgs/development/libraries/gdbm/default.nix b/pkgs/development/libraries/gdbm/default.nix index 972e9022235a..830a311db706 100644 --- a/pkgs/development/libraries/gdbm/default.nix +++ b/pkgs/development/libraries/gdbm/default.nix @@ -4,9 +4,6 @@ stdenv.mkDerivation rec { pname = "gdbm"; 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 { url = "mirror://gnu/gdbm/${pname}-${version}.tar.gz"; sha256 = "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 67d3c35609e6..0febed9f9c96 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -118,7 +118,7 @@ stdenv.mkDerivation rec { "-Ddevbindir=${placeholder ''dev''}/bin" ]; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-Wno-error=nonnull" # Default for release buildtype but passed manually because # we're using plain diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index c2a5cfbed744..55b801b0b0d5 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -39,13 +39,13 @@ stdenv.mkDerivation rec { --replace "-Xlinker --version-script=$(VERSION_SCRIPT)" "-Xlinker" ''; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString ([ "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS" # 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\"" "-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 configureFlags = stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-tls"; diff --git a/pkgs/development/libraries/libpfm/default.nix b/pkgs/development/libraries/libpfm/default.nix index f48c605dafd6..3398d3feb94f 100644 --- a/pkgs/development/libraries/libpfm/default.nix +++ b/pkgs/development/libraries/libpfm/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (rec { "SYS=${stdenv.hostPlatform.uname.system}" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + NIX_CFLAGS_COMPILE = "-Wno-error"; meta = with stdenv.lib; { description = "Helper library to program the performance monitoring events"; diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix index 792a31bcf9f9..e6a57f1e38c4 100644 --- a/pkgs/development/libraries/libvdpau/default.nix +++ b/pkgs/development/libraries/libvdpau/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { configureFlags = stdenv.lib.optional stdenv.isLinux "--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" ]; diff --git a/pkgs/development/libraries/openal-soft/default.nix b/pkgs/development/libraries/openal-soft/default.nix index 76f2861428d6..20528ac9284f 100644 --- a/pkgs/development/libraries/openal-soft/default.nix +++ b/pkgs/development/libraries/openal-soft/default.nix @@ -35,9 +35,9 @@ stdenv.mkDerivation rec { ++ optional pulseSupport libpulseaudio ++ optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ]; - NIX_LDFLAGS = [] + NIX_LDFLAGS = toString ([] ++ optional alsaSupport "-lasound" - ++ optional pulseSupport "-lpulse"; + ++ optional pulseSupport "-lpulse"); meta = { description = "OpenAL alternative"; diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 5837361e01bc..d904637fcd38 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline"; - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = toString [ "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_JSON1" diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index d8a2298f3d3f..39e97f8473c8 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] hardeningDisable = [ "fortify" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + NIX_CFLAGS_COMPILE = "-Wno-error"; makeFlags = [ "PREFIX=$(out)" diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index 03bd0252c5ca..b31554d6cee4 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { "SHLIBDIR=$(out)/lib" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; + NIX_CFLAGS_COMPILE = "-Wno-error"; passthru = { inherit se_release se_url; }; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 3cc976a909dd..3462801c07c4 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -180,18 +180,18 @@ in stdenv.mkDerivation { --replace "SYSTEMD_CGROUP_AGENT_PATH" "_SYSTEMD_CGROUP_AGENT_PATH" ''; - NIX_CFLAGS_COMPILE = - [ # Can't say ${polkit.bin}/bin/pkttyagent here because that would - # lead to a cyclic dependency. - "-UPOLKIT_AGENT_BINARY_PATH" "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\"" + NIX_CFLAGS_COMPILE = toString [ + # Can't say ${polkit.bin}/bin/pkttyagent here because that would + # lead to a cyclic dependency. + "-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 - # currently running systemd (/run/current-system/systemd) so - # 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\"" + # Set the release_agent on /sys/fs/cgroup/systemd to the + # currently running systemd (/run/current-system/systemd) so + # 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_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 diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index e012d40271b5..6239e8395981 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ''; # 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 ]; buildInputs = [