summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-01-27 17:20:17 +0100
committerJan Tojnar <jtojnar@gmail.com>2022-01-27 18:07:23 +0100
commitd8bcc674c4bac48aedc7f421fcc2c3d0487a150a (patch)
tree8f8a2eda10ea67967e1cf0a95d51dcc42dfe4327
parentc4b9851332bcef5e4554e306df791b3b4b14409a (diff)
downloadnixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.tar
nixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.tar.gz
nixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.tar.bz2
nixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.tar.lz
nixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.tar.xz
nixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.tar.zst
nixpkgs-d8bcc674c4bac48aedc7f421fcc2c3d0487a150a.zip
gdal: fix build with latest poppler
Poppler 22.01.0 requires std=c++17:

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1027
-rw-r--r--pkgs/development/libraries/gdal/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index 124c0a48cde..3e5ae303dd7 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