Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[staging-next] mozc: use our protobuf (GCC 14 fix) #366868

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading