diff --git a/pkgs/by-name/cp/cpptoml/add-limits-include.patch b/pkgs/by-name/cp/cpptoml/add-limits-include.patch new file mode 100644 index 000000000000..6ab767ad5b9f --- /dev/null +++ b/pkgs/by-name/cp/cpptoml/add-limits-include.patch @@ -0,0 +1,21 @@ +From c55a516e90133d89d67285429c6474241346d27a Mon Sep 17 00:00:00 2001 +From: Dirk Eddelbuettel +Date: Mon, 30 Nov 2020 09:41:49 -0600 +Subject: [PATCH] g++-11 requires limits header + +--- + include/cpptoml.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/cpptoml.h b/include/cpptoml.h +index 5a00da3..1dc9fd1 100644 +--- a/include/cpptoml.h ++++ b/include/cpptoml.h +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/pkgs/by-name/cp/cpptoml/package.nix b/pkgs/by-name/cp/cpptoml/package.nix index 888af1c18631..421f67b8260a 100644 --- a/pkgs/by-name/cp/cpptoml/package.nix +++ b/pkgs/by-name/cp/cpptoml/package.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { sha256 = "0zlgdlk9nsskmr8xc2ajm6mn1x5wz82ssx9w88s02icz71mcihrx"; }; + patches = [ + # Fix compilation with GCC 11. + # + ./add-limits-include.patch + ]; + nativeBuildInputs = [ cmake ]; cmakeFlags = [