Skip to content

Commit

Permalink
mozc: use our protobuf (GCC 14 fix) (#366868)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Dec 23, 2024
2 parents 4726042 + 178429a commit de59a61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkgs/by-name/fc/fcitx5-mozc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
mozc,
nixosTests,
pkg-config,
protobuf_27,
python3,
stdenv,
unzip,
}:

buildBazelPackage {
pname = "fcitx5-mozc";
version = "2.30.5544.102";
version = "2.30.5544.102"; # make sure to update protobuf if needed

src = fetchFromGitHub {
owner = "fcitx";
Expand All @@ -38,6 +39,9 @@ buildBazelPackage {
];

postPatch = ''
# replace protobuf with our own
rm -r src/third_party/protobuf
cp -r ${protobuf_27.src} src/third_party/protobuf
sed -i -e 's|^\(LINUX_MOZC_SERVER_DIR = \).\+|\1"${mozc}/lib/mozc"|' src/config.bzl
'';

Expand Down
6 changes: 5 additions & 1 deletion pkgs/by-name/mo/mozc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
fetchFromGitHub,
qt6,
pkg-config,
protobuf_27,
bazel,
ibus,
unzip,
Expand All @@ -18,7 +19,7 @@ let
in
buildBazelPackage rec {
pname = "mozc";
version = "2.30.5544.102";
version = "2.30.5544.102"; # make sure to update protobuf if needed

src = fetchFromGitHub {
owner = "google";
Expand Down Expand Up @@ -63,6 +64,9 @@ buildBazelPackage rec {
bazelTargets = [ "package" ];

postPatch = ''
# replace protobuf with our own
rm -r src/third_party/protobuf
cp -r ${protobuf_27.src} src/third_party/protobuf
substituteInPlace src/config.bzl \
--replace-fail "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open" \
--replace-fail "/usr" "$out"
Expand Down

0 comments on commit de59a61

Please sign in to comment.