-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
mozc: init at unstable-2024-02-09, fcitx5-mozc: 2.26.4220.102 -> unstable-2024-02-09 #251706
Conversation
ae3b327
to
79e854f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not use mozc. The fcitx5-mozc diff is LGTM.
ea81e84
to
bc1b7ab
Compare
77604d5
to
8279c16
Compare
I'm struggling to keep the dependency hash stable. I'm not really sure what's causing the inconsistency though. I first thought it was caused by the zip code archives, so I mirrored the archive to a tracked git repository to ensure that it's reproducible, but it still breaks anyways. Anyone have any ideas? |
9fea5c6
to
8ebbe81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your effort to update mozc
! I've been trying to do this myself as well, but couldn't figure out how to package a Bazel project.
Unfortunately, I'm not familiar enough with either bazel or mozc
to offer help with the hash issue, but I do have a suggestion/request.
mozc
can optionally be built with mozc_emacs_helper
, which is a helper programs that enables integration of mozc
with Emacs.
Currently, mozc_emacs_helper
can be built and installed with ibus-engines.mozc
. But now that you factored out mozc
as a standalone package, I think it makes more sense for mozc_emacs_helper
to be provided by this new mozc
package rather than by ibus-engines.mozc
after this PR is merged.
Reading the build instructions in the mozc
repo, adding these lines should build mozc
with mozc_emacs_helper
. I tested this on my laptop and it seems to be working correctly.
What do you think of these changes?
PS: I have never submitted a review on GitHub before, I'm sorry if I'm not following the right format.
bazelTargets = [ | ||
"server:mozc_server" | ||
"gui/tool:mozc_tool" | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bazelTargets = [ | |
"server:mozc_server" | |
"gui/tool:mozc_tool" | |
]; | |
bazelTargets = [ | |
"server:mozc_server" | |
"gui/tool:mozc_tool" | |
"unix/emacs:mozc_emacs_helper" | |
]; |
Add mozc_emacs_helper
to build targets.
buildAttrs = { | ||
postPatch = '' | ||
sed -ri -e "s|^(LINUX_MOZC_SERVER_DIR = ).+|\1\"$out/lib/mozc\"|" mozc/src/config.bzl | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed -ri -e "s|^(EMACS_MOZC_HELPER_DIR = ).+|\1\"$out/bin\"|" mozc/src/config.bzl | |
Fix the install path for mozc_emacs_helper
.
mkdir -p $out/lib/mozc | ||
cp bazel-bin/server/mozc_server $out/lib/mozc/mozc_server | ||
cp bazel-bin/gui/tool/mozc_tool $out/lib/mozc/mozc_tool | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir -p $out/bin | |
cp bazel-bin/unix/emacs/mozc_emacs_helper $out/bin/mozc_emacs_helper | |
Install mozc_emacs_helper
.
Thanks for the suggestion, but I think this should be a separate package. The point of the If you're looking to make a package for this, you can look at |
Result of 2 packages built:
|
9bf4f7f
to
79c81c7
Compare
This doesn't really affect anything since nix takes care of this for us, but it can't hurt to be more explicit
It's now a single concise loop!
c5332be
to
96191d6
Compare
I rebased and updated the packages. I also made a new repository to solve the jawiki issue: https://github.com/musjj/jawiki-archive. Sorry for the late reply.
How would this work? Should it be split into 3 different packages like:
What do you think? I might wait out and see if @pineapplehunter's #314248 gets merged since it seems like it fulfills the concerns around modularity better. |
The split into |
Yeah, I think it's better to open a new PR. Closed in favor of: #346680 |
Description of changes
This upgrades
mozc
to the latest version (the last version was over 2 years old and suffers from some issues). Consequently, with the deprecation of the GYP I chose to move to the new Bazel build system.I'm really unfamiliar with Bazel, so I'd really appreciate it if anyone with experience can help check if everything's alright, especially in terms of reproducibility.
I also choose to modularize
mozc
as a library, so that other packagers can re-use it if they want to.AUR packages I used for reference:
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)