Merge pull request #279683 from NickCao/fcitx5-qt6

fcitx5-*: build for both qt versions
This commit is contained in:
Nick Cao 2024-03-01 11:26:16 -05:00 committed by GitHub
commit 3d01643d7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 99 additions and 40 deletions

View file

@ -1,5 +1,5 @@
{ lib { lib
, mkDerivation , stdenv
, fetchurl , fetchurl
, fetchFromGitHub , fetchFromGitHub
, cmake , cmake
@ -13,6 +13,7 @@
, opencc , opencc
, curl , curl
, fmt , fmt
, qtbase
, luaSupport ? true , luaSupport ? true
}: }:
@ -29,7 +30,7 @@ let
}; };
in in
mkDerivation rec { stdenv.mkDerivation rec {
pname = "fcitx5-chinese-addons"; pname = "fcitx5-chinese-addons";
version = "5.1.4"; version = "5.1.4";
@ -62,6 +63,12 @@ mkDerivation rec {
fmt fmt
] ++ lib.optional luaSupport fcitx5-lua; ] ++ lib.optional luaSupport fcitx5-lua;
cmakeFlags = [
(lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6"))
];
dontWrapQtApps = true;
meta = with lib; { meta = with lib; {
description = "Addons related to Chinese, including IME previous bundled inside fcitx4"; description = "Addons related to Chinese, including IME previous bundled inside fcitx4";
homepage = "https://github.com/fcitx/fcitx5-chinese-addons"; homepage = "https://github.com/fcitx/fcitx5-chinese-addons";

View file

@ -1,25 +1,33 @@
{ lib { lib
, mkDerivation , stdenv
, fetchFromGitHub , fetchFromGitHub
, cmake , cmake
, extra-cmake-modules , extra-cmake-modules
, pkg-config
, fcitx5 , fcitx5
, fcitx5-qt , fcitx5-qt
, qtx11extras , qtbase
, qtquickcontrols2 , qtsvg
, qtwayland
, qtdeclarative
, qtx11extras ? null
, kitemviews
, kwidgetsaddons , kwidgetsaddons
, qtquickcontrols2 ? null
, kcoreaddons
, kdeclarative , kdeclarative
, kirigami2 , kirigami ? null
, kirigami2 ? null
, isocodes , isocodes
, xkeyboardconfig , xkeyboardconfig
, libxkbfile , libxkbfile
, libXdmcp , libplasma ? null
, plasma5Packages , plasma-framework ? null
, plasma-framework , wrapQtAppsHook
, kcmSupport ? true , kcmSupport ? true
}: }:
mkDerivation rec { stdenv.mkDerivation rec {
pname = "fcitx5-configtool"; pname = "fcitx5-configtool";
version = "5.1.4"; version = "5.1.4";
@ -31,30 +39,43 @@ mkDerivation rec {
}; };
cmakeFlags = [ cmakeFlags = [
"-DKDE_INSTALL_USE_QT_SYS_PATHS=ON" (lib.cmakeBool "KDE_INSTALL_USE_QT_SYS_PATHS" true)
(lib.cmakeBool "ENABLE_KCM" kcmSupport)
(lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6"))
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
extra-cmake-modules extra-cmake-modules
pkg-config
wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = [
fcitx5 fcitx5
fcitx5-qt fcitx5-qt
qtx11extras qtbase
qtquickcontrols2 qtsvg
kirigami2 qtwayland
kitemviews
kwidgetsaddons
isocodes isocodes
xkeyboardconfig xkeyboardconfig
libxkbfile libxkbfile
libXdmcp ] ++ lib.optionals (lib.versions.major qtbase.version == "5") [
] ++ lib.optionals kcmSupport [ qtx11extras
] ++ lib.optionals kcmSupport ([
qtdeclarative
kcoreaddons
kdeclarative kdeclarative
kwidgetsaddons ] ++ lib.optionals (lib.versions.major qtbase.version == "5") [
plasma5Packages.kiconthemes qtquickcontrols2
plasma-framework plasma-framework
]; kirigami2
] ++ lib.optionals (lib.versions.major qtbase.version == "6") [
libplasma
kirigami
]);
meta = with lib; { meta = with lib; {
description = "Configuration Tool for Fcitx5"; description = "Configuration Tool for Fcitx5";

View file

@ -10,7 +10,6 @@
, libskk , libskk
, qtbase , qtbase
, skk-dicts , skk-dicts
, wrapQtAppsHook
, enableQt ? false , enableQt ? false
}: }:
@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
extra-cmake-modules extra-cmake-modules
gettext gettext
pkg-config pkg-config
] ++ lib.optional enableQt wrapQtAppsHook; ];
buildInputs = [ buildInputs = [
fcitx5 fcitx5
@ -41,10 +40,13 @@ stdenv.mkDerivation rec {
]; ];
cmakeFlags = [ cmakeFlags = [
"-DENABLE_QT=${toString enableQt}" (lib.cmakeBool "ENABLE_QT" enableQt)
(lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6"))
"-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.L" "-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.L"
]; ];
dontWrapQtApps = true;
meta = with lib; { meta = with lib; {
description = "Input method engine for Fcitx5, which uses libskk as its backend"; description = "Input method engine for Fcitx5, which uses libskk as its backend";
homepage = "https://github.com/fcitx/fcitx5-skk"; homepage = "https://github.com/fcitx/fcitx5-skk";

View file

@ -6,7 +6,7 @@
, fcitx5 , fcitx5
, fcitx5-qt , fcitx5-qt
, gettext , gettext
, wrapQtAppsHook , qtbase
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -20,9 +20,23 @@ stdenv.mkDerivation rec {
sha256 = "sha256-wrsA0gSexOZgsJunozt49GyP9R3Xe2Aci7Q8p3zAM9Q="; sha256 = "sha256-wrsA0gSexOZgsJunozt49GyP9R3Xe2Aci7Q8p3zAM9Q=";
}; };
nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ]; nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = [ fcitx5 fcitx5-qt gettext ]; buildInputs = [
qtbase
fcitx5
fcitx5-qt
gettext
];
cmakeFlags = [
(lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6"))
];
dontWrapQtApps = true;
meta = with lib; { meta = with lib; {
description = "Unikey engine support for Fcitx5"; description = "Unikey engine support for Fcitx5";

View file

@ -321,6 +321,12 @@ mapAliases ({
fcitx-engines = throw "fcitx-engines is deprecated, please use fcitx5 instead."; # Added 2023-03-13 fcitx-engines = throw "fcitx-engines is deprecated, please use fcitx5 instead."; # Added 2023-03-13
fcitx-configtool = throw "fcitx-configtool is deprecated, please use fcitx5 instead."; # Added 2023-03-13 fcitx-configtool = throw "fcitx-configtool is deprecated, please use fcitx5 instead."; # Added 2023-03-13
fcitx5-chinese-addons = libsForQt5.fcitx5-chinese-addons; # Added 2024-03-01
fcitx5-configtool = libsForQt5.fcitx5-configtool; # Added 2024-03-01
fcitx5-skk-qt = libsForQt5.fcitx5-skk-qt; # Added 2024-03-01
fcitx5-unikey = libsForQt5.fcitx5-unikey; # Added 2024-03-01
fcitx5-with-addons = libsForQt5.fcitx5-with-addons; # Added 2024-03-01
### G ### ### G ###
g4py = python3Packages.geant4; # Added 2020-06-06 g4py = python3Packages.geant4; # Added 2020-06-06

View file

@ -8042,29 +8042,17 @@ with pkgs;
chewing-editor = libsForQt5.callPackage ../applications/misc/chewing-editor { }; chewing-editor = libsForQt5.callPackage ../applications/misc/chewing-editor { };
fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { }; fcitx5 = callPackage ../tools/inputmethods/fcitx5 { };
fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { };
fcitx5-bamboo = callPackage ../tools/inputmethods/fcitx5/fcitx5-bamboo.nix { }; fcitx5-bamboo = callPackage ../tools/inputmethods/fcitx5/fcitx5-bamboo.nix { };
fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { };
fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix { fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix {
abseil-cpp = abseil-cpp.override { abseil-cpp = abseil-cpp.override {
cxxStandard = "17"; cxxStandard = "17";
}; };
}; };
fcitx5-skk = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { }; fcitx5-skk = qt6Packages.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { };
fcitx5-skk-qt = fcitx5-skk.override {
enableQt = true;
};
fcitx5-unikey = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { };
fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };
fcitx5-anthy = callPackage ../tools/inputmethods/fcitx5/fcitx5-anthy.nix { }; fcitx5-anthy = callPackage ../tools/inputmethods/fcitx5/fcitx5-anthy.nix { };
@ -24410,7 +24398,7 @@ with pkgs;
qt6 = recurseIntoAttrs (callPackage ../development/libraries/qt-6 { }); qt6 = recurseIntoAttrs (callPackage ../development/libraries/qt-6 { });
qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix {
inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget; inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget kdePackages;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
}); });

View file

@ -100,6 +100,16 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { };
fcitx5-chinese-addons = callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { };
fcitx5-configtool = callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };
fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; };
fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { };
fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { };
futuresql = callPackage ../development/libraries/futuresql { }; futuresql = callPackage ../development/libraries/futuresql { };
qgpgme = callPackage ../development/libraries/gpgme { }; qgpgme = callPackage ../development/libraries/gpgme { };

View file

@ -10,6 +10,7 @@
, generateSplicesForMkScope , generateSplicesForMkScope
, stdenv , stdenv
, pkgsHostTarget , pkgsHostTarget
, kdePackages
}: }:
let let
@ -32,8 +33,18 @@ makeScopeWithSplicing' {
accounts-qt = callPackage ../development/libraries/accounts-qt { }; accounts-qt = callPackage ../development/libraries/accounts-qt { };
appstream-qt = callPackage ../development/libraries/appstream/qt.nix { }; appstream-qt = callPackage ../development/libraries/appstream/qt.nix { };
fcitx5-chinese-addons = callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { };
fcitx5-configtool = kdePackages.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };
fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { };
fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; };
fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { };
fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { };
kdsoap = callPackage ../development/libraries/kdsoap { }; kdsoap = callPackage ../development/libraries/kdsoap { };
kcolorpicker = callPackage ../development/libraries/kcolorpicker { }; kcolorpicker = callPackage ../development/libraries/kcolorpicker { };