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-typing-booster: init at 2.1.1 #46779
Conversation
/cc @ninjarai4 would you mind reviewing and testing this? |
|
||
postInstall = '' | ||
for i in $out/bin/emoji-picker $out/libexec/ibus-setup-typing-booster $out/libexec/ibus-engine-typing-booster; do | ||
wrapProgram "$i" \ |
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.
Why not use wrapGAppsHook
?
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.
It definitely needs to be used, otherwise the booster crashes with “Settings schema 'org.freedesktop.ibs.engine.typing-booster' is not installed”
bf643b1
to
485296b
Compare
@jtojnar good catch! Does the change look fine now? :) |
postInstall = '' | ||
for i in ibus-{engine,setup}-typing-booster; do | ||
wrapProgram $out/libexec/$i \ | ||
--prefix LD_LIBRARY_PATH : "${m17n_lib}/lib" |
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.
You can use gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${m17n_lib}/lib")
in preFixup
to make wrapGAppsHook
apply it.
buildInputs = [ python ibus gtk3 m17n_lib ]; | ||
|
||
preBuild = '' | ||
export GI_TYPELIB_PATH="${mkRepoPaths [ gtk3 pango.out gdk_pixbuf atk ibus ]}" |
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.
Add gobjectIntrospection
to nativeBuildInputs
to populate the variable automatically.
Also, the commit tag should be the attribute name ( |
485296b
to
ff6a2fe
Compare
fixed. Thanks a lot for helping and explaining how to use |
6390d6d
to
f1c0675
Compare
sha256 = "01kpxplk9nh56f32fkq3nnsqykbzpi7pcxbfp38dq0prgrhw9a6b"; | ||
}; | ||
|
||
nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper wrapGAppsHook gobjectIntrospection ]; |
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.
You can drop makeWrapper
now.
meta = with stdenv.lib; { | ||
homepage = https://mike-fabian.github.io/ibus-typing-booster/; | ||
license = licenses.gpl2; | ||
description = "ibus-typing-booster is a completion input method for faster typing."; |
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.
No need to have the package name in the description. See https://repology.org/metapackage/ibus-typing-booster/information#Summaries for examples.
|
||
meta = with stdenv.lib; { | ||
homepage = https://mike-fabian.github.io/ibus-typing-booster/; | ||
license = licenses.gpl2; |
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.
Seems to be licensed under gpl3Plus
.
b158f00
to
8b795c3
Compare
fixed. |
@@ -0,0 +1,39 @@ | |||
{ stdenv, fetchFromGitHub, autoreconfHook, python3, ibus, pkgconfig, gtk3, m17n_lib | |||
, pango, gdk_pixbuf, atk, wrapGAppsHook, gobjectIntrospection |
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.
You can clean this list a bit.
8b795c3
to
adb53e3
Compare
Success on x86_64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
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.
Just picking some nits in the docs.
doc/package-notes.xml
Outdated
<section xml:id="sec-ibus-typing-booster"> | ||
<title>ibus-engines.typing-booster</title> | ||
|
||
<para>This package is an ibus-based completion method to speedup typing.</para> |
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.
speedup is a noun, speed up is a verb.
doc/package-notes.xml
Outdated
<para>This package is an ibus-based completion method to speedup typing.</para> | ||
|
||
<section xml:id="sec-ibus-typing-booster-activate"> | ||
<title>Activate engine</title> |
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.
Try using “Activating the engine” or “Enabling the engine”, imperative form does not really suit titles.
doc/package-notes.xml
Outdated
<link xlink:href="https://mike-fabian.github.io/ibus-typing-booster/documentation.html">upstream docs</link>. | ||
</para> | ||
<para> | ||
On NixOS you explicitly need to enable <literal>ibus</literal> with given engines |
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 would add a comma after “On NixOS” but again, it might not be necessary.
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.
Isn't this just an object at the beginning of a sentence? AFAIK such expressions don't need a comma.
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.
You are probably right. After rereading it, the commas seem pointless.
doc/package-notes.xml
Outdated
<title>Activate engine</title> | ||
|
||
<para> | ||
IBus needs to be configured accordingly to activate <literal>typing-booster</literal>. The configuration |
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 would add a comma after “IBus needs to be configured accordingly” clause but we should probably check with a native speaker.
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 100% sure here, but I thought that infinitive sentences at the end don't necessarily need the comma.
doc/package-notes.xml
Outdated
</section> | ||
|
||
<section xml:id="sec-ibus-typing-booster-emoji-picker"> | ||
<title>Builtin emoji picker</title> |
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.
“built-in” is more common spelling in the docs.
doc/package-notes.xml
Outdated
|
||
<para> | ||
The <literal>ibus-engines.typing-booster</literal> package contains a program | ||
named <literal>emoji-picker</literal>. In order to ensure it's working properly, |
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.
Do not use contractions in formal writing.
doc/package-notes.xml
Outdated
<link xlink:href="https://mike-fabian.github.io/ibus-typing-booster/documentation.html">upstream docs</link>. | ||
</para> | ||
<para> | ||
On NixOS you explicitly need to enable <literal>ibus</literal> with given engines |
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.
Also I would move the “explicitly” after the “need to” or after “with given engines”.
adb53e3
to
9266412
Compare
Success on aarch64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Alternative would be creating a wrapper package, see for example GIMP: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/graphics/gimp/wrapper.nix |
ae24026
to
a3e5986
Compare
@jtojnar you're right. I patched the script which reads hunspell dirs, so now it looks in the environment. I ensured that it's possible to override the unwrapped package easily and the wrapped one loads the specified hunspell dictionaries. |
Success on x86_64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Just tested this on my machine again. Seems ok for en-us and it-it (I don't speak Italian so I can't say for sure), but I couldn't get fr-any to work. There is no fr-any option in typing-booster and both fr and fr_FR trigger a error "☹ fr dictionary not found. Please install hunspell dictionary!" or "☹ fr_FR dictionary not found. Please install hunspell dictionary!". Emoji names seem to work properly in any language though, I don't think it uses hunspell for those. Also it would type an odd character after selecting a word candidate unless I checked the box labeled "Use a workaround for a bug in QT im module", but I think that's not an issue we can solve here. |
There's a difference between the attribute name and for I'll try to add one and check french completion. |
Short update regarding the french support: we use dictionaries distributed by dicollecte.org. It provides multiple variants of french, namely All of them can fit as However this seems to be an issue with our @jtojnar anything to add from your side? |
a3e5986
to
095e432
Compare
Success on x86_64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
doc/package-notes.xml
Outdated
</section> | ||
|
||
<section xml:id="sec-ibus-typing-booster-customize-hunspell"> | ||
<title>Use custom hunspell dictionaries</title> |
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.
s/Use/Using/
doc/package-notes.xml
Outdated
<para> | ||
The IBus engine is based on <literal>hunspell</literal> to support completion in many languages. | ||
By default the dictionaries <literal>de-de</literal>, <literal>en-us</literal>, <literal>es-es</literal>, | ||
<literal>it-it</literal>, <literal>fr-any</literal>, <literal>sv-se</literal> and <literal>sv-fi</literal> |
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.
Remove French from here as well.
doc/package-notes.xml
Outdated
The IBus engine is based on <literal>hunspell</literal> to support completion in many languages. | ||
By default the dictionaries <literal>de-de</literal>, <literal>en-us</literal>, <literal>es-es</literal>, | ||
<literal>it-it</literal>, <literal>fr-any</literal>, <literal>sv-se</literal> and <literal>sv-fi</literal> | ||
are in use. To add another dictionary, the package can be overriden like this: |
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.
s/overriden/overridden/
This package providesa completion input method for faster typing. See https://mike-fabian.github.io/ibus-typing-booster Detailed instructions how to activate this IBus engine on your desktop can be found in the upstream docs: https://mike-fabian.github.io/ibus-typing-booster/documentation.html A simple VM with the Gnome3 desktop and activated `ibus' looks like this: ```nix { emojipicker = { pkgs, ... }: { services.xserver = { enable = true; desktopManager.gnome3.enable = true; desktopManager.xterm.enable = false; }; users.extraUsers.vm = { password = "vm"; isNormalUser = true; }; i18n.inputMethod.ibus.engines = [ pkgs.ibus-engines.typing-booster ]; i18n.inputMethod.enabled = "ibus"; virtualisation.memorySize = 2048; }; } ``` Fixes NixOS#38721
095e432
to
dee2dab
Compare
@jtojnar thanks, fixed! |
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.
Thanks for the PR, especially for the detailed docs.
Success on aarch64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: ibus-engines.typing-booster Partial log (click to expand)
|
@jtojnar any chance to get this merged then?%) |
Sure, was just waiting for borg and must have missed the notification. |
This has been postponed[1] because of an unclear state of the french dictionary provided by hunspell[2]. [1] NixOS#46779 (comment) [2] NixOS#46940 (comment)
Motivation for this change
This package providesa completion input method for faster typing.
See https://mike-fabian.github.io/ibus-typing-booster
Detailed instructions how to activate this IBus engine on your desktop
can be found in the upstream docs: https://mike-fabian.github.io/ibus-typing-booster/documentation.html
A simple VM with the Gnome3 desktop and activated `ibus' looks like
this:
Fixes #38721
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)