From 833851cd6e00221c69d166f752ee7b300dd57455 Mon Sep 17 00:00:00 2001 From: Badi Abdul-Wahid Date: Mon, 12 Mar 2018 02:04:28 -0400 Subject: [PATCH] qtlocation: fix darwin build A dependency (boost) makes use of `std::auto_ptr`, which is no longer supported in C++17 in Clang. This change re-enables `std::auto_ptr` capabilities. --- pkgs/development/libraries/qt-5/modules/qtlocation.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/pkgs/development/libraries/qt-5/modules/qtlocation.nix index 008583ebaf93..e8952e29cbaf 100644 --- a/pkgs/development/libraries/qt-5/modules/qtlocation.nix +++ b/pkgs/development/libraries/qt-5/modules/qtlocation.nix @@ -1,4 +1,4 @@ -{ qtModule, qtbase, qtmultimedia }: +{ stdenv, qtModule, qtbase, qtmultimedia }: qtModule { name = "qtlocation"; @@ -6,4 +6,11 @@ qtModule { outputs = [ "bin" "out" "dev" ]; # Linking with -lclipper fails with parallel build enabled enableParallelBuilding = false; + qmakeFlags = stdenv.lib.optional stdenv.isDarwin [ + # boost uses std::auto_ptr which has been disabled in clang with libcxx + # This flag re-enables this feature + # https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros + "QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" + ]; + }