sdcv: Fix build with glib 2.82

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4016
This commit is contained in:
Bobby Rong 2024-10-07 10:05:03 +08:00
parent ea193dfa5d
commit ddeb47d901
No known key found for this signature in database

View File

@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ glib gettext readline ];
postPatch = ''
# https://github.com/Dushistov/sdcv/pull/104
substituteInPlace src/stardict_lib.cpp --replace-fail \
"gchar *nextchar = g_utf8_next_char(sWord)" \
"gchar *nextchar = const_cast<gchar*>(g_utf8_next_char(sWord))"
'';
preInstall = ''
mkdir locale
'';