From fa6b177e15839d044c13b3e1df2034e861e8a684 Mon Sep 17 00:00:00 2001 From: Ming-Chuan Date: Mon, 17 Aug 2026 16:29:35 -0700 Subject: [PATCH] ibus-libpinyin: fix build with opencc 1.4.0 --- .../ibus-engines/ibus-libpinyin/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix index 6412d8731901..4c4e7b813dff 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch2, autoreconfHook, gettext, gobject-introspection, @@ -32,6 +33,15 @@ stdenv.mkDerivation rec { hash = "sha256-3QZHovjzGifWLFVudCnJOwMn/M3Nzfn8CZ1HpQwzUVw="; }; + patches = [ + # Drop -std=c++0x, fix build with opencc >= 1.4.0 header files, which require C++17 + (fetchpatch2 { + name = "fix-build-with-opencc-1.4.patch"; + url = "https://github.com/libpinyin/ibus-libpinyin/commit/42ad7d20b803c10ce6d8921ccff5c6282bb4818c.patch?full_index=1"; + hash = "sha256-ndAJd+EEyluvjZL1gXM8HbfgEtwQETw0Lu1WAwcou4M="; + }) + ]; + nativeBuildInputs = [ autoreconfHook gettext