-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
ibus-rime: Init at 1.4.0 #77877
ibus-rime: Init at 1.4.0 #77877
Conversation
Sorry I should have done more testing before opening this ticket. Currently ibus fails to switch to rime input method due to some path issue. I'm trying to fix it ASAP |
}; | ||
|
||
# FIXME: Replace brise (deprecated) with rime/plum | ||
buildInputs = [ pkgconfig cmake librime ibus libnotify brise ]; |
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.
buildInputs = [ pkgconfig cmake librime ibus libnotify brise ]; | |
nativeBuildInputs = [ | |
pkgconfig | |
cmake | |
]; | |
buildInputs = [ | |
librime | |
ibus | |
libnotify | |
brise | |
]; |
install -m 644 -t $out/share/ibus-rime/icons/ ${src}/icons/*.png | ||
''; | ||
|
||
enableParallelBuilding = true; |
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.
CMake builds in parallel by default.
cmakeFlags = [ "-DRIME_DATA_DIR=${brise}/share/rime-data" ]; | ||
|
||
# Copied from Makefile as cmake will override it | ||
installPhase = '' |
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.
Whhy not use the CMake's default install phase?
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.
The repo (ibus-rime) provides install target in the hand-written Makefile instead of defining it in CMake.
So 've got to copy that script out
Maybe I'll make a PR to it later
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.
Then the comment should read CMake build scripts do not provide install target, or something.
Also it should be possible to use something like:
installFlags = [
"-f" "../Makefile"
"PREFIX=${placeholder ''out''}"
"builddir=." # maybe not necessary not sure if make -f works relative to $PWD or the Makefile
];
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've changed the comment. But can't figure out how to use installFlags
I'll just use the installPhase
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.
Something like this might work better:
--- a/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix
+++ b/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix
@@ -41,6 +41,10 @@ stdenv.mkDerivation rec {
"-DRIME_DATA_DIR=${brise}/share/rime-data"
];
+ installFlags = [
+ "PREFIX=${placeholder ''out''}"
+ ];
+
# Fix hard-coded paths references on rime-data and icons
preBuild = ''
sed -i ../rime_config.h -E \
@@ -48,17 +52,10 @@ stdenv.mkDerivation rec {
-e "s|(IBUS_RIME_ICONS_DIR).+$|\1 \"$out/share/ibus-rime/icons\"|"
'';
- # CMake script does not provide install phrase
- installPhase = ''
- install -m 755 -d $out/share/ibus/component
- install -m 644 -t $out/share/ibus/component/ ${src}/rime.xml
-
- install -m 755 -d $out/lib/ibus-rime
- install -m 755 -t $out/lib/ibus-rime/ ibus-engine-rime
-
- install -m 755 -d $out/share/ibus-rime
- install -m 755 -d $out/share/ibus-rime/icons
- install -m 644 -t $out/share/ibus-rime/icons/ ${src}/icons/*.png
+ preInstall = ''
+ # CMake script does not provide install phrase,
+ # we need to use the Makefile in the source tree.
+ cd ..
'';
# The ibus config rime.xml hard-coded binary path for ibus-engine-rime
Of course, it would be best if the install
target were added to CMakeLists.txt
. I opened an issue about that: rime/ibus-rime#108
The package was tested on my system and ibus could use rime properly |
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
Any update here? |
homepage = https://github.com/rime/ibus-rime; | ||
downloadPage = https://github.com/rime/ibus-rime/releases; | ||
description = "【中州韻】Rime for Linux/IBus"; | ||
license = licenses.gpl3; |
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.
gpl3
is unclear, use gpl3Plus
or gpl3Only
. See https://discourse.nixos.org/t/lib-licenses-gpl3-co-are-now-deprecated/8206 for more details.
Opened rime/ibus-rime#107
|
||
nativeBuildInputs = [ | ||
cmake | ||
pkgconfig |
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.
In new expressions, pkg-config
should be used instead of the pkgconfig
alias.
@@ -2512,6 +2512,8 @@ in | |||
protobuf = pkgs.protobuf.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); | |||
}; | |||
|
|||
rime = callPackage ../tools/inputmethods/ibus-engines/ibus-rime { }; |
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.
The commit message should match ibus-engines.rime
.
cmakeFlags = [ "-DRIME_DATA_DIR=${brise}/share/rime-data" ]; | ||
|
||
# Copied from Makefile as cmake will override it | ||
installPhase = '' |
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.
Something like this might work better:
--- a/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix
+++ b/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix
@@ -41,6 +41,10 @@ stdenv.mkDerivation rec {
"-DRIME_DATA_DIR=${brise}/share/rime-data"
];
+ installFlags = [
+ "PREFIX=${placeholder ''out''}"
+ ];
+
# Fix hard-coded paths references on rime-data and icons
preBuild = ''
sed -i ../rime_config.h -E \
@@ -48,17 +52,10 @@ stdenv.mkDerivation rec {
-e "s|(IBUS_RIME_ICONS_DIR).+$|\1 \"$out/share/ibus-rime/icons\"|"
'';
- # CMake script does not provide install phrase
- installPhase = ''
- install -m 755 -d $out/share/ibus/component
- install -m 644 -t $out/share/ibus/component/ ${src}/rime.xml
-
- install -m 755 -d $out/lib/ibus-rime
- install -m 755 -t $out/lib/ibus-rime/ ibus-engine-rime
-
- install -m 755 -d $out/share/ibus-rime
- install -m 755 -d $out/share/ibus-rime/icons
- install -m 644 -t $out/share/ibus-rime/icons/ ${src}/icons/*.png
+ preInstall = ''
+ # CMake script does not provide install phrase,
+ # we need to use the Makefile in the source tree.
+ cd ..
'';
# The ibus config rime.xml hard-coded binary path for ibus-engine-rime
Of course, it would be best if the install
target were added to CMakeLists.txt
. I opened an issue about that: rime/ibus-rime#108
Dup of #87735 |
Motivation for this change
Add ibus binding for rime input method
Things done
sandbox
innix.conf
on non-NixOS linux)macOSNot applicablenix-shell -p nixpkgs-review --run "nixpkgs-review wip"
Tested execution of all binary files (usually inNot applicable./result/bin/
)nix path-info -S
before and after)