Merge pull request #29558 from teto/fctix_xkeyboard

[RDY] fcitx: fix keyboard not found

authored by adisbladis and committed by GitHub 7b5d9a29 140f0a80

+83 -28
+4 -5
pkgs/development/libraries/libpinyin/default.nix
··· 2 3 let 4 modelData = fetchurl { 5 - url = "mirror://sourceforge/libpinyin/models/model12.text.tar.gz"; 6 - sha256 = "1fijhhnjgj8bj1xr5pp7c4qxf11cqybgfqg7v36l3x780d84hfnd"; 7 }; 8 in 9 - 10 stdenv.mkDerivation rec { 11 name = "libpinyin-${version}"; 12 - version = "1.6.0"; 13 14 nativeBuildInputs = [ autoreconfHook glib db pkgconfig ]; 15 ··· 21 owner = "libpinyin"; 22 repo = "libpinyin"; 23 rev = version; 24 - sha256 = "0k40a7wfp8zj9d426afv0am5sr3m2i2p309fq0vf8qrb050hj17f"; 25 }; 26 27 meta = with stdenv.lib; {
··· 2 3 let 4 modelData = fetchurl { 5 + url = "mirror://sourceforge/libpinyin/models/model14.text.tar.gz"; 6 + sha256 = "0qqk30nflj07zjhs231c95ln4yj4ipzwxxiwrxazrg4hb8bhypqq"; 7 }; 8 in 9 stdenv.mkDerivation rec { 10 name = "libpinyin-${version}"; 11 + version = "2.1.91"; 12 13 nativeBuildInputs = [ autoreconfHook glib db pkgconfig ]; 14 ··· 20 owner = "libpinyin"; 21 repo = "libpinyin"; 22 rev = version; 23 + sha256 = "0jbvn65p3zh0573hh27aasd3qly5anyfi8jnps2dxi0my09wbrq3"; 24 }; 25 26 meta = with stdenv.lib; {
+9 -8
pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix
··· 1 - { stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, libpinyin, glib, pcre, dbus, qt4 }: 2 3 stdenv.mkDerivation rec { 4 name = "fcitx-libpinyin-${version}"; 5 - version = "0.3.91"; 6 7 src = fetchurl { 8 url = "http://download.fcitx-im.org/fcitx-libpinyin/${name}.tar.xz"; 9 - sha256 = "19h0p1s8bkw24v7x6v19fg7dqpz2kkjlvvrqhypi5bkkvfswf7xn"; 10 }; 11 12 - nativeBuildInputs = [ pkgconfig ]; 13 - buildInputs = [ cmake fcitx gettext libpinyin glib pcre dbus qt4 ]; 14 15 preInstall = '' 16 substituteInPlace src/cmake_install.cmake \ ··· 24 ''; 25 26 preBuild = let 27 store_path = fetchurl { 28 - url = https://download.fcitx-im.org/data/model.text.20130308.tar.gz; 29 - sha256 = "0s8sazix29z1ilxmkw2f0bv6i349awd89ibylf9ixy615s1vb5a5"; 30 }; 31 in 32 '' 33 - cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/model.text.20130308.tar.gz 34 ''; 35 36 meta = with stdenv.lib; {
··· 1 + { stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, libpinyin, glib, pcre, dbus, qtwebengine, qtbase, fcitx-qt5 }: 2 3 stdenv.mkDerivation rec { 4 name = "fcitx-libpinyin-${version}"; 5 + version = "0.5.3"; 6 7 src = fetchurl { 8 url = "http://download.fcitx-im.org/fcitx-libpinyin/${name}.tar.xz"; 9 + sha256 = "196c229ckib3xvafkk4n3n3jk9rpksfcjsbbwka6a9k2f34qrjj6"; 10 }; 11 12 + nativeBuildInputs = [ pkgconfig ]; 13 + buildInputs = [ fcitx-qt5 qtbase qtwebengine.dev cmake fcitx gettext libpinyin glib pcre dbus ]; 14 15 preInstall = '' 16 substituteInPlace src/cmake_install.cmake \ ··· 24 ''; 25 26 preBuild = let 27 + ZHUYIN_DATA_FILE_NAME = "model.text.20161206.tar.gz"; 28 store_path = fetchurl { 29 + url = "https://download.fcitx-im.org/data/${ZHUYIN_DATA_FILE_NAME}"; 30 + sha256 = "017p11si1b7bkwx36xaybq5a9icq1pd7x1jbymqw92akfgjj8w2w"; 31 }; 32 in 33 '' 34 + cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/${ZHUYIN_DATA_FILE_NAME} 35 ''; 36 37 meta = with stdenv.lib; {
+5 -3
pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
··· 2 3 stdenv.mkDerivation rec { 4 name = "fcitx-qt5-${version}"; 5 - version = "1.1.0"; 6 7 src = fetchurl { 8 url = "http://download.fcitx-im.org/fcitx-qt5/${name}.tar.xz"; 9 - sha256 = "0r8c5k0qin3mz2p1mdciip6my0x58662sx5z50zs4c5pkdg21qwv"; 10 }; 11 12 nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ]; ··· 16 preInstall = '' 17 substituteInPlace platforminputcontext/cmake_install.cmake \ 18 --replace ${qtbase.out} $out 19 ''; 20 21 meta = with stdenv.lib; { 22 - homepage = "https://github.com/fcitx/fcitx-qt5"; 23 description = "Qt5 IM Module for Fcitx"; 24 license = licenses.gpl2; 25 platforms = platforms.linux;
··· 2 3 stdenv.mkDerivation rec { 4 name = "fcitx-qt5-${version}"; 5 + version = "1.2.1"; 6 7 src = fetchurl { 8 url = "http://download.fcitx-im.org/fcitx-qt5/${name}.tar.xz"; 9 + sha256 = "0z8ax0dxk88byic41mfaiahjdv1k8ciwn97xfjkkgr4ijgscdr8c"; 10 }; 11 12 nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ]; ··· 16 preInstall = '' 17 substituteInPlace platforminputcontext/cmake_install.cmake \ 18 --replace ${qtbase.out} $out 19 + substituteInPlace quickphrase-editor/cmake_install.cmake \ 20 + --replace ${fcitx} $out 21 ''; 22 23 meta = with stdenv.lib; { 24 + homepage = http://github.com/fcitx/fcitx-qt5; 25 description = "Qt5 IM Module for Fcitx"; 26 license = licenses.gpl2; 27 platforms = platforms.linux;
+62 -9
pkgs/tools/inputmethods/fcitx/unwrapped.nix
··· 2 , libxml2, enchant, isocodes, icu, libpthreadstubs 3 , pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon 4 , dbus, gtk2, gtk3, qt4, extra-cmake-modules 5 }: 6 7 stdenv.mkDerivation rec { 8 name = "fcitx-${version}"; 9 - version = "4.2.9.1"; 10 11 - src = fetchurl { 12 - url = "http://download.fcitx-im.org/fcitx/${name}_dict.tar.xz"; 13 - sha256 = "0xvcmm4yi7kagf55d0yl3ql5ssbkm9410fwbz3kd988pchichdsk"; 14 }; 15 16 postPatch = '' 17 substituteInPlace src/frontend/qt/CMakeLists.txt \ 18 --replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins 19 ''; 20 21 - nativeBuildInputs = [ cmake extra-cmake-modules intltool pkgconfig ]; 22 23 buildInputs = [ 24 - enchant gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile 25 - libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 26 ]; 27 28 cmakeFlags = '' ··· 33 -DENABLE_OPENCC=OFF 34 -DENABLE_PRESAGE=OFF 35 -DENABLE_XDGAUTOSTART=OFF 36 - ''; 37 38 meta = with stdenv.lib; { 39 - homepage = "https://github.com/fcitx/fcitx"; 40 description = "A Flexible Input Method Framework"; 41 license = licenses.gpl2; 42 platforms = platforms.linux;
··· 2 , libxml2, enchant, isocodes, icu, libpthreadstubs 3 , pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon 4 , dbus, gtk2, gtk3, qt4, extra-cmake-modules 5 + , xkeyboard_config, pcre, libuuid, curl, cacert 6 + , withPinyin ? true 7 + , fetchFromGitHub 8 }: 9 10 + let 11 + # releases at http://download.fcitx-im.org/fcitx/${name}_dict.tar.xz 12 + # contains all data but if we want to compile from source, we need to 13 + # fetch them ourselves 14 + # to update the urls and where to unpack these, look into the 15 + # src/module/*/data/CMakeLists.txt files 16 + # fcitx_download tgt_name url output) 17 + dicts = let SPELL_EN_DICT_VER="20121020"; in fetchurl { 18 + url = "http://download.fcitx-im.org/data/en_dict-${SPELL_EN_DICT_VER}.tar.gz"; 19 + sha256 = "1svcb97sq7nrywp5f2ws57cqvlic8j6p811d9ngflplj8xw5sjn4"; 20 + }; 21 + table = fetchurl { 22 + url = http://download.fcitx-im.org/data/table.tar.gz; 23 + sha256 = "1dw7mgbaidv3vqy0sh8dbfv8631d2zwv5mlb7npf69a1f8y0b5k1"; 24 + }; 25 + pystroke-data = let PY_STROKE_VER="20121124"; in fetchurl { 26 + url = "http://download.fcitx-im.org/data/py_stroke-${PY_STROKE_VER}.tar.gz"; 27 + sha256 = "0j72ckmza5d671n2zg0psg7z9iils4gyxz7jgkk54fd4pyljiccf"; 28 + }; 29 + pytable-data = let PY_TABLE_VER="20121124"; in fetchurl { 30 + url = "http://download.fcitx-im.org/data/py_table-${PY_TABLE_VER}.tar.gz"; 31 + sha256 = "011cg7wssssm6hm564cwkrrnck2zj5rxi7p9z5akvhg6gp4nl522"; 32 + }; 33 + pinyin-data = fetchurl { 34 + url = http://download.fcitx-im.org/data/pinyin.tar.gz; 35 + sha256 = "1qfq5dy4czvd1lvdnxzyaiir9x8b1m46jjny11y0i33m9ar2jf2q"; 36 + }; 37 + in 38 stdenv.mkDerivation rec { 39 name = "fcitx-${version}"; 40 + version = "4.2.9.5"; 41 42 + src = fetchFromGitHub { 43 + owner = "fcitx"; 44 + repo = "fcitx"; 45 + rev = version; 46 + sha256 = "0rv69bacdvblka85dakz4ldpznrgwj59nqcccp5mkkn1rab4zh1r"; 47 }; 48 + 49 + # put data at the correct locations else cmake tries to fetch them, 50 + # which fails in sandboxed mode 51 + prePatch = '' 52 + cp ${dicts} src/module/spell/dict/$(stripHash ${dicts}) 53 + cp ${table} src/im/table/data/$(stripHash ${table}) 54 + '' 55 + + stdenv.lib.optionalString withPinyin '' 56 + cp ${pystroke-data} src/module/pinyin-enhance/data/$(stripHash ${pystroke-data}) 57 + cp ${pytable-data} src/module/pinyin-enhance/data/$(stripHash ${pytable-data}) 58 + cp ${pinyin-data} src/im/pinyin/data/$(stripHash ${pinyin-data}) 59 + '' 60 + ; 61 62 postPatch = '' 63 substituteInPlace src/frontend/qt/CMakeLists.txt \ 64 --replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins 65 + 66 + patchShebangs cmake/ 67 ''; 68 69 + nativeBuildInputs = [ cmake extra-cmake-modules intltool pkgconfig pcre ]; 70 71 buildInputs = [ 72 + xkeyboard_config enchant gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile 73 + libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid 74 ]; 75 76 cmakeFlags = '' ··· 81 -DENABLE_OPENCC=OFF 82 -DENABLE_PRESAGE=OFF 83 -DENABLE_XDGAUTOSTART=OFF 84 + -DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"} 85 + -DENABLE_TABLE=ON 86 + -DENABLE_SPELL=ON 87 + -DENABLE_QT_GUI=ON 88 + -DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml' 89 + ''; 90 91 meta = with stdenv.lib; { 92 + homepage = http://github.com/fcitx/fcitx; 93 description = "A Flexible Input Method Framework"; 94 license = licenses.gpl2; 95 platforms = platforms.linux;
+2 -2
pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix
··· 5 6 stdenv.mkDerivation rec { 7 name = "ibus-libpinyin-${version}"; 8 - version = "1.8.0"; 9 10 src = fetchFromGitHub { 11 owner = "libpinyin"; 12 repo = "ibus-libpinyin"; 13 rev = version; 14 - sha256 = "1d85kzlhav0ay798i88yqyrjbkv3y7w2aiadpmcjgscyd5ccsnnz"; 15 }; 16 17 buildInputs = [ ibus glib sqlite libpinyin python3 gtk3 db ];
··· 5 6 stdenv.mkDerivation rec { 7 name = "ibus-libpinyin-${version}"; 8 + version = "1.9.2"; 9 10 src = fetchFromGitHub { 11 owner = "libpinyin"; 12 repo = "ibus-libpinyin"; 13 rev = version; 14 + sha256 = "067w926gcf0kwwn71yshhjmyzkad0qsdm1dsi2xwz1j633qd4xlb"; 15 }; 16 17 buildInputs = [ ibus glib sqlite libpinyin python3 gtk3 db ];
+1 -1
pkgs/top-level/all-packages.nix
··· 2107 2108 cloudpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-cloudpinyin { }; 2109 2110 - libpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-libpinyin { }; 2111 2112 skk = callPackage ../tools/inputmethods/fcitx-engines/fcitx-skk { }; 2113 };
··· 2107 2108 cloudpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-cloudpinyin { }; 2109 2110 + libpinyin = libsForQt5.callPackage ../tools/inputmethods/fcitx-engines/fcitx-libpinyin { }; 2111 2112 skk = callPackage ../tools/inputmethods/fcitx-engines/fcitx-skk { }; 2113 };