Merge pull request #220776 from Vonfry/deprecated/fcitx4

fcitx: remove version 4

authored by

Nick Cao and committed by
GitHub
851cd65a 8f40f2f9

+184 -1016
+2
nixos/doc/manual/release-notes/rl-2305.section.md
··· 156 156 157 157 - Nebula now runs as a system user and group created for each nebula network, using the `CAP_NET_ADMIN` ambient capability on launch rather than starting as root. Ensure that any files each Nebula instance needs to access are owned by the correct user and group, by default `nebula-${networkName}`. 158 158 159 + - The `i18n.inputMethod.fcitx` option has been replaced with `i18n.inputMethod.fcitx5` because fcitx 4 `pkgs.fcitx` has been removed. 160 + 159 161 - In `mastodon` it is now necessary to specify location of file with `PostgreSQL` database password. In `services.mastodon.database.passwordFile` parameter default value `/var/lib/mastodon/secrets/db-password` has been changed to `null`. 160 162 161 163 - The `--target-host` and `--build-host` options of `nixos-rebuild` no longer treat the `localhost` value specially – to build on/deploy to local machine, omit the relevant flag.
+17 -15
nixos/modules/i18n/input-method/default.md
··· 9 9 The following input methods are available in NixOS: 10 10 11 11 - IBus: The intelligent input bus. 12 - - Fcitx: A customizable lightweight input method. 12 + - Fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using `i18n.inputMethod.fcitx5.addons`. 13 13 - Nabi: A Korean input method based on XIM. 14 14 - Uim: The universal input method, is a library with a XIM bridge. 15 15 - Hime: An extremely easy-to-use input method framework. ··· 67 67 match exactly. If they do not, uninstalling and reinstalling the 68 68 application is a likely fix. 69 69 70 - ## Fcitx {#module-services-input-methods-fcitx} 70 + ## Fcitx5 {#module-services-input-methods-fcitx} 71 71 72 - Fcitx is an input method framework with extension support. It has three 72 + Fcitx5 is an input method framework with extension support. It has three 73 73 built-in Input Method Engine, Pinyin, QuWei and Table-based input methods. 74 74 75 75 The following snippet can be used to configure Fcitx: 76 76 77 77 ``` 78 78 i18n.inputMethod = { 79 - enabled = "fcitx"; 80 - fcitx.engines = with pkgs.fcitx-engines; [ mozc hangul m17n ]; 79 + enabled = "fcitx5"; 80 + fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-hangul fcitx5-m17n ]; 81 81 }; 82 82 ``` 83 83 84 - `i18n.inputMethod.fcitx.engines` is optional and can be 85 - used to add extra Fcitx engines. 84 + `i18n.inputMethod.fcitx5.addons` is optional and can be 85 + used to add extra Fcitx5 addons. 86 86 87 - Available extra Fcitx engines are: 87 + Available extra Fcitx5 addons are: 88 88 89 - - Anthy (`fcitx-engines.anthy`): Anthy is a system for 89 + - Anthy (`fcitx5-anthy`): Anthy is a system for 90 90 Japanese input method. It converts Hiragana text to Kana Kanji mixed text. 91 - - Chewing (`fcitx-engines.chewing`): Chewing is an 91 + - Chewing (`fcitx5-chewing`): Chewing is an 92 92 intelligent Zhuyin input method. It is one of the most popular input 93 93 methods among Traditional Chinese Unix users. 94 - - Hangul (`fcitx-engines.hangul`): Korean input method. 95 - - Unikey (`fcitx-engines.unikey`): Vietnamese input method. 96 - - m17n (`fcitx-engines.m17n`): m17n is an input method that 94 + - Hangul (`fcitx5-hangul`): Korean input method. 95 + - Unikey (`fcitx5-unikey`): Vietnamese input method. 96 + - m17n (`fcitx5-m17n`): m17n is an input method that 97 97 uses input methods and corresponding icons in the m17n database. 98 - - mozc (`fcitx-engines.mozc`): A Japanese input method from 98 + - mozc (`fcitx5-mozc`): A Japanese input method from 99 99 Google. 100 - - table-others (`fcitx-engines.table-others`): Various 100 + - table-others (`fcitx5-table-other`): Various 101 101 table-based input methods. 102 + - chinese-addons (`fcitx5-chinese-addons`): Various chinese input methods. 103 + - rime (`fcitx5-rime`): RIME support for fcitx5. 102 104 103 105 ## Nabi {#module-services-input-methods-nabi} 104 106
+2 -3
nixos/modules/i18n/input-method/default.nix
··· 29 29 options.i18n = { 30 30 inputMethod = { 31 31 enabled = mkOption { 32 - type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]); 32 + type = types.nullOr (types.enum [ "ibus" "fcitx5" "nabi" "uim" "hime" "kime" ]); 33 33 default = null; 34 - example = "fcitx"; 34 + example = "fcitx5"; 35 35 description = lib.mdDoc '' 36 36 Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices. 37 37 ··· 40 40 Currently the following input methods are available in NixOS: 41 41 42 42 - ibus: The intelligent input bus, extra input engines can be added using `i18n.inputMethod.ibus.engines`. 43 - - fcitx: A customizable lightweight input method, extra input engines can be added using `i18n.inputMethod.fcitx.engines`. 44 43 - fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using `i18n.inputMethod.fcitx5.addons`. 45 44 - nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5. 46 45 - uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.
-46
nixos/modules/i18n/input-method/fcitx.nix
··· 1 - { config, pkgs, lib, ... }: 2 - 3 - with lib; 4 - 5 - let 6 - cfg = config.i18n.inputMethod.fcitx; 7 - fcitxPackage = pkgs.fcitx.override { plugins = cfg.engines; }; 8 - fcitxEngine = types.package // { 9 - name = "fcitx-engine"; 10 - check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x); 11 - }; 12 - in 13 - { 14 - options = { 15 - 16 - i18n.inputMethod.fcitx = { 17 - engines = mkOption { 18 - type = with types; listOf fcitxEngine; 19 - default = []; 20 - example = literalExpression "with pkgs.fcitx-engines; [ mozc hangul ]"; 21 - description = 22 - let 23 - enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines; 24 - engines = concatStringsSep ", " 25 - (map (name: "`${name}`") (attrNames enginesDrv)); 26 - in 27 - lib.mdDoc "Enabled Fcitx engines. Available engines are: ${engines}."; 28 - }; 29 - }; 30 - 31 - }; 32 - 33 - config = mkIf (config.i18n.inputMethod.enabled == "fcitx") { 34 - i18n.inputMethod.package = fcitxPackage; 35 - 36 - environment.variables = { 37 - GTK_IM_MODULE = "fcitx"; 38 - QT_IM_MODULE = "fcitx"; 39 - XMODIFIERS = "@im=fcitx"; 40 - }; 41 - services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx"; 42 - }; 43 - 44 - # uses attributes of the linked package 45 - meta.buildDocsInSandbox = false; 46 - }
-1
nixos/modules/module-list.nix
··· 103 103 ./hardware/xone.nix 104 104 ./hardware/xpadneo.nix 105 105 ./i18n/input-method/default.nix 106 - ./i18n/input-method/fcitx.nix 107 106 ./i18n/input-method/fcitx5.nix 108 107 ./i18n/input-method/hime.nix 109 108 ./i18n/input-method/ibus.nix
+2
nixos/modules/rename.nix
··· 107 107 (mkRemovedOptionModule [ "services" "riak" ] "The corresponding package was removed from nixpkgs.") 108 108 (mkRemovedOptionModule [ "services" "cryptpad" ] "The corresponding package was removed from nixpkgs.") 109 109 110 + (mkRemovedOptionModule [ "i18n" "inputMethod" "fcitx" ] "The fcitx module has been removed. Plesae use fcitx5 instead") 111 + 110 112 # Do NOT add any option renames here, see top of the file 111 113 ]; 112 114 }
+1 -1
nixos/tests/all-tests.nix
··· 218 218 extra-python-packages = handleTest ./extra-python-packages.nix {}; 219 219 evcc = handleTest ./evcc.nix {}; 220 220 fancontrol = handleTest ./fancontrol.nix {}; 221 - fcitx = handleTest ./fcitx {}; 221 + fcitx5 = handleTest ./fcitx5 {}; 222 222 fenics = handleTest ./fenics.nix {}; 223 223 ferm = handleTest ./ferm.nix {}; 224 224 firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; };
-12
nixos/tests/fcitx/config
··· 1 - [Hotkey] 2 - SwitchKey=Disabled 3 - IMSwitchHotkey=ALT_SHIFT 4 - TimeInterval=240 5 - 6 - [Program] 7 - DelayStart=5 8 - 9 - [Output] 10 - 11 - [Appearance] 12 -
-142
nixos/tests/fcitx/default.nix
··· 1 - import ../make-test-python.nix ( 2 - { 3 - pkgs, ... 4 - }: 5 - # copy_from_host works only for store paths 6 - rec { 7 - name = "fcitx"; 8 - meta.broken = true; # takes hours to time out since October 2021 9 - nodes.machine = 10 - { 11 - pkgs, 12 - ... 13 - }: 14 - { 15 - 16 - imports = [ 17 - ../common/user-account.nix 18 - ]; 19 - 20 - environment.systemPackages = [ 21 - # To avoid clashing with xfce4-terminal 22 - pkgs.alacritty 23 - ]; 24 - 25 - 26 - services.xserver = 27 - { 28 - enable = true; 29 - 30 - displayManager = { 31 - lightdm.enable = true; 32 - autoLogin = { 33 - enable = true; 34 - user = "alice"; 35 - }; 36 - }; 37 - 38 - desktopManager.xfce.enable = true; 39 - }; 40 - 41 - i18n = { 42 - inputMethod = { 43 - enabled = "fcitx"; 44 - fcitx.engines = [ 45 - pkgs.fcitx-engines.m17n 46 - pkgs.fcitx-engines.table-extra 47 - ]; 48 - }; 49 - }; 50 - } 51 - ; 52 - 53 - testScript = { nodes, ... }: 54 - let 55 - user = nodes.machine.config.users.users.alice; 56 - userName = user.name; 57 - userHome = user.home; 58 - xauth = "${userHome}/.Xauthority"; 59 - fcitx_confdir = "${userHome}/.config/fcitx"; 60 - in 61 - '' 62 - # We need config files before login session 63 - # So copy first thing 64 - 65 - # Point and click would be expensive, 66 - # So configure using files 67 - machine.copy_from_host( 68 - "${./profile}", 69 - "${fcitx_confdir}/profile", 70 - ) 71 - machine.copy_from_host( 72 - "${./config}", 73 - "${fcitx_confdir}/config", 74 - ) 75 - 76 - start_all() 77 - 78 - machine.wait_for_file("${xauth}") 79 - machine.succeed("xauth merge ${xauth}") 80 - 81 - machine.sleep(5) 82 - 83 - machine.succeed("su - ${userName} -c 'alacritty&'") 84 - machine.succeed("su - ${userName} -c 'fcitx&'") 85 - machine.sleep(10) 86 - 87 - ### Type on terminal 88 - machine.send_chars("echo ") 89 - machine.sleep(1) 90 - 91 - ### Start fcitx Unicode input 92 - machine.send_key("ctrl-alt-shift-u") 93 - machine.sleep(5) 94 - machine.sleep(1) 95 - 96 - ### Search for smiling face 97 - machine.send_chars("smil") 98 - machine.sleep(1) 99 - 100 - ### Navigate to the second one 101 - machine.send_key("tab") 102 - machine.sleep(1) 103 - 104 - ### Choose it 105 - machine.send_key("\n") 106 - machine.sleep(1) 107 - 108 - ### Start fcitx language input 109 - machine.send_key("ctrl-spc") 110 - machine.sleep(1) 111 - 112 - ### Default zhengma, enter 一下 113 - machine.send_chars("a2") 114 - machine.sleep(1) 115 - 116 - ### Switch to Harvard Kyoto 117 - machine.send_key("alt-shift") 118 - machine.sleep(1) 119 - 120 - ### Enter क 121 - machine.send_chars("ka ") 122 - machine.sleep(1) 123 - 124 - machine.send_key("alt-shift") 125 - machine.sleep(1) 126 - 127 - ### Turn off Fcitx 128 - machine.send_key("ctrl-spc") 129 - machine.sleep(1) 130 - 131 - ### Redirect typed characters to a file 132 - machine.send_chars(" > fcitx_test.out\n") 133 - machine.sleep(1) 134 - machine.screenshot("terminal_chars") 135 - 136 - ### Verify that file contents are as expected 137 - file_content = machine.succeed("cat ${userHome}/fcitx_test.out") 138 - assert file_content == "☺一下क\n" 139 - '' 140 - ; 141 - } 142 - )
-4
nixos/tests/fcitx/profile
··· 1 - [Profile] 2 - IMName=zhengma-large 3 - EnabledIMList=fcitx-keyboard-us:True,zhengma-large:True,m17n_sa_harvard-kyoto:True 4 - PreeditStringInClientWindow=False
+11
nixos/tests/fcitx5/config
··· 1 + [Hotkey] 2 + EnumerateSkipFirst=False 3 + 4 + [Hotkey/TriggerKeys] 5 + 0=Control+space 6 + 7 + [Hotkey/EnumerateForwardKeys] 8 + 0=Alt+Shift_L 9 + 10 + [Hotkey/EnumerateBackwardKeys] 11 + 0=Alt+Shift_R
+127
nixos/tests/fcitx5/default.nix
··· 1 + import ../make-test-python.nix ({ pkgs, ... }: 2 + # copy_from_host works only for store paths 3 + rec { 4 + name = "fcitx5"; 5 + nodes.machine = { pkgs, ... }: 6 + { 7 + imports = [ 8 + ../common/user-account.nix 9 + ]; 10 + 11 + environment.systemPackages = [ 12 + # To avoid clashing with xfce4-terminal 13 + pkgs.alacritty 14 + ]; 15 + 16 + services.xserver = { 17 + enable = true; 18 + 19 + displayManager = { 20 + lightdm.enable = true; 21 + autoLogin = { 22 + enable = true; 23 + user = "alice"; 24 + }; 25 + }; 26 + 27 + desktopManager.xfce.enable = true; 28 + }; 29 + 30 + i18n.inputMethod = { 31 + enabled = "fcitx5"; 32 + fcitx5.addons = [ 33 + pkgs.fcitx5-m17n 34 + pkgs.fcitx5-chinese-addons 35 + ]; 36 + }; 37 + }; 38 + 39 + testScript = { nodes, ... }: 40 + let 41 + user = nodes.machine.users.users.alice; 42 + xauth = "${user.home}/.Xauthority"; 43 + fcitx_confdir = "${user.home}/.config/fcitx5"; 44 + in 45 + '' 46 + # We need config files before login session 47 + # So copy first thing 48 + 49 + # Point and click would be expensive, 50 + # So configure using files 51 + machine.copy_from_host( 52 + "${./profile}", 53 + "${fcitx_confdir}/profile", 54 + ) 55 + machine.copy_from_host( 56 + "${./config}", 57 + "${fcitx_confdir}/config", 58 + ) 59 + 60 + start_all() 61 + 62 + machine.wait_for_file("${xauth}}") 63 + machine.succeed("xauth merge ${xauth}") 64 + 65 + machine.sleep(5) 66 + 67 + machine.succeed("su - ${user.name} -c 'alacritty&'") 68 + machine.succeed("su - ${user.name} -c 'fcitx5&'") 69 + machine.sleep(10) 70 + 71 + ### Type on terminal 72 + machine.send_chars("echo ") 73 + machine.sleep(1) 74 + 75 + ### Start fcitx Unicode input 76 + machine.send_key("ctrl-alt-shift-u") 77 + machine.sleep(5) 78 + machine.sleep(1) 79 + 80 + ### Search for smiling face 81 + machine.send_chars("smil") 82 + machine.sleep(1) 83 + 84 + ### Navigate to the second one 85 + machine.send_key("tab") 86 + machine.sleep(1) 87 + 88 + ### Choose it 89 + machine.send_key("\n") 90 + machine.sleep(1) 91 + 92 + ### Start fcitx language input 93 + machine.send_key("ctrl-spc") 94 + machine.sleep(1) 95 + 96 + ### Default wubi, enter 一下 97 + machine.send_chars("gggh") 98 + machine.sleep(1) 99 + machine.send_key("\n") 100 + machine.sleep(1) 101 + 102 + ### Switch to Harvard Kyoto 103 + machine.send_key("alt-shift") 104 + machine.sleep(1) 105 + 106 + ### Enter क 107 + machine.send_chars("ka ") 108 + machine.sleep(1) 109 + 110 + machine.send_key("alt-shift") 111 + machine.sleep(1) 112 + 113 + ### Turn off Fcitx 114 + machine.send_key("ctrl-spc") 115 + machine.sleep(1) 116 + 117 + ### Redirect typed characters to a file 118 + machine.send_chars(" > fcitx_test.out\n") 119 + machine.sleep(1) 120 + machine.screenshot("terminal_chars") 121 + 122 + ### Verify that file contents are as expected 123 + file_content = machine.succeed("cat ${user.home}/fcitx_test.out") 124 + assert file_content == "☺一下क\n" 125 + '' 126 + ; 127 + })
+15
nixos/tests/fcitx5/profile
··· 1 + [Groups/0] 2 + Name=NixOS_test 3 + Default Layout=us 4 + DefaultIM=wbx 5 + 6 + [Groups/0/Items/0] 7 + Name=wbx 8 + Layout=us 9 + 10 + [Groups/0/Items/1] 11 + Name=m17n_sa_harvard-kyoto 12 + Layout=us 13 + 14 + [GroupOrder] 15 + 0=NixOS_test
+3 -2
pkgs/applications/terminal-emulators/mlterm/default.nix
··· 3 3 , harfbuzz #substituting glyphs with opentype fonts 4 4 , fribidi, m17n_lib #bidi and encoding 5 5 , openssl, libssh2 #build-in ssh 6 - , fcitx, ibus, uim #IME 6 + , fcitx5, fcitx5-gtk, ibus, uim #IME 7 7 , wrapGAppsHook #color picker in mlconfig 8 8 , Cocoa #Darwin 9 9 }: ··· 37 37 vte 38 38 m17n_lib 39 39 40 - fcitx 40 + fcitx5 41 + fcitx5-gtk 41 42 ibus 42 43 ] ++ lib.optionals (stdenv.system != "aarch64-linux") [ 43 44 # FIXME Currently broken on aarch64-linux
-28
pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, anthy, gettext, pkg-config }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-anthy"; 5 - version = "0.2.4"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-anthy/${pname}-${version}.tar.xz"; 9 - sha256 = "sha256-Hxhs2RXuFf/bhczcQ3+Zj+gI3+Z4BEfIzMIfUOUNX7M="; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx anthy gettext ]; 14 - 15 - preInstall = '' 16 - substituteInPlace src/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - ''; 19 - 20 - meta = with lib; { 21 - isFcitxEngine = true; 22 - description = "Fcitx Wrapper for anthy"; 23 - license = licenses.gpl2Plus; 24 - platforms = platforms.linux; 25 - maintainers = with maintainers; [ ericsagnes ]; 26 - }; 27 - 28 - }
-32
pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, gettext, libchewing, pkg-config }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-chewing"; 5 - version = "0.2.3"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-chewing/${pname}-${version}.tar.xz"; 9 - sha256 = "1w5smp5zvjx681cp1znjypyr9sw5x6v0wnsk8a7ncwxi9q9wf4xk"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx gettext libchewing ]; 14 - 15 - preInstall = '' 16 - substituteInPlace src/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - substituteInPlace data/cmake_install.cmake \ 19 - --replace ${fcitx} $out 20 - ''; 21 - 22 - meta = with lib; { 23 - isFcitxEngine = true; 24 - homepage = "https://github.com/fcitx/fcitx-chewing"; 25 - downloadPage = "http://download.fcitx-im.org/fcitx-chewing/"; 26 - description = "Fcitx engine for chewing"; 27 - license = licenses.gpl2; 28 - platforms = platforms.linux; 29 - maintainers = with maintainers; [ ericsagnes ]; 30 - }; 31 - 32 - }
-29
pkgs/tools/inputmethods/fcitx-engines/fcitx-cloudpinyin/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, curl }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-cloudpinyin"; 5 - version = "0.3.7"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-cloudpinyin/${pname}-${version}.tar.xz"; 9 - sha256 = "0ai347wv3qdjzcbh0j9hdjpzwvh2kk57324xbxq37nzagrdgg5x0"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx gettext curl ]; 14 - 15 - preInstall = '' 16 - substituteInPlace src/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - substituteInPlace po/cmake_install.cmake \ 19 - --replace ${fcitx} $out 20 - ''; 21 - 22 - meta = with lib; { 23 - isFcitxEngine = true; 24 - description = "A standalone module for fcitx that uses web API to provide better pinyin result"; 25 - homepage = "https://github.com/fcitx/fcitx-cloudpinyin"; 26 - license = licenses.gpl3Plus; 27 - platforms = platforms.linux; 28 - }; 29 - }
-31
pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, libhangul, gettext, pkg-config }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-hangul"; 5 - version = "0.3.1"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-hangul/${pname}-${version}.tar.xz"; 9 - sha256 = "0ds4071ljq620w7vnprm2jl8zqqkw7qsxvzbjapqak4jarczvmbd"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx libhangul gettext ]; 14 - 15 - preInstall = '' 16 - substituteInPlace src/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - substituteInPlace data/cmake_install.cmake \ 19 - --replace ${fcitx} $out 20 - ''; 21 - 22 - meta = with lib; { 23 - isFcitxEngine = true; 24 - homepage = "https://github.com/fcitx/fcitx-hangul"; 25 - downloadPage = "http://download.fcitx-im.org/fcitx-hangul/"; 26 - description = "Fcitx Wrapper for hangul"; 27 - license = licenses.gpl2; 28 - platforms = platforms.linux; 29 - maintainers = with maintainers; [ ericsagnes ]; 30 - }; 31 - }
-16
pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/datapath.patch
··· 1 - --- a/src/utils.cpp 2 - +++ b/src/utils.cpp 3 - @@ -9,12 +9,7 @@ char* FcitxLibPinyinGetSysPath(LIBPINYIN_LANGUAGE_TYPE type) 4 - #ifdef LIBPINYIN_TOOLS_FOUND 5 - if (type == LPLT_Simplified) { 6 - #endif 7 - - /* portable detect here */ 8 - - if (getenv("FCITXDIR")) { 9 - - syspath = fcitx_utils_get_fcitx_path_with_filename("datadir", "libpinyin/data"); 10 - - } else { 11 - - syspath = strdup(LIBPINYIN_PKGDATADIR "/data"); 12 - - } 13 - + syspath = strdup(LIBPINYIN_PKGDATADIR "/data"); 14 - #ifdef LIBPINYIN_TOOLS_FOUND 15 - } 16 - else {
-55
pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, libpinyin, glib, pcre, dbus, qtwebengine, qtbase, fcitx-qt5 }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-libpinyin"; 5 - version = "0.5.4"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-libpinyin/${pname}-${version}.tar.xz"; 9 - sha256 = "1wvsc21imbgq3chlxfw4aycmkb2vi1bkjj9frvhga2m5b5pq82k5"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx-qt5 qtbase qtwebengine.dev fcitx gettext libpinyin glib pcre dbus ]; 14 - 15 - # With a typical installation via NixOS option i18n.inputMethod.fcitx.engines, 16 - # the FCITXDIR environment variable is set to $out of fcitx-with-plugins, 17 - # which leads to an incorrect path for pinyin data. 18 - # 19 - # It is impossible or difficult to fix this issue without patching. We want 20 - # FCITXDIR to point into libpinyin, which is currently not symlinked within 21 - # fcitx-with-plugins (only fcitx-libpinyin is symlinked). Also, FCITXDIR 22 - # doesn't accept multiple directories. 23 - patches = [ ./datapath.patch ]; 24 - 25 - preInstall = '' 26 - substituteInPlace src/cmake_install.cmake \ 27 - --replace ${fcitx} $out 28 - substituteInPlace data/cmake_install.cmake \ 29 - --replace ${fcitx} $out 30 - substituteInPlace dictmanager/cmake_install.cmake \ 31 - --replace ${fcitx} $out 32 - ''; 33 - 34 - preBuild = let 35 - ZHUYIN_DATA_FILE_NAME = "model.text.20161206.tar.gz"; 36 - store_path = fetchurl { 37 - url = "https://download.fcitx-im.org/data/${ZHUYIN_DATA_FILE_NAME}"; 38 - sha256 = "017p11si1b7bkwx36xaybq5a9icq1pd7x1jbymqw92akfgjj8w2w"; 39 - }; 40 - in 41 - '' 42 - cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/${ZHUYIN_DATA_FILE_NAME} 43 - ''; 44 - 45 - dontWrapQtApps = true; 46 - 47 - meta = with lib; { 48 - isFcitxEngine = true; 49 - description = "Fcitx Wrapper for libpinyin, Library to deal with pinyin"; 50 - homepage = "https://github.com/fcitx/fcitx-libpinyin"; 51 - license = licenses.gpl3Plus; 52 - maintainers = with maintainers; [ ericsagnes ]; 53 - platforms = platforms.linux; 54 - }; 55 - }
-30
pkgs/tools/inputmethods/fcitx-engines/fcitx-m17n/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, gettext, m17n_lib, m17n_db, pkg-config }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-m17n"; 5 - version = "0.2.4"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-m17n/${pname}-${version}.tar.xz"; 9 - sha256 = "15s52h979xz967f8lm0r0qkplig2w3wjck1ymndbg9kvj25ib0ng"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx gettext m17n_lib m17n_db ]; 14 - 15 - preInstall = '' 16 - substituteInPlace im/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - ''; 19 - 20 - meta = with lib; { 21 - isFcitxEngine = true; 22 - homepage = "https://github.com/fcitx/fcitx-m17n"; 23 - downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; 24 - description = "Fcitx wrapper for m17n"; 25 - license = licenses.gpl3Plus; 26 - platforms = platforms.linux; 27 - maintainers = with maintainers; [ ericsagnes ]; 28 - }; 29 - 30 - }
-113
pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix
··· 1 - { lib, clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, gyp, which, ninja, 2 - python, pkg-config, protobuf, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese, 3 - fcitx, gettext }: 4 - let 5 - japanese_usage_dictionary = fetchFromGitHub { 6 - owner = "hiroyuki-komatsu"; 7 - repo = "japanese-usage-dictionary"; 8 - rev = "e5b3425575734c323e1d947009dd74709437b684"; 9 - sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm"; 10 - }; 11 - icons = fetchurl { 12 - url = "http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz"; 13 - sha256 = "10bdjn481jsh32vll7r756l392anz44h6207vjqwby3rplk31np1"; 14 - }; 15 - in clangStdenv.mkDerivation rec { 16 - pname = "fcitx-mozc"; 17 - version = "2.23.2815.102"; 18 - 19 - src = fetchFromGitHub { 20 - owner = "google"; 21 - repo = "mozc"; 22 - rev = "afb03ddfe72dde4cf2409863a3bfea160f7a66d8"; 23 - sha256 = "0w2dy2j9x5nc7x3g95j17r3m60vbfyn5j617h7js9xryv33yzpgx"; 24 - }; 25 - 26 - nativeBuildInputs = [ gyp which ninja python pkg-config qt5.wrapQtAppsHook ]; 27 - buildInputs = [ protobuf gtk2 zinnia qt5.qtbase libxcb fcitx gettext ]; 28 - 29 - postUnpack = '' 30 - rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/ 31 - ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary 32 - tar -xzf ${icons} -C $sourceRoot/src 33 - ''; 34 - 35 - patch_version = "${version}.1"; 36 - patches = [ 37 - (fetchpatch rec { 38 - name = "fcitx-mozc-${patch_version}.patch"; 39 - url = "https://download.fcitx-im.org/fcitx-mozc/${name}"; 40 - sha256 = "0a8q3vzcbai1ccdrl6qdb81gvbw8aby4lqkl6qs9hg68p6zg42hg"; 41 - }) 42 - # https://github.com/google/mozc/pull/444 - fix for gcc8 STL 43 - (fetchpatch { 44 - url = "https://github.com/google/mozc/commit/82d38f929882a9c62289b179c6fe41efed249987.patch"; 45 - sha256 = "07cja1b7qfsd3i76nscf1zwiav74h7d6h2g9g2w4bs3h1mc9jwla"; 46 - }) 47 - # Support dates after 2019 48 - (fetchpatch { 49 - url = "https://salsa.debian.org/debian/mozc/-/raw/master/debian/patches/add_support_new_japanese_era.patch"; 50 - sha256 = "1dsiiglrmm8i8shn2hv0j2b8pv6miysjrimj4569h606j4lwmcw2"; 51 - }) 52 - ]; 53 - 54 - postPatch = '' 55 - substituteInPlace src/unix/fcitx/mozc.conf \ 56 - --replace "/usr/share/fcitx/mozc/icon/mozc.png" "mozc" 57 - ''; 58 - 59 - configurePhase = '' 60 - export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 use_fcitx5=0 zinnia_model_file=${tegaki-zinnia-japanese}/share/tegaki/models/zinnia/handwriting-ja.model" 61 - cd src && python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc 62 - ''; 63 - 64 - buildPhase = '' 65 - PYTHONPATH="$PWD:$PYTHONPATH" python build_mozc.py build -c Release \ 66 - server/server.gyp:mozc_server \ 67 - gui/gui.gyp:mozc_tool \ 68 - unix/fcitx/fcitx.gyp:fcitx-mozc 69 - ''; 70 - 71 - installPhase = '' 72 - install -d $out/share/licenses/fcitx-mozc 73 - head -n 29 server/mozc_server.cc > $out/share/licenses/fcitx-mozc/LICENSE 74 - install -m 644 data/installer/*.html $out/share/licenses/fcitx-mozc/ 75 - 76 - install -d $out/share/doc/mozc 77 - install -m 644 data/installer/*.html $out/share/doc/mozc/ 78 - 79 - install -D -m 755 out_linux/Release/mozc_server $out/lib/mozc/mozc_server 80 - install -m 755 out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool 81 - 82 - wrapQtApp $out/lib/mozc/mozc_tool 83 - 84 - install -D -m 755 out_linux/Release/fcitx-mozc.so $out/lib/fcitx/fcitx-mozc.so 85 - install -D -m 644 unix/fcitx/fcitx-mozc.conf $out/share/fcitx/addon/fcitx-mozc.conf 86 - install -D -m 644 unix/fcitx/mozc.conf $out/share/fcitx/inputmethod/mozc.conf 87 - 88 - install -d $out/share/doc/mozc 89 - 90 - for mofile in out_linux/Release/gen/unix/fcitx/po/*.mo 91 - do 92 - filename=`basename $mofile` 93 - lang=$filename.mo 94 - install -D -m 644 "$mofile" "$out/share/locale/$lang/LC_MESSAGES/fcitx-mozc.mo" 95 - done 96 - 97 - install -d $out/share/fcitx/imicon 98 - install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/imicon/mozc.png 99 - install -d $out/share/fcitx/mozc/icon 100 - install -m 644 fcitx-mozc-icons/*.png $out/share/fcitx/mozc/icon/ 101 - ''; 102 - 103 - meta = with lib; { 104 - isFcitxEngine = true; 105 - description = "Fcitx engine for Google japanese input method"; 106 - homepage = "https://github.com/google/mozc"; 107 - downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; 108 - license = licenses.free; 109 - platforms = platforms.linux; 110 - maintainers = with maintainers; [ gebner ericsagnes ]; 111 - }; 112 - 113 - }
-37
pkgs/tools/inputmethods/fcitx-engines/fcitx-rime/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, pkg-config, fcitx, librime, brise, hicolor-icon-theme }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-rime"; 5 - version = "0.3.2"; 6 - 7 - src = fetchurl { 8 - url = "https://download.fcitx-im.org/fcitx-rime/${pname}-${version}.tar.xz"; 9 - sha256 = "0bd8snfa6jr8dhnm0s0z021iryh5pbaf7p15rhkgbigw2pssczpr"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx librime brise hicolor-icon-theme ]; 14 - 15 - # cmake cannont automatically find our nonstandard brise install location 16 - cmakeFlags = [ "-DRIME_DATA_DIR=${brise}/share/rime-data" ]; 17 - 18 - preInstall = '' 19 - substituteInPlace src/cmake_install.cmake \ 20 - --replace ${fcitx} $out 21 - substituteInPlace data/cmake_install.cmake \ 22 - --replace ${fcitx} $out 23 - ''; 24 - 25 - meta = with lib; { 26 - isFcitxEngine = true; 27 - homepage = "https://github.com/fcitx/fcitx-rime"; 28 - downloadPage = "https://download.fcitx-im.org/fcitx-rime/"; 29 - description = "Rime support for Fcitx"; 30 - license = licenses.gpl2; 31 - platforms = platforms.linux; 32 - maintainers = with maintainers; [ sifmelcara ]; 33 - # this package is deprecated, please use fcitx5 instead. 34 - # and it cannot be built with the new version of librime 35 - broken = true; 36 - }; 37 - }
-42
pkgs/tools/inputmethods/fcitx-engines/fcitx-skk/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkg-config, fcitx, libskk, skk-dicts }: 2 - 3 - stdenv.mkDerivation { 4 - pname = "fcitx-skk"; 5 - version = "0.1.4"; 6 - src = fetchFromGitHub { 7 - owner = "fcitx"; 8 - repo = "fcitx-skk"; 9 - rev = "f66d0f56a40ff833edbfa68a4be4eaa2e93d0e3d"; 10 - sha256 = "1yl2syqrk212h26vzzkwl19fyp71inqmsli9411h4n2hbcp6m916"; 11 - }; 12 - 13 - nativeBuildInputs = [ cmake pkg-config ]; 14 - buildInputs = [ fcitx libskk skk-dicts ]; 15 - 16 - cmakeFlags = [ "-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.combined" 17 - "-DENABLE_QT=FALSE" 18 - ]; 19 - preInstall = '' 20 - substituteInPlace src/cmake_install.cmake \ 21 - --replace ${fcitx} $out 22 - substituteInPlace po/cmake_install.cmake \ 23 - --replace ${fcitx} $out 24 - substituteInPlace data/cmake_install.cmake \ 25 - --replace ${fcitx} $out 26 - ''; 27 - 28 - meta = with lib; { 29 - isFcitxEngine = true; 30 - description = "A SKK style input method engine for fcitx"; 31 - longDescription = '' 32 - Fcitx-skk is an input method engine for fcitx. It is based on libskk and thus 33 - provides basic features of SKK Japanese input method such as kana-to-kanji conversion, 34 - new word registration, completion, numeric conversion, abbrev mode, kuten input, 35 - hankaku-katakana input, and re-conversion. 36 - ''; 37 - license = licenses.gpl3Plus; 38 - platforms = platforms.linux; 39 - maintainers = with maintainers; [ yuriaisaka ]; 40 - }; 41 - 42 - }
-30
pkgs/tools/inputmethods/fcitx-engines/fcitx-table-extra/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, gettext }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-table-extra"; 5 - version = "0.3.8"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-table-extra/${pname}-${version}.tar.xz"; 9 - sha256 = "c91bb19c1a7b53c5339bf2f75ae83839020d337990f237a8b9bc0f4416c120ef"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake ]; 13 - buildInputs = [ fcitx gettext ]; 14 - 15 - preInstall = '' 16 - substituteInPlace tables/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - ''; 19 - 20 - meta = with lib; { 21 - isFcitxEngine = true; 22 - homepage = "https://github.com/fcitx/fcitx-table-extra"; 23 - downloadPage = "http://download.fcitx-im.org/fcitx-table-extra/"; 24 - description = "Provides extra table for Fcitx, including Boshiamy, Zhengma, Cangjie, and Quick"; 25 - license = licenses.gpl2Plus; 26 - platforms = platforms.linux; 27 - maintainers = with maintainers; [ linc01n ]; 28 - }; 29 - 30 - }
-30
pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, gettext }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-table-other"; 5 - version = "0.2.4"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-table-other/${pname}-${version}.tar.xz"; 9 - sha256 = "1di60lr6l5k2sdwi3yrc0hl89j2k0yipayrsn803vd040w1fgfhq"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake ]; 13 - buildInputs = [ fcitx gettext ]; 14 - 15 - preInstall = '' 16 - substituteInPlace tables/cmake_install.cmake \ 17 - --replace ${fcitx} $out 18 - ''; 19 - 20 - meta = with lib; { 21 - isFcitxEngine = true; 22 - homepage = "https://github.com/fcitx/fcitx-table-other"; 23 - downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; 24 - description = "Provides some other tables for Fcitx"; 25 - license = licenses.gpl3Plus; 26 - platforms = platforms.linux; 27 - maintainers = with maintainers; [ ericsagnes ]; 28 - }; 29 - 30 - }
-34
pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, fcitx, gettext, pkg-config }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-unikey"; 5 - version = "0.2.5"; 6 - 7 - src = fetchurl { 8 - url = "http://download.fcitx-im.org/fcitx-unikey/${pname}-${version}.tar.xz"; 9 - sha256 = "063vc29v7ycaai98v3z4q319sv9sm91my17pmhblw1vifxnw02wf"; 10 - }; 11 - 12 - nativeBuildInputs = [ cmake pkg-config ]; 13 - buildInputs = [ fcitx gettext ]; 14 - 15 - env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; 16 - 17 - preInstall = '' 18 - substituteInPlace src/cmake_install.cmake \ 19 - --replace ${fcitx} $out 20 - substituteInPlace data/cmake_install.cmake \ 21 - --replace ${fcitx} $out 22 - ''; 23 - 24 - meta = with lib; { 25 - isFcitxEngine = true; 26 - homepage = "https://github.com/fcitx/fcitx-unikey"; 27 - downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; 28 - description = "Fcitx wrapper for unikey"; 29 - license = licenses.gpl3Plus; 30 - platforms = platforms.linux; 31 - maintainers = with maintainers; [ ericsagnes ]; 32 - }; 33 - 34 - }
-11
pkgs/tools/inputmethods/fcitx/default.nix
··· 1 - { callPackage, plugins ? [] }: 2 - 3 - let 4 - unwrapped = callPackage ./unwrapped.nix { }; 5 - wrapped = callPackage ./wrapper.nix { 6 - plugins = plugins; 7 - fcitx = unwrapped; 8 - }; 9 - in if plugins == [] 10 - then unwrapped 11 - else wrapped
-34
pkgs/tools/inputmethods/fcitx/fcitx-configtool.nix
··· 1 - { lib, stdenv, fetchurl, makeWrapper, pkg-config, cmake, fcitx, gtk3, isocodes, gnome }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "fcitx-configtool"; 5 - version = "0.4.10"; 6 - 7 - meta = with lib; { 8 - description = "GTK-based config tool for Fcitx"; 9 - license = licenses.gpl2; 10 - platforms = platforms.linux; 11 - maintainers = with maintainers; [ cdepillabout ]; 12 - }; 13 - 14 - src = fetchurl { 15 - url = "https://download.fcitx-im.org/fcitx-configtool/fcitx-configtool-${version}.tar.xz"; 16 - sha256 = "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"; 17 - }; 18 - 19 - nativeBuildInputs = [ cmake pkg-config makeWrapper ]; 20 - buildInputs = [ fcitx isocodes gtk3 gnome.adwaita-icon-theme ]; 21 - 22 - # Patch paths to `fcitx-remote` 23 - prePatch = '' 24 - for f in gtk{3,}/config_widget.c; do 25 - substituteInPlace $f \ 26 - --replace 'EXEC_PREFIX "/bin/fcitx-remote"' '"${fcitx}/bin/fcitx-remote"' 27 - done 28 - ''; 29 - 30 - preFixup = '' 31 - wrapProgram $out/bin/fcitx-config-gtk3 \ 32 - --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"; 33 - ''; 34 - }
-38
pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
··· 1 - { lib, mkDerivation, fetchFromGitLab 2 - , cmake 3 - , extra-cmake-modules 4 - , fcitx 5 - , pkg-config 6 - , qtbase 7 - }: 8 - 9 - mkDerivation rec { 10 - pname = "fcitx-qt5"; 11 - version = "1.2.3"; 12 - 13 - src = fetchFromGitLab { 14 - owner = "fcitx"; 15 - repo = pname; 16 - rev = version; 17 - sha256 = "0860v3rxsh054wkkbawvyin5mk0flp4cwfcpmcpq147lvdm5lq2i"; 18 - }; 19 - 20 - nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ]; 21 - 22 - buildInputs = [ fcitx qtbase ]; 23 - 24 - preConfigure = '' 25 - substituteInPlace platforminputcontext/CMakeLists.txt \ 26 - --replace \$"{CMAKE_INSTALL_QTPLUGINDIR}" $out/${qtbase.qtPluginPrefix} 27 - substituteInPlace quickphrase-editor/CMakeLists.txt \ 28 - --replace \$"{FCITX4_ADDON_INSTALL_DIR}" $out/lib/fcitx 29 - ''; 30 - 31 - meta = with lib; { 32 - homepage = "https://gitlab.com/fcitx/fcitx-qt5"; 33 - description = "Qt5 IM Module for Fcitx"; 34 - license = licenses.gpl2; 35 - platforms = platforms.linux; 36 - maintainers = with maintainers; [ ericsagnes ]; 37 - }; 38 - }
-42
pkgs/tools/inputmethods/fcitx/find-enchant-lib.patch
··· 1 - diff --git a/cmake/FindEnchant.cmake b/cmake/FindEnchant.cmake 2 - index 7c182e6a..5537595e 100644 3 - --- a/cmake/FindEnchant.cmake 4 - +++ b/cmake/FindEnchant.cmake 5 - @@ -16,7 +16,7 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 6 - endif(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 7 - 8 - find_package(PkgConfig) 9 - -pkg_check_modules(PC_ENCHANT enchant) 10 - +pkg_check_modules(PC_ENCHANT enchant-2) 11 - 12 - find_path(ENCHANT_INCLUDE_DIR 13 - NAMES enchant.h 14 - @@ -24,7 +24,7 @@ find_path(ENCHANT_INCLUDE_DIR 15 - PATH_SUFFIXES "enchant") 16 - 17 - find_library(ENCHANT_LIBRARIES 18 - - NAMES enchant 19 - + NAMES enchant-2 20 - HINTS ${PC_ENCHANT_LIBRARY_DIRS}) 21 - 22 - if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 23 - @@ -39,7 +39,7 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 24 - #include <stdlib.h> 25 - #include <stddef.h> 26 - #include <string.h> 27 - - #include <enchant/enchant.h> 28 - + #include <enchant-2/enchant.h> 29 - 30 - EnchantBroker *enchant_broker_init(); 31 - char **enchant_dict_suggest(EnchantDict *dict, const char *str, 32 - @@ -78,6 +78,10 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 33 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") 34 - endif() 35 - 36 - +if(ENCHANT_API_COMPATIBLE) 37 - + set(ENCHANT_LIBRARY_FILENAME ${ENCHANT_LIBRARIES}) 38 - +endif(ENCHANT_API_COMPATIBLE) 39 - + 40 - include(FindPackageHandleStandardArgs) 41 - find_package_handle_standard_args(Enchant DEFAULT_MSG ENCHANT_LIBRARIES 42 - ENCHANT_INCLUDE_DIR ENCHANT_API_COMPATIBLE)
-105
pkgs/tools/inputmethods/fcitx/unwrapped.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, cmake, intltool, gettext 2 - , libxml2, enchant2, isocodes, icu, libpthreadstubs 3 - , pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon 4 - , dbus, gtk2, gtk3, qt4, extra-cmake-modules 5 - , xkeyboard_config, pcre, libuuid, xorg, makeWrapper 6 - , withPinyin ? true 7 - , fetchFromGitLab 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 - pname = "fcitx"; 40 - version = "4.2.9.6"; 41 - 42 - src = fetchFromGitLab { 43 - owner = "fcitx"; 44 - repo = "fcitx"; 45 - rev = version; 46 - sha256 = "0j5vaf930lb21gx4h7z6mksh1fazqw32gajjjkyir94wbmml9n3s"; 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 - + 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 - patches = [ ./find-enchant-lib.patch ]; 63 - 64 - postPatch = '' 65 - substituteInPlace src/frontend/qt/CMakeLists.txt \ 66 - --replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins 67 - 68 - patchShebangs cmake/ 69 - ''; 70 - 71 - postInstall = '' 72 - wrapProgram $out/bin/fcitx \ 73 - --prefix PATH : "${xorg.xmodmap}/bin" 74 - ''; 75 - 76 - nativeBuildInputs = [ cmake extra-cmake-modules intltool pkg-config pcre makeWrapper ]; 77 - 78 - buildInputs = [ 79 - xkeyboard_config enchant2 gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile 80 - libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid 81 - ]; 82 - 83 - cmakeFlags = [ 84 - "-DENABLE_QT_IM_MODULE=ON" 85 - "-DENABLE_GTK2_IM_MODULE=ON" 86 - "-DENABLE_GTK3_IM_MODULE=ON" 87 - "-DENABLE_GIR=OFF" 88 - "-DENABLE_OPENCC=OFF" 89 - "-DENABLE_PRESAGE=OFF" 90 - "-DENABLE_XDGAUTOSTART=OFF" 91 - "-DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"}" 92 - "-DENABLE_TABLE=ON" 93 - "-DENABLE_SPELL=ON" 94 - "-DENABLE_QT_GUI=ON" 95 - "-DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml'" 96 - ]; 97 - 98 - meta = with lib; { 99 - homepage = "https://github.com/fcitx/fcitx"; 100 - description = "A Flexible Input Method Framework"; 101 - license = licenses.gpl2; 102 - platforms = platforms.linux; 103 - maintainers = with maintainers; [ ericsagnes ]; 104 - }; 105 - }
-14
pkgs/tools/inputmethods/fcitx/wrapper.nix
··· 1 - { symlinkJoin, fcitx, fcitx-configtool, makeWrapper, plugins, libsForQt5 }: 2 - 3 - symlinkJoin { 4 - name = "fcitx-with-plugins-${fcitx.version}"; 5 - 6 - paths = [ fcitx fcitx-configtool libsForQt5.fcitx-qt5 ] ++ plugins; 7 - 8 - nativeBuildInputs = [ makeWrapper ]; 9 - 10 - postBuild = '' 11 - wrapProgram $out/bin/fcitx \ 12 - --set FCITXDIR "$out/" 13 - ''; 14 - }
+4
pkgs/top-level/aliases.nix
··· 511 511 fuse2fs = if stdenv.isLinux then e2fsprogs.fuse2fs else null; # Added 2022-03-27 preserve, reason: convenience, arch has a package named fuse2fs too. 512 512 fwupdate = throw "fwupdate was merged into fwupd"; # Added 2020-05-19 513 513 514 + fcitx = throw "fcitx4 is deprecated, please use fcitx5 instead."; # Added 2023-03-13 515 + fcitx-engines = throw "fcitx4 is deprecated, please use fcitx5 instead."; # Added 2023-03-13 516 + fcitx-configtools = throw "fcitx4 is deprecated, please use fcitx5 instead."; # Added 2023-03-13 517 + 514 518 ### G ### 515 519 516 520 g4py = python3Packages.geant4; # Added 2020-06-06
-37
pkgs/top-level/all-packages.nix
··· 7298 7298 7299 7299 fatsort = callPackage ../tools/filesystems/fatsort { }; 7300 7300 7301 - fcitx = callPackage ../tools/inputmethods/fcitx { 7302 - plugins = []; 7303 - }; 7304 - 7305 - fcitx-engines = recurseIntoAttrs { 7306 - 7307 - anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; 7308 - 7309 - chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; 7310 - 7311 - hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; 7312 - 7313 - unikey = callPackage ../tools/inputmethods/fcitx-engines/fcitx-unikey { }; 7314 - 7315 - rime = callPackage ../tools/inputmethods/fcitx-engines/fcitx-rime { }; 7316 - 7317 - m17n = callPackage ../tools/inputmethods/fcitx-engines/fcitx-m17n { }; 7318 - 7319 - mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { 7320 - python = python2; 7321 - inherit (python2Packages) gyp; 7322 - protobuf = pkgs.protobuf3_8.overrideDerivation (_: { stdenv = clangStdenv; }); 7323 - }; 7324 - 7325 - table-extra = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-extra { }; 7326 - 7327 - table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; 7328 - 7329 - cloudpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-cloudpinyin { }; 7330 - 7331 - libpinyin = libsForQt5.callPackage ../tools/inputmethods/fcitx-engines/fcitx-libpinyin { }; 7332 - 7333 - skk = callPackage ../tools/inputmethods/fcitx-engines/fcitx-skk { }; 7334 - }; 7335 - 7336 - fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; 7337 - 7338 7301 chewing-editor = libsForQt5.callPackage ../applications/misc/chewing-editor { }; 7339 7302 7340 7303 fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { };
-2
pkgs/top-level/qt5-packages.nix
··· 80 80 81 81 drumstick = callPackage ../development/libraries/drumstick { }; 82 82 83 - fcitx-qt5 = callPackage ../tools/inputmethods/fcitx/fcitx-qt5.nix { }; 84 - 85 83 fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; 86 84 87 85 qgpgme = callPackage ../development/libraries/gpgme { };