-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
[RDY] fcitx: fix keyboard not found #29558
Conversation
The message changed to sthg else after a nixos-rebuild:
|
the problem is that when compiling from source rather than an archive, fcitx tries to download some files which it can't when curl is not available fcitx/fcitx#367 (comment). |
I have no problem compiling this in nix-shell -A + genericBuild
the file does seem to exist at some point though
its path is set via |
Also I strange thing is that the error always refer to /tmp/nix-build-fcitx-4.2.9.4.drv-0/fcitx-4.2.9.4/cmake/fcitx-cmake-helper.sh (drv-0) but the build happens in another directory
|
76cf071
to
e51b044
Compare
I managed to fix the essential but I still have one problem, aka I can 't remove input methods (I can add them though). I believe this is due to this dbus problem: There seems to be a dbus file in fcitx source that is unused in nixos:
How can I add this dbus service to the fcitx module ? hopefully it will solve the problem. |
d2ad5ba
to
d5eb2a0
Compare
I didn't see that modules were packaged separately so I ended up reverting some of my previous work but there are still improvements. My current trouble here is that cmake doesn't seem to find qt5, looking at past issues, it seems a bit complicated, any idea ?
|
Thanks for the hard work on this! |
src = fetchFromGitHub { | ||
owner = "fcitx"; | ||
repo = "fcitx"; | ||
rev = "0ee405a59795232c08cf0cc0b1bf20454fc4cb28"; |
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.
Nit: Prefer stable versions with patches
when possible, else rename the package to unstable.
Also the hash seem to have changed:
these derivations will be built:
/nix/store/imslrw5bmqb2xmjg4pxj523vn1hsradq-source.drv
/nix/store/8kbjdvj2nxpjb5n8isp9j2bqfb3qh3q6-fcitx-4.2.9.5.drv
building path(s) ‘/nix/store/a0cvbp1vpy2yihw29v9d0bjm1q0wj316-source’
trying https://github.com/fcitx/fcitx/archive/0ee405a59795232c08cf0cc0b1bf20454fc4cb28.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 153 0 153 0 0 153 0 --:--:-- --:--:-- --:--:-- 171
100 2604k 100 2604k 0 0 520k 0 0:00:05 0:00:05 --:--:-- 590k
unpacking source archive /tmp/nix-build-source.drv-0/0ee405a59795232c08cf0cc0b1bf20454fc4cb28.tar.gz
output path ‘/nix/store/a0cvbp1vpy2yihw29v9d0bjm1q0wj316-source’ has r:sha256 hash ‘0rv69bacdvblka85dakz4ldpznrgwj59nqcccp5mkkn1rab4zh1r’ when ‘1j5wqj1zcihf171p3zc8g6sn4xy5jpcxg3wmiqn32cc6226n19kb’ was expected
cannot build derivation ‘/nix/store/8kbjdvj2nxpjb5n8isp9j2bqfb3qh3q6-fcitx-4.2.9.5.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/8kbjdvj2nxpjb5n8isp9j2bqfb3qh3q6-fcitx-4.2.9.5.drv’ failed
Regarding the |
Thanks for looking into it. I also saw the dependency, I will give it
another shot this evening. Do you think using libsForQt5 as in
https://github.com/NixOS/nixpkgs/pull/32622/files#diff-036410e9211b4336186fc613f7200b12R17049
could solve the cmake failure ?
It is true that it is not esy to package, neither it is easy to develop/track
so many sub-repositories. Yet the fcitx developer has been really
helpful so far. Thanks for your work on this. I am not accustomed to IMEs
yet, I used to complain about software not supporting European accents but
I guess Asia/Arabic countries have it even harder.
|
It should solve it, but I am not sure if this is the "right" approach. Maybe @ttuegel have an advice regarding this? |
Using |
It finally compiles with a subset of the packages, I haven't tried the others. It s much more time consuming than I had anticipated :/
I might try to enable other packages before cleaning . |
I have tested mozc with a few toolkits / apps and everything works fine, great job! |
e96d6c7
to
a5e588a
Compare
good to know, I've rebuilt with more plugins and it seemed ok too. So I cleaned up the code and mark the PR as RDY (ready). |
Hi @teto I need to update the hash to this modified pkgs/tools/inputmethods/fcitx/unwrapped.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
owner = "fcitx";
repo = "fcitx";
rev = version;
- sha256 = "1j5wqj1zcihf171p3zc8g6sn4xy5jpcxg3wmiqn32cc6226n19kb";
+ sha256 = "0rv69bacdvblka85dakz4ldpznrgwj59nqcccp5mkkn1rab4zh1r";
}; After updating the hash it works perfectly on my machine |
Strange that it passed the CI and my local compile. anyway seems like you were right, I rebased and fixed the hash. Thanks for testing ! |
@ttuegel is it possible to merge ? it seems to solve problems for linc01n and I. |
Would you mind trying again ? I had not tested with nox-review and it triggered some errors I just fixed. Thanks to @adisbladis for his patch/help. |
All good now :) Thanks! |
Previously optional dependencies are now made mandatory like qtwebbrowser.dev . In order to find these libraries, I used libsForQt5.callPackage.
fcitx now relies on xkeyboard_config.
Motivation for this change
NixOs defeats the fcitx discovery function responsible for finding evdev.xml & co. See https://groups.google.com/forum/#!topic/nix-devel/-_yLnqkMVj0 and
fcitx/fcitx#357
Fcitx author kindly patched his project to make the discovery more reliable.
Things done
xkeyboard_config is now a mandatory nativeBuildInput so I enabled that. There is no new release yet so I changed the version to master (I should pin it to a specific revision else the sha is going to be outdated).
I opened the PR so that people can get a fix for fcitx but right now I am puzzled because while
nix-shell -A fcitx '<nixpkgs>'
followed by a genericBuild compiles just fine, when it is done viasudo LANG=C nixos-rebuild switch
then I have this error:I am not sure how to debug that.
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)