diff --git a/pkgs/applications/audio/mbrola/default.nix b/pkgs/applications/audio/mbrola/default.nix index 888ae82cdbab..c67d30fc3dc6 100644 --- a/pkgs/applications/audio/mbrola/default.nix +++ b/pkgs/applications/audio/mbrola/default.nix @@ -26,6 +26,10 @@ let # required for cross compilation makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + installPhase = '' runHook preInstall install -D Bin/mbrola $out/bin/mbrola @@ -49,4 +53,3 @@ in ln -s '${mbrola-voices}/data' "$out/share/mbrola/voices" ln -s '${bin}/bin' "$out/" '' - diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index fe89869809e9..388afd1f45ac 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -158,7 +158,11 @@ in stdenv.mkDerivation (finalAttrs: { doCheck = true; env = { - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16"; + NIX_CFLAGS_COMPILE = toString ( + [ ] + ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ] + ++ lib.optionals stdenv.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ] + ); # Check if librsvg was built with --disable-pixbuf-loader. PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; diff --git a/pkgs/applications/networking/browsers/lynx/default.nix b/pkgs/applications/networking/browsers/lynx/default.nix index 1cad8d577710..51bbb96cbab4 100644 --- a/pkgs/applications/networking/browsers/lynx/default.nix +++ b/pkgs/applications/networking/browsers/lynx/default.nix @@ -46,6 +46,10 @@ stdenv.mkDerivation rec { nuke-refs cfg_defs.h ''; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + meta = with lib; { description = "Text-mode web browser"; homepage = "https://lynx.invisible-island.net/"; diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix index 204f0e1311fa..0d5a667059b0 100644 --- a/pkgs/applications/video/obs-studio/default.nix +++ b/pkgs/applications/video/obs-studio/default.nix @@ -162,6 +162,7 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=sign-compare" # https://github.com/obsproject/obs-studio/issues/10200 + "-Wno-error=stringop-overflow=" ]; dontWrapGApps = true; diff --git a/pkgs/by-name/gn/gnome-font-viewer/package.nix b/pkgs/by-name/gn/gnome-font-viewer/package.nix index c05243ecb529..070f9f903845 100644 --- a/pkgs/by-name/gn/gnome-font-viewer/package.nix +++ b/pkgs/by-name/gn/gnome-font-viewer/package.nix @@ -58,6 +58,10 @@ stdenv.mkDerivation rec { # Do not run meson-postinstall.sh preConfigure = "sed -i '2,$ d' meson-postinstall.sh"; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + passthru = { updateScript = gnome.updateScript { packageName = "gnome-font-viewer"; diff --git a/pkgs/by-name/sd/SDL_image/package.nix b/pkgs/by-name/sd/SDL_image/package.nix index ce6824b09d0b..8e0f0b2f8d95 100644 --- a/pkgs/by-name/sd/SDL_image/package.nix +++ b/pkgs/by-name/sd/SDL_image/package.nix @@ -59,6 +59,10 @@ stdenv.mkDerivation (finalAttrs: { libwebp ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + outputs = [ "out" "dev" diff --git a/pkgs/by-name/se/seahorse/package.nix b/pkgs/by-name/se/seahorse/package.nix index 127dcf23a7a5..820d71de4a7a 100644 --- a/pkgs/by-name/se/seahorse/package.nix +++ b/pkgs/by-name/se/seahorse/package.nix @@ -81,6 +81,14 @@ stdenv.mkDerivation rec { patchShebangs build-aux/gpg_check_version.py ''; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-function-declaration" + "-Wno-error=int-conversion" + "-Wno-error=return-mismatch" + ]; + }; + preCheck = '' # Add “org.gnome.crypto.pgp” GSettings schema to path # to make it available for “gpgme-backend” test. diff --git a/pkgs/by-name/vl/vlc/package.nix b/pkgs/by-name/vl/vlc/package.nix index 83154aa24906..6f0957de2b0e 100644 --- a/pkgs/by-name/vl/vlc/package.nix +++ b/pkgs/by-name/vl/vlc/package.nix @@ -212,6 +212,8 @@ stdenv.mkDerivation (finalAttrs: { # set the path to the compiler BUILDCC = "${pkgsBuildBuild.stdenv.cc}/bin/gcc"; PKG_CONFIG_WAYLAND_SCANNER_WAYLAND_SCANNER = "wayland-scanner"; + } // lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; } // lib.optionalAttrs (!stdenv.hostPlatform.isAarch) { LIVE555_PREFIX = live555; }; diff --git a/pkgs/development/compilers/colm/default.nix b/pkgs/development/compilers/colm/default.nix index 6ec15a0ebdf9..7db574022bfa 100644 --- a/pkgs/development/compilers/colm/default.nix +++ b/pkgs/development/compilers/colm/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper asciidoc autoreconfHook ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion"; + }; + doCheck = true; postInstall = '' diff --git a/pkgs/development/compilers/mcpp/default.nix b/pkgs/development/compilers/mcpp/default.nix index 9db55e29ccdb..b1785a3e0575 100644 --- a/pkgs/development/compilers/mcpp/default.nix +++ b/pkgs/development/compilers/mcpp/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation (finalAttrs: { hash= "sha256-T4feegblOeG+NU+c+PAobf8HT8KDSfcINkRAa1hNpkY="; }; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + patches = [ ./readlink.patch ]; diff --git a/pkgs/development/libraries/aalib/default.nix b/pkgs/development/libraries/aalib/default.nix index 903364ea27f6..8ab4a8452da7 100644 --- a/pkgs/development/libraries/aalib/default.nix +++ b/pkgs/development/libraries/aalib/default.nix @@ -29,6 +29,10 @@ stdenv.mkDerivation rec { configureFlags = [ "--without-x" "--with-ncurses=${ncurses.dev}" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + postInstall = '' mkdir -p $dev/bin mv $bin/bin/aalib-config $dev/bin/aalib-config diff --git a/pkgs/development/libraries/accountsservice/default.nix b/pkgs/development/libraries/accountsservice/default.nix index 1a5f03f635bc..05c72673ded4 100644 --- a/pkgs/development/libraries/accountsservice/default.nix +++ b/pkgs/development/libraries/accountsservice/default.nix @@ -74,6 +74,14 @@ stdenv.mkDerivation rec { libxcrypt ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=deprecated-declarations" + "-Wno-error=implicit-function-declaration" + "-Wno-error=return-mismatch" + ]; + }; + mesonFlags = [ "-Dadmin_group=wheel" "-Dlocalstatedir=/var" diff --git a/pkgs/development/libraries/chmlib/default.nix b/pkgs/development/libraries/chmlib/default.nix index df65e78ff51f..baa67d8fb267 100644 --- a/pkgs/development/libraries/chmlib/default.nix +++ b/pkgs/development/libraries/chmlib/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + meta = with lib; { homepage = "http://www.jedrea.com/chmlib"; license = licenses.lgpl2; diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index 0b151bfc719a..f8b24e8604cc 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -47,6 +47,10 @@ stdenv.mkDerivation rec { "CFLAGS=-DTIME_WITH_SYS_TIME" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + installFlags = lib.optionals stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ]; passthru.tests = { diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 4e8226c1904a..e3db6cbda39e 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -823,6 +823,13 @@ stdenv.mkDerivation (finalAttrs: { buildFlags = [ "all" ] ++ optional buildQtFaststart "tools/qt-faststart"; # Build qt-faststart executable + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=incompatible-pointer-types" + "-Wno-error=int-conversion" + ]; + }; + doCheck = stdenv.hostPlatform == stdenv.buildPlatform; # Fails with SIGABRT otherwise FIXME: Why? diff --git a/pkgs/development/libraries/gtk/2.x.nix b/pkgs/development/libraries/gtk/2.x.nix index ed0900ee1a92..44f6e438ea38 100644 --- a/pkgs/development/libraries/gtk/2.x.nix +++ b/pkgs/development/libraries/gtk/2.x.nix @@ -116,6 +116,13 @@ stdenv.mkDerivation (finalAttrs: { "ac_cv_path_GDK_PIXBUF_CSOURCE=${buildPackages.gdk-pixbuf.dev}/bin/gdk-pixbuf-csource" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-int" + "-Wno-error=incompatible-pointer-types" + ]; + }; + enableParallelBuilding = true; installFlags = [ diff --git a/pkgs/development/libraries/gtksourceview/3.x.nix b/pkgs/development/libraries/gtksourceview/3.x.nix index fb5c72e8b34d..6f14a68d4885 100644 --- a/pkgs/development/libraries/gtksourceview/3.x.nix +++ b/pkgs/development/libraries/gtksourceview/3.x.nix @@ -35,6 +35,10 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./3.x-nix_share_path.patch ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + enableParallelBuilding = true; doCheck = stdenv.isLinux; diff --git a/pkgs/development/libraries/lcms/default.nix b/pkgs/development/libraries/lcms/default.nix index 9a957a119243..cdb994578b29 100644 --- a/pkgs/development/libraries/lcms/default.nix +++ b/pkgs/development/libraries/lcms/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { patches = [ ./cve-2013-4276.patch ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + outputs = [ "bin" "dev" "out" "man" ]; doCheck = false; # fails with "Error in Linear interpolation (2p): Must be i=8000, But is n=8001" diff --git a/pkgs/development/libraries/libcddb/default.nix b/pkgs/development/libraries/libcddb/default.nix index 11a0c259dfdb..56459fe07d4f 100644 --- a/pkgs/development/libraries/libcddb/default.nix +++ b/pkgs/development/libraries/libcddb/default.nix @@ -16,6 +16,10 @@ stdenv.mkDerivation rec { "ac_cv_func_realloc_0_nonnull=yes" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + doCheck = false; # fails 3 of 5 tests with locale errors meta = with lib; { diff --git a/pkgs/development/libraries/libcdio/default.nix b/pkgs/development/libraries/libcdio/default.nix index 820ac97a434f..90b902a4c88e 100644 --- a/pkgs/development/libraries/libcdio/default.nix +++ b/pkgs/development/libraries/libcdio/default.nix @@ -35,6 +35,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + doCheck = !stdenv.isDarwin; meta = with lib; { diff --git a/pkgs/development/libraries/libgee/default.nix b/pkgs/development/libraries/libgee/default.nix index 0ae1886ebb62..0ffa3f5e1713 100644 --- a/pkgs/development/libraries/libgee/default.nix +++ b/pkgs/development/libraries/libgee/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation (finalAttrs: { env = { PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0"; PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; + } // lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; }; passthru = { diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix index c196b137555d..31f4130d663d 100644 --- a/pkgs/development/libraries/libgphoto2/default.nix +++ b/pkgs/development/libraries/libgphoto2/default.nix @@ -47,6 +47,10 @@ stdenv.mkDerivation rec { # These are mentioned in the Requires line of libgphoto's pkg-config file. propagatedBuildInputs = [ libexif ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + hardeningDisable = [ "format" ]; postInstall = diff --git a/pkgs/development/libraries/libgpod/default.nix b/pkgs/development/libraries/libgpod/default.nix index a81f9587b3be..5d4e0253be8d 100644 --- a/pkgs/development/libraries/libgpod/default.nix +++ b/pkgs/development/libraries/libgpod/default.nix @@ -67,6 +67,13 @@ stdenv.mkDerivation rec { libimobiledevice ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-int" + "-Wno-error=incompatible-pointer-types" + ]; + }; + meta = with lib; { homepage = "https://sourceforge.net/projects/gtkpod/"; description = "Library used by gtkpod to access the contents of an ipod"; diff --git a/pkgs/development/libraries/libx86/default.nix b/pkgs/development/libraries/libx86/default.nix index 1abefa8f4374..85b799f3e487 100644 --- a/pkgs/development/libraries/libx86/default.nix +++ b/pkgs/development/libraries/libx86/default.nix @@ -20,6 +20,10 @@ stdenv.mkDerivation rec { sed -e s@/usr@@ -i Makefile ''; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + meta = with lib; { description = "Real-mode x86 code emulator"; maintainers = with maintainers; [ raskin ]; diff --git a/pkgs/development/libraries/mbedtls/generic.nix b/pkgs/development/libraries/mbedtls/generic.nix index e87a133eb2a1..bb869fea31e4 100644 --- a/pkgs/development/libraries/mbedtls/generic.nix +++ b/pkgs/development/libraries/mbedtls/generic.nix @@ -47,6 +47,10 @@ stdenv.mkDerivation rec { "-DGEN_FILES=off" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=calloc-transposed-args"; + }; + doCheck = true; # Parallel checking causes test failures diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index dd3c6aaea354..5d3b1042d9e3 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -116,6 +116,17 @@ stdenv.mkDerivation rec { env = { PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; PKG_CONFIG_SYSTEMD_SYSUSERS_DIR = "${placeholder "out"}/lib/sysusers.d"; + + # HACK: We want to install policy files files to $out/share but polkit + # should read them from /run/current-system/sw/share on a NixOS system. + # Similarly for config files in /etc. + # With autotools, it was possible to override Make variables + # at install time but Meson does not support this + # so we need to convince it to install all files to a temporary + # location using DESTDIR and then move it to proper one in postInstall. + DESTDIR = "dest"; + } // lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; }; mesonFlags = [ @@ -131,14 +142,6 @@ stdenv.mkDerivation rec { "-Dsession_tracking=${if useSystemd then "libsystemd-login" else "libelogind"}" ]; - # HACK: We want to install policy files files to $out/share but polkit - # should read them from /run/current-system/sw/share on a NixOS system. - # Similarly for config files in /etc. - # With autotools, it was possible to override Make variables - # at install time but Meson does not support this - # so we need to convince it to install all files to a temporary - # location using DESTDIR and then move it to proper one in postInstall. - env.DESTDIR = "dest"; inherit doCheck; diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix index fe181d37f6bf..e87f1f9eb945 100644 --- a/pkgs/development/libraries/unixODBCDrivers/default.nix +++ b/pkgs/development/libraries/unixODBCDrivers/default.nix @@ -52,6 +52,10 @@ buildFlags = if stdenv.isDarwin then [ "maodbc" ] else null; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + installTargets = if stdenv.isDarwin then [ "install/fast" ] else null; # see the top of the file for an explanation diff --git a/pkgs/development/libraries/volume-key/default.nix b/pkgs/development/libraries/volume-key/default.nix index 1991f2d6d7f9..931eaf1d6748 100644 --- a/pkgs/development/libraries/volume-key/default.nix +++ b/pkgs/development/libraries/volume-key/default.nix @@ -35,6 +35,13 @@ stdenv.mkDerivation rec { "pythondir=$(py)/${python3.sitePackages}" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-function-declaration" + "-Wno-error=int-conversion" + ]; + }; + doCheck = false; # fails 1 out of 1 tests, needs `certutil` meta = with lib; { diff --git a/pkgs/development/python-modules/curl-cffi/default.nix b/pkgs/development/python-modules/curl-cffi/default.nix index 28f8eb2da729..bb0e353d4d57 100644 --- a/pkgs/development/python-modules/curl-cffi/default.nix +++ b/pkgs/development/python-modules/curl-cffi/default.nix @@ -1,4 +1,5 @@ { + stdenv, lib, buildPythonPackage, fetchFromGitHub, @@ -31,6 +32,10 @@ buildPythonPackage rec { certifi ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + pythonImportsCheck = [ "curl_cffi" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/gevent/default.nix b/pkgs/development/python-modules/gevent/default.nix index 1e38def4560e..02df1ed58604 100644 --- a/pkgs/development/python-modules/gevent/default.nix +++ b/pkgs/development/python-modules/gevent/default.nix @@ -1,4 +1,5 @@ { + stdenv, lib, fetchPypi, buildPythonPackage, @@ -54,6 +55,10 @@ buildPythonPackage rec { zope-interface ] ++ lib.optionals (!isPyPy) [ greenlet ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + # Bunch of failures. doCheck = false; diff --git a/pkgs/tools/cd-dvd/brasero/default.nix b/pkgs/tools/cd-dvd/brasero/default.nix index c601c05cbb2e..34225dd8bd2a 100644 --- a/pkgs/tools/cd-dvd/brasero/default.nix +++ b/pkgs/tools/cd-dvd/brasero/default.nix @@ -39,6 +39,10 @@ in stdenv.mkDerivation rec { gappsWrapperArgs+=(--prefix PATH : "${binpath}") ''; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + meta = with lib; { description = "Gnome CD/DVD Burner"; homepage = "https://gitlab.gnome.org/GNOME/brasero"; diff --git a/pkgs/tools/misc/expect/default.nix b/pkgs/tools/misc/expect/default.nix index 102120a8604e..e86ab381a41c 100644 --- a/pkgs/tools/misc/expect/default.nix +++ b/pkgs/tools/misc/expect/default.nix @@ -38,6 +38,11 @@ tcl.mkTclDerivation rec { nativeBuildInputs = [ autoreconfHook makeWrapper ]; strictDeps = true; + + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + hardeningDisable = [ "format" ]; postInstall = '' diff --git a/pkgs/tools/misc/hddtemp/default.nix b/pkgs/tools/misc/hddtemp/default.nix index beaa9018d2bf..17313e8d17ab 100644 --- a/pkgs/tools/misc/hddtemp/default.nix +++ b/pkgs/tools/misc/hddtemp/default.nix @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { "--with-db-path=${placeholder "out"}/share/hddtemp/hddtemp.db" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + postInstall = '' install -Dm444 ${db} $out/share/hddtemp/hddtemp.db ''; diff --git a/pkgs/tools/networking/vpnc/default.nix b/pkgs/tools/networking/vpnc/default.nix index d5fd324719b4..7a8a6c2b9c5d 100644 --- a/pkgs/tools/networking/vpnc/default.nix +++ b/pkgs/tools/networking/vpnc/default.nix @@ -27,6 +27,10 @@ stdenv.mkDerivation { "SCRIPT_PATH=${vpnc-scripts}/bin/vpnc-script" ] ++ lib.optional opensslSupport "OPENSSL_GPL_VIOLATION=yes"; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + postPatch = '' patchShebangs src/makeman.pl ''; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 52bf1b19da26..5ead0baa805c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -7305,10 +7305,16 @@ with self; { DBI = buildPerlPackage { pname = "DBI"; version = "1.644"; + src = fetchurl { url = "mirror://cpan/authors/id/H/HM/HMBRAND/DBI-1.644.tar.gz"; hash = "sha256-Ipe5neCeZwhmQLWQaZ4OmC+0adpjqT/ijcFHgtt6U8g="; }; + + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + }; + postInstall = lib.optionalString (perl ? crossVersion) '' mkdir -p $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI cat > $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI.pm <