lol

kime: 2.5.6 -> 3.0.2

authored by

Riey and committed by
pennae
0db47bd5 7eb82433

+61 -42
+11
nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
··· 278 278 </listitem> 279 279 <listitem> 280 280 <para> 281 + Kime has been updated from 2.5.6 to 3.0.2 and the 282 + <literal>i18n.inputMethod.kime.config</literal> option has 283 + been removed. Users should use 284 + <literal>daemonModules</literal>, 285 + <literal>iconColor</literal>, and 286 + <literal>extraConfig</literal> options under 287 + <literal>i18n.inputMethod.kime</literal> instead. 288 + </para> 289 + </listitem> 290 + <listitem> 291 + <para> 281 292 <literal>llvmPackages_rocm.llvm</literal> will not contain 282 293 <literal>clang</literal> or <literal>compiler-rt</literal>. 283 294 <literal>llvmPackages_rocm.clang</literal> will not contain
+2
nixos/doc/manual/release-notes/rl-2305.section.md
··· 71 71 72 72 - The [services.unifi-video.openFirewall](#opt-services.unifi-video.openFirewall) module option default value has been changed from `true` to `false`. You will need to explicitly set this option to `true`, or configure your firewall. 73 73 74 + - Kime has been updated from 2.5.6 to 3.0.2 and the `i18n.inputMethod.kime.config` option has been removed. Users should use `daemonModules`, `iconColor`, and `extraConfig` options under `i18n.inputMethod.kime` instead. 75 + 74 76 - `llvmPackages_rocm.llvm` will not contain `clang` or `compiler-rt`. `llvmPackages_rocm.clang` will not contain `llvm`. `llvmPackages_rocm.clangNoCompilerRt` has been removed in favor of using `llvmPackages_rocm.clang-unwrapped`. 75 77 76 78 - The EC2 image module previously detected and automatically mounted ext3-formatted instance store devices and partitions in stage-1 (initramfs), storing `/tmp` on the first discovered device. This behaviour, which only catered to very specific use cases and could not be disabled, has been removed. Users relying on this should provide their own implementation, and probably use ext4 and perform the mount in stage-2.
+35 -33
nixos/modules/i18n/input-method/kime.nix
··· 1 1 { config, pkgs, lib, generators, ... }: 2 - with lib; 3 - let 4 - cfg = config.i18n.inputMethod.kime; 5 - yamlFormat = pkgs.formats.yaml { }; 6 - in 7 - { 8 - options = { 9 - i18n.inputMethod.kime = { 10 - config = mkOption { 11 - type = yamlFormat.type; 12 - default = { }; 13 - example = literalExpression '' 14 - { 15 - daemon = { 16 - modules = ["Xim" "Indicator"]; 17 - }; 18 - 19 - indicator = { 20 - icon_color = "White"; 21 - }; 2 + let imcfg = config.i18n.inputMethod; 3 + in { 4 + imports = [ 5 + (lib.mkRemovedOptionModule [ "i18n" "inputMethod" "kime" "config" ] "Use i18n.inputMethod.kime.* instead") 6 + ]; 22 7 23 - engine = { 24 - hangul = { 25 - layout = "dubeolsik"; 26 - }; 27 - }; 28 - } 29 - ''; 30 - description = lib.mdDoc '' 31 - kime configuration. Refer to <https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md> for details on supported values. 32 - ''; 33 - }; 8 + options.i18n.inputMethod.kime = { 9 + daemonModules = lib.mkOption { 10 + type = lib.types.listOf (lib.types.enum [ "Xim" "Wayland" "Indicator" ]); 11 + default = [ "Xim" "Wayland" "Indicator" ]; 12 + example = [ "Xim" "Indicator" ]; 13 + description = lib.mdDoc '' 14 + List of enabled daemon modules 15 + ''; 16 + }; 17 + iconColor = lib.mkOption { 18 + type = lib.types.enum [ "Black" "White" ]; 19 + default = "Black"; 20 + example = "White"; 21 + description = lib.mdDoc '' 22 + Color of the indicator icon 23 + ''; 24 + }; 25 + extraConfig = lib.mkOption { 26 + type = lib.types.lines; 27 + default = ""; 28 + description = lib.mdDoc '' 29 + extra kime configuration. Refer to <https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md> for details on supported values. 30 + ''; 34 31 }; 35 32 }; 36 33 37 - config = mkIf (config.i18n.inputMethod.enabled == "kime") { 34 + config = lib.mkIf (imcfg.enabled == "kime") { 38 35 i18n.inputMethod.package = pkgs.kime; 39 36 40 37 environment.variables = { ··· 43 40 XMODIFIERS = "@im=kime"; 44 41 }; 45 42 46 - environment.etc."xdg/kime/config.yaml".text = replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.config); 43 + environment.etc."xdg/kime/config.yaml".text = '' 44 + daemon: 45 + modules: [${lib.concatStringsSep "," imcfg.kime.daemonModules}] 46 + indicator: 47 + icon_color: ${imcfg.kime.iconColor} 48 + '' + imcfg.kime.extraConfig; 47 49 }; 48 50 49 51 # uses attributes of the linked package
+13 -9
pkgs/tools/inputmethods/kime/default.nix
··· 2 2 , withWayland ? true 3 3 , withIndicator ? true, dbus, libdbusmenu 4 4 , withXim ? true, xorg, cairo 5 - , withGtk2 ? true, gtk2 6 5 , withGtk3 ? true, gtk3 6 + , withGtk4 ? true, gtk4 7 7 , withQt5 ? true, qt5 8 + , withQt6 ? false, qt6 8 9 }: 9 10 10 11 let 11 - cmake_args = lib.optionals withGtk2 ["-DENABLE_GTK2=ON"] 12 - ++ lib.optionals withGtk3 ["-DENABLE_GTK3=ON"] 13 - ++ lib.optionals withQt5 ["-DENABLE_QT5=ON"]; 12 + cmake_args = lib.optionals withGtk3 ["-DENABLE_GTK3=ON"] 13 + ++ lib.optionals withGtk4 ["-DENABLE_GTK4=ON"] 14 + ++ lib.optionals withQt5 ["-DENABLE_QT5=ON"] 15 + ++ lib.optionals withQt6 ["-DENABLE_QT6=ON"]; 14 16 15 17 optFlag = w: (if w then "1" else "0"); 16 18 in 17 19 stdenv.mkDerivation rec { 18 20 pname = "kime"; 19 - version = "2.5.6"; 21 + version = "3.0.2"; 20 22 21 23 src = fetchFromGitHub { 22 24 owner = "Riey"; 23 25 repo = pname; 24 26 rev = "v${version}"; 25 - sha256 = "sha256-r5luI6B4IjNTbh2tzpqabokgwkmbyXrA61+F2HDEWuo="; 27 + sha256 = "sha256-qLQ6DmV7KHhdXWR5KtO52cmXBm818zKJVj4nxsR14dc="; 26 28 }; 27 29 28 30 cargoDeps = rustPlatform.fetchCargoTarball { 29 31 inherit src; 30 - sha256 = "sha256-GvBnNPY51RPt+I73oet5tB/EE2UsEPKbelJZkSY3xNw="; 32 + sha256 = "sha256-/o9b7YvrpV+IujkllFWAz6Mg4CbS9BInF8antfZ0Vsw="; 31 33 }; 32 34 33 35 # Replace autostart path ··· 68 70 export KIME_ICON_DIR=share/icons 69 71 export KIME_LIB_DIR=lib 70 72 export KIME_QT5_DIR=lib/qt-${qt5.qtbase.version} 73 + export KIME_QT6_DIR=lib/qt-${qt6.qtbase.version} 71 74 bash scripts/install.sh "$out" 72 75 runHook postInstall 73 76 ''; ··· 84 87 85 88 buildInputs = lib.optionals withIndicator [ dbus libdbusmenu ] 86 89 ++ lib.optionals withXim [ xorg.libxcb cairo ] 87 - ++ lib.optionals withGtk2 [ gtk2 ] 88 90 ++ lib.optionals withGtk3 [ gtk3 ] 89 - ++ lib.optionals withQt5 [ qt5.qtbase ]; 91 + ++ lib.optionals withGtk4 [ gtk4 ] 92 + ++ lib.optionals withQt5 [ qt5.qtbase ] 93 + ++ lib.optionals withQt6 [ qt6.qtbase ]; 90 94 91 95 nativeBuildInputs = [ 92 96 pkg-config