diff --git a/pkgs/applications/science/biology/cmtk/default.nix b/pkgs/applications/science/biology/cmtk/default.nix index b6286d11c8cb..36db47ad168a 100644 --- a/pkgs/applications/science/biology/cmtk/default.nix +++ b/pkgs/applications/science/biology/cmtk/default.nix @@ -12,7 +12,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + NIX_CFLAGS_COMPILE = [ + "-std=c++11" + (lib.optional stdenv.cc.isClang "-Wno-error=c++11-narrowing") + ]; meta = with lib; { description = "Computational Morphometry Toolkit "; diff --git a/pkgs/development/interpreters/gnu-apl/default.nix b/pkgs/development/interpreters/gnu-apl/default.nix index 0f666dd9af5d..836a09961faf 100644 --- a/pkgs/development/interpreters/gnu-apl/default.nix +++ b/pkgs/development/interpreters/gnu-apl/default.nix @@ -11,14 +11,16 @@ stdenv.mkDerivation rec { buildInputs = [ readline gettext ncurses ]; - # Needed with GCC 8 NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [ + # Needed with GCC 8 "-Wno-error=int-in-bool-context" "-Wno-error=class-memaccess" "-Wno-error=restrict" "-Wno-error=format-truncation" # Needed with GCC 10 "-Wno-error=maybe-uninitialized" + # Needed with GCC 11 + "-Wno-error=misleading-indentation" ]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference"); patchPhase = lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/development/libraries/belle-sip/default.nix b/pkgs/development/libraries/belle-sip/default.nix index 4032734416e4..e1b517f66bf5 100644 --- a/pkgs/development/libraries/belle-sip/default.nix +++ b/pkgs/development/libraries/belle-sip/default.nix @@ -30,9 +30,10 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DENABLE_STATIC=NO" ]; NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=cast-function-type" "-Wno-error=deprecated-declarations" "-Wno-error=format-truncation" - "-Wno-error=cast-function-type" + "-Wno-error=stringop-overflow" ]; propagatedBuildInputs = [ libantlr3c mbedtls bctoolbox ]; diff --git a/pkgs/development/libraries/clucene-core/default.nix b/pkgs/development/libraries/clucene-core/default.nix index 6f0eb8dfff00..c767e9f1d2f9 100644 --- a/pkgs/development/libraries/clucene-core/default.nix +++ b/pkgs/development/libraries/clucene-core/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { patches = [ ./gcc6.patch ]; + NIX_CFLAGS_COMPILE = [ + "-std=c++11" + ]; + meta = with lib; { description = "Core library for full-featured text search engine"; longDescription = '' diff --git a/pkgs/development/libraries/cpp-ipfs-api/default.nix b/pkgs/development/libraries/cpp-ipfs-api/default.nix index 839ddb9b76fb..315a477e72ad 100644 --- a/pkgs/development/libraries/cpp-ipfs-api/default.nix +++ b/pkgs/development/libraries/cpp-ipfs-api/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation { buildInputs = [ curl ]; propagatedBuildInputs = [ nlohmann_json ]; + NIX_CFLAGS_COMPILE = [ + "-Wno-error=range-loop-construct" + ]; + meta = with lib; { description = "IPFS C++ API client library"; homepage = "https://github.com/vasild/cpp-ipfs-api"; diff --git a/pkgs/development/python-modules/apsw/default.nix b/pkgs/development/python-modules/apsw/default.nix index 5adee7244dd3..8ff78f7ad636 100644 --- a/pkgs/development/python-modules/apsw/default.nix +++ b/pkgs/development/python-modules/apsw/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "apsw"; - version = "3.37.0-r1"; + version = "3.38.1-r1"; format = "setuptools"; disabled = isPyPy; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "rogerbinns"; repo = "apsw"; rev = version; - sha256 = "0p6rlbk7p6hj5mbmk1a8phazw3ym6hf5103zkxzg4p1jgjgi0xpl"; + hash = "sha256-pbb6wCu1T1mPlgoydB1Y1AKv+kToGkdVUjiom2vTqf4="; }; buildInputs = [ @@ -43,11 +43,12 @@ buildPythonPackage rec { disabledTests = [ "testCursor" + "testdb" + "testLargeObjects" "testLoadExtension" "testShell" "testVFS" "testVFSWithWAL" - "testdb" ] ++ lib.optionals stdenv.isDarwin [ # This is https://github.com/rogerbinns/apsw/issues/277 but # because we use pytestCheckHook we need to blacklist the test diff --git a/pkgs/servers/mail/archiveopteryx/default.nix b/pkgs/servers/mail/archiveopteryx/default.nix index 4cc612ef89a1..85a0756a1188 100644 --- a/pkgs/servers/mail/archiveopteryx/default.nix +++ b/pkgs/servers/mail/archiveopteryx/default.nix @@ -20,11 +20,14 @@ stdenv.mkDerivation rec { sed -i 's:READMEDIR = $(PREFIX):READMEDIR = '$out'/share/doc/archiveopteryx:' ./Jamsettings ''; - # fix build on gcc7+ + # fix build on gcc7+ and gcc11+ NIX_CFLAGS_COMPILE = builtins.toString [ + "-std=c++11" # c++17+ has errors "-Wno-error=builtin-declaration-mismatch" - "-Wno-error=implicit-fallthrough" "-Wno-error=deprecated-copy" + "-Wno-error=implicit-fallthrough" + "-Wno-error=mismatched-new-delete" + "-Wno-error=nonnull" ]; buildPhase = ''jam "-j$NIX_BUILD_CORES" ''; diff --git a/pkgs/tools/security/fwbuilder/default.nix b/pkgs/tools/security/fwbuilder/default.nix index 66d7a5a7537a..398e552ffe42 100644 --- a/pkgs/tools/security/fwbuilder/default.nix +++ b/pkgs/tools/security/fwbuilder/default.nix @@ -16,6 +16,10 @@ stdenv.mkDerivation rec { wrapQtAppsHook ]; + NIX_CFLAGS_COMPILE = [ + "-Wno-error=misleading-indentation" + ]; + meta = with lib; { description = "GUI Firewall Management Application"; homepage = "https://github.com/fwbuilder/fwbuilder"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d20d44a42a1..aa4133c1a669 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4621,7 +4621,9 @@ with pkgs; createrepo_c = callPackage ../tools/package-management/createrepo_c { }; - cromfs = callPackage ../tools/archivers/cromfs { }; + cromfs = callPackage ../tools/archivers/cromfs { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; cron = callPackage ../tools/system/cron { }; @@ -11902,7 +11904,9 @@ with pkgs; algol68g = callPackage ../development/compilers/algol68g { }; - armips = callPackage ../development/compilers/armips { }; + armips = callPackage ../development/compilers/armips { + stdenv = gcc10Stdenv; + }; arachne-pnr = callPackage ../development/compilers/arachne-pnr { }; @@ -14541,7 +14545,10 @@ with pkgs; buildJdk = jdk11_headless; buildJdkName = "java11"; runJdk = jdk11_headless; - stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; + stdenv = + if stdenv.cc.isClang then llvmPackages.stdenv + else if stdenv.cc.isGNU then gcc10Stdenv + else stdenv; bazel_self = bazel_4; }; @@ -25393,7 +25400,9 @@ with pkgs; droopy = python3Packages.callPackage ../applications/networking/droopy { }; - drumgizmo = callPackage ../applications/audio/drumgizmo { }; + drumgizmo = callPackage ../applications/audio/drumgizmo { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; dsf2flac = callPackage ../applications/audio/dsf2flac { }; @@ -32205,15 +32214,25 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) ApplicationServices; }; - bpp-core = callPackage ../development/libraries/science/biology/bpp-core { }; + bpp-core = callPackage ../development/libraries/science/biology/bpp-core { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; - bpp-phyl = callPackage ../development/libraries/science/biology/bpp-phyl { }; + bpp-phyl = callPackage ../development/libraries/science/biology/bpp-phyl { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; - bpp-popgen = callPackage ../development/libraries/science/biology/bpp-popgen { }; + bpp-popgen = callPackage ../development/libraries/science/biology/bpp-popgen { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; - bpp-seq = callPackage ../development/libraries/science/biology/bpp-seq { }; + bpp-seq = callPackage ../development/libraries/science/biology/bpp-seq { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; - bppsuite = callPackage ../applications/science/biology/bppsuite { }; + bppsuite = callPackage ../applications/science/biology/bppsuite { + stdenv = if stdenv.cc.isGNU then gcc10Stdenv else stdenv; + }; cd-hit = callPackage ../applications/science/biology/cd-hit { inherit (llvmPackages) openmp;