diff --git a/pkgs/tools/misc/wv2/default.nix b/pkgs/tools/misc/wv2/default.nix index 14420c1c3908..3a7bd5d395a6 100644 --- a/pkgs/tools/misc/wv2/default.nix +++ b/pkgs/tools/misc/wv2/default.nix @@ -10,6 +10,15 @@ stdenv.mkDerivation rec { patches = [ ./fix-include.patch ]; + # Newer versions of clang default to C++17, which removes some deprecated APIs such as bind1st. + # Setting the language version to C++14 makes them available again. + cmakeFlags = lib.optionals stdenv.cc.isClang [ (lib.cmakeFeature "CMAKE_CXX_STANDARD" "14") ]; + + # Linking gobject explicitly fixes missing symbols (such as missing `_g_object_unref`) on Darwin. + preConfigure = lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS+=" $(pkg-config gobject-2.0 --libs)" + ''; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libgsf glib libxml2 ];