Merge pull request #328678 from reckenrode/wv2-fixes

wv2: fix build with clang 16 and on Darwin
This commit is contained in:
Aleksana 2024-07-24 11:46:45 +08:00 committed by GitHub
commit 68020f0b5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 ];