Merge pull request #279683 from NickCao/fcitx5-qt6

fcitx5-*: build for both qt versions

authored by Nick Cao and committed by GitHub 3d01643d c999f2e3

+99 -40
+9 -2
pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix
··· 1 1 { lib 2 - , mkDerivation 2 + , stdenv 3 3 , fetchurl 4 4 , fetchFromGitHub 5 5 , cmake ··· 13 13 , opencc 14 14 , curl 15 15 , fmt 16 + , qtbase 16 17 , luaSupport ? true 17 18 }: 18 19 ··· 29 30 }; 30 31 in 31 32 32 - mkDerivation rec { 33 + stdenv.mkDerivation rec { 33 34 pname = "fcitx5-chinese-addons"; 34 35 version = "5.1.4"; 35 36 ··· 61 62 qtwebengine 62 63 fmt 63 64 ] ++ lib.optional luaSupport fcitx5-lua; 65 + 66 + cmakeFlags = [ 67 + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) 68 + ]; 69 + 70 + dontWrapQtApps = true; 64 71 65 72 meta = with lib; { 66 73 description = "Addons related to Chinese, including IME previous bundled inside fcitx4";
+38 -17
pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix
··· 1 1 { lib 2 - , mkDerivation 2 + , stdenv 3 3 , fetchFromGitHub 4 4 , cmake 5 5 , extra-cmake-modules 6 + , pkg-config 6 7 , fcitx5 7 8 , fcitx5-qt 8 - , qtx11extras 9 - , qtquickcontrols2 9 + , qtbase 10 + , qtsvg 11 + , qtwayland 12 + , qtdeclarative 13 + , qtx11extras ? null 14 + , kitemviews 10 15 , kwidgetsaddons 16 + , qtquickcontrols2 ? null 17 + , kcoreaddons 11 18 , kdeclarative 12 - , kirigami2 19 + , kirigami ? null 20 + , kirigami2 ? null 13 21 , isocodes 14 22 , xkeyboardconfig 15 23 , libxkbfile 16 - , libXdmcp 17 - , plasma5Packages 18 - , plasma-framework 24 + , libplasma ? null 25 + , plasma-framework ? null 26 + , wrapQtAppsHook 19 27 , kcmSupport ? true 20 28 }: 21 29 22 - mkDerivation rec { 30 + stdenv.mkDerivation rec { 23 31 pname = "fcitx5-configtool"; 24 32 version = "5.1.4"; 25 33 ··· 31 39 }; 32 40 33 41 cmakeFlags = [ 34 - "-DKDE_INSTALL_USE_QT_SYS_PATHS=ON" 42 + (lib.cmakeBool "KDE_INSTALL_USE_QT_SYS_PATHS" true) 43 + (lib.cmakeBool "ENABLE_KCM" kcmSupport) 44 + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) 35 45 ]; 36 46 37 47 nativeBuildInputs = [ 38 48 cmake 39 49 extra-cmake-modules 50 + pkg-config 51 + wrapQtAppsHook 40 52 ]; 41 53 42 54 buildInputs = [ 43 55 fcitx5 44 56 fcitx5-qt 45 - qtx11extras 46 - qtquickcontrols2 47 - kirigami2 57 + qtbase 58 + qtsvg 59 + qtwayland 60 + kitemviews 61 + kwidgetsaddons 48 62 isocodes 49 63 xkeyboardconfig 50 64 libxkbfile 51 - libXdmcp 52 - ] ++ lib.optionals kcmSupport [ 65 + ] ++ lib.optionals (lib.versions.major qtbase.version == "5") [ 66 + qtx11extras 67 + ] ++ lib.optionals kcmSupport ([ 68 + qtdeclarative 69 + kcoreaddons 53 70 kdeclarative 54 - kwidgetsaddons 55 - plasma5Packages.kiconthemes 71 + ] ++ lib.optionals (lib.versions.major qtbase.version == "5") [ 72 + qtquickcontrols2 56 73 plasma-framework 57 - ]; 74 + kirigami2 75 + ] ++ lib.optionals (lib.versions.major qtbase.version == "6") [ 76 + libplasma 77 + kirigami 78 + ]); 58 79 59 80 meta = with lib; { 60 81 description = "Configuration Tool for Fcitx5";
+5 -3
pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix
··· 10 10 , libskk 11 11 , qtbase 12 12 , skk-dicts 13 - , wrapQtAppsHook 14 13 , enableQt ? false 15 14 }: 16 15 ··· 30 29 extra-cmake-modules 31 30 gettext 32 31 pkg-config 33 - ] ++ lib.optional enableQt wrapQtAppsHook; 32 + ]; 34 33 35 34 buildInputs = [ 36 35 fcitx5 ··· 41 40 ]; 42 41 43 42 cmakeFlags = [ 44 - "-DENABLE_QT=${toString enableQt}" 43 + (lib.cmakeBool "ENABLE_QT" enableQt) 44 + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) 45 45 "-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.L" 46 46 ]; 47 + 48 + dontWrapQtApps = true; 47 49 48 50 meta = with lib; { 49 51 description = "Input method engine for Fcitx5, which uses libskk as its backend";
+17 -3
pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix
··· 6 6 , fcitx5 7 7 , fcitx5-qt 8 8 , gettext 9 - , wrapQtAppsHook 9 + , qtbase 10 10 }: 11 11 12 12 stdenv.mkDerivation rec { ··· 20 20 sha256 = "sha256-wrsA0gSexOZgsJunozt49GyP9R3Xe2Aci7Q8p3zAM9Q="; 21 21 }; 22 22 23 - nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ]; 23 + nativeBuildInputs = [ 24 + cmake 25 + extra-cmake-modules 26 + ]; 24 27 25 - buildInputs = [ fcitx5 fcitx5-qt gettext ]; 28 + buildInputs = [ 29 + qtbase 30 + fcitx5 31 + fcitx5-qt 32 + gettext 33 + ]; 34 + 35 + cmakeFlags = [ 36 + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) 37 + ]; 38 + 39 + dontWrapQtApps = true; 26 40 27 41 meta = with lib; { 28 42 description = "Unikey engine support for Fcitx5";
+6
pkgs/top-level/aliases.nix
··· 321 321 fcitx-engines = throw "fcitx-engines is deprecated, please use fcitx5 instead."; # Added 2023-03-13 322 322 fcitx-configtool = throw "fcitx-configtool is deprecated, please use fcitx5 instead."; # Added 2023-03-13 323 323 324 + fcitx5-chinese-addons = libsForQt5.fcitx5-chinese-addons; # Added 2024-03-01 325 + fcitx5-configtool = libsForQt5.fcitx5-configtool; # Added 2024-03-01 326 + fcitx5-skk-qt = libsForQt5.fcitx5-skk-qt; # Added 2024-03-01 327 + fcitx5-unikey = libsForQt5.fcitx5-unikey; # Added 2024-03-01 328 + fcitx5-with-addons = libsForQt5.fcitx5-with-addons; # Added 2024-03-01 329 + 324 330 ### G ### 325 331 326 332 g4py = python3Packages.geant4; # Added 2020-06-06
+3 -15
pkgs/top-level/all-packages.nix
··· 8042 8042 8043 8043 chewing-editor = libsForQt5.callPackage ../applications/misc/chewing-editor { }; 8044 8044 8045 - fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { }; 8046 - 8047 - fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; 8045 + fcitx5 = callPackage ../tools/inputmethods/fcitx5 { }; 8048 8046 8049 8047 fcitx5-bamboo = callPackage ../tools/inputmethods/fcitx5/fcitx5-bamboo.nix { }; 8050 8048 8051 - fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; 8052 - 8053 8049 fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix { 8054 8050 abseil-cpp = abseil-cpp.override { 8055 8051 cxxStandard = "17"; 8056 8052 }; 8057 8053 }; 8058 8054 8059 - fcitx5-skk = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { }; 8060 - 8061 - fcitx5-skk-qt = fcitx5-skk.override { 8062 - enableQt = true; 8063 - }; 8064 - 8065 - fcitx5-unikey = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; 8066 - 8067 - fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; 8055 + fcitx5-skk = qt6Packages.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { }; 8068 8056 8069 8057 fcitx5-anthy = callPackage ../tools/inputmethods/fcitx5/fcitx5-anthy.nix { }; 8070 8058 ··· 24410 24398 qt6 = recurseIntoAttrs (callPackage ../development/libraries/qt-6 { }); 24411 24399 24412 24400 qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { 24413 - inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget; 24401 + inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget kdePackages; 24414 24402 stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; 24415 24403 }); 24416 24404
+10
pkgs/top-level/qt5-packages.nix
··· 100 100 101 101 fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; 102 102 103 + fcitx5-chinese-addons = callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; 104 + 105 + fcitx5-configtool = callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; 106 + 107 + fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; }; 108 + 109 + fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; 110 + 111 + fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; 112 + 103 113 futuresql = callPackage ../development/libraries/futuresql { }; 104 114 105 115 qgpgme = callPackage ../development/libraries/gpgme { };
+11
pkgs/top-level/qt6-packages.nix
··· 10 10 , generateSplicesForMkScope 11 11 , stdenv 12 12 , pkgsHostTarget 13 + , kdePackages 13 14 }: 14 15 15 16 let ··· 32 33 accounts-qt = callPackage ../development/libraries/accounts-qt { }; 33 34 appstream-qt = callPackage ../development/libraries/appstream/qt.nix { }; 34 35 36 + fcitx5-chinese-addons = callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; 37 + 38 + fcitx5-configtool = kdePackages.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; 39 + 35 40 fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; 41 + 42 + fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; }; 43 + 44 + fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; 45 + 46 + fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; 36 47 37 48 kdsoap = callPackage ../development/libraries/kdsoap { }; 38 49