From d8bcc674c4bac48aedc7f421fcc2c3d0487a150a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 27 Jan 2022 17:20:17 +0100 Subject: [PATCH] gdal: fix build with latest poppler Poppler 22.01.0 requires std=c++17: https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1027 --- pkgs/development/libraries/gdal/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 124c0a48cde6..3e5ae303dd77 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -62,7 +62,11 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - CXXFLAGS = "-fpermissive"; + CXXFLAGS = lib.concatStringsSep " " [ + "-fpermissive" + # poppler uses std::optional + "-std=c++17" + ]; # - Unset CC and CXX as they confuse libtool. # - teach gdal that libdf is the legacy name for libhdf