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

View file

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

View file

@ -10,7 +10,6 @@
, libskk
, qtbase
, skk-dicts
, wrapQtAppsHook
, enableQt ? false
}:
@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
extra-cmake-modules
gettext
pkg-config
] ++ lib.optional enableQt wrapQtAppsHook;
];
buildInputs = [
fcitx5
@ -41,10 +40,13 @@ stdenv.mkDerivation rec {
];
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"
];
dontWrapQtApps = true;
meta = with lib; {
description = "Input method engine for Fcitx5, which uses libskk as its backend";
homepage = "https://github.com/fcitx/fcitx5-skk";

View file

@ -6,7 +6,7 @@
, fcitx5
, fcitx5-qt
, gettext
, wrapQtAppsHook
, qtbase
}:
stdenv.mkDerivation rec {
@ -20,9 +20,23 @@ stdenv.mkDerivation rec {
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; {
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-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 ###
g4py = python3Packages.geant4; # Added 2020-06-06

View file

@ -8042,29 +8042,17 @@ with pkgs;
chewing-editor = libsForQt5.callPackage ../applications/misc/chewing-editor { };
fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { };
fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { };
fcitx5 = callPackage ../tools/inputmethods/fcitx5 { };
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 {
abseil-cpp = abseil-cpp.override {
cxxStandard = "17";
};
};
fcitx5-skk = libsForQt5.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-skk = qt6Packages.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { };
fcitx5-anthy = callPackage ../tools/inputmethods/fcitx5/fcitx5-anthy.nix { };
@ -24410,7 +24398,7 @@ with pkgs;
qt6 = recurseIntoAttrs (callPackage ../development/libraries/qt-6 { });
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;
});

View file

@ -100,6 +100,16 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
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 { };
qgpgme = callPackage ../development/libraries/gpgme { };

View file

@ -10,6 +10,7 @@
, generateSplicesForMkScope
, stdenv
, pkgsHostTarget
, kdePackages
}:
let
@ -32,8 +33,18 @@ makeScopeWithSplicing' {
accounts-qt = callPackage ../development/libraries/accounts-qt { };
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-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 { };
kcolorpicker = callPackage ../development/libraries/kcolorpicker { };