From b7230e67df46c1ec73d7b9b782249a8382450d24 Mon Sep 17 00:00:00 2001 From: Simon Hollingshead Date: Sat, 24 Feb 2024 22:00:33 +0000 Subject: [PATCH] s2geometry: Build with C++14 instead of C++11. This fixes a breakage caused by a gtest version bump. --- pkgs/development/libraries/s2geometry/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/s2geometry/default.nix b/pkgs/development/libraries/s2geometry/default.nix index afd5ffa0a0a2..a8893b698a48 100644 --- a/pkgs/development/libraries/s2geometry/default.nix +++ b/pkgs/development/libraries/s2geometry/default.nix @@ -22,6 +22,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ openssl gtest ]; + # Default of C++11 is too low for gtest. + # In newer versions of s2geometry this can be done with cmakeFlags. + postPatch = '' + substituteInPlace CMakeLists.txt --replace "CMAKE_CXX_STANDARD 11" "CMAKE_CXX_STANDARD 14" + ''; + meta = with lib; { description = "Computational geometry and spatial indexing on the sphere"; homepage = "http://s2geometry.io/";