From 51f1291ea5091d226228255beb2adf6a9ea04fb6 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 8 Jan 2024 16:08:12 -0500 Subject: [PATCH] fcitx5-unikey: build for both qt versions --- .../inputmethods/fcitx5/fcitx5-unikey.nix | 20 ++++++++++++++++--- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- pkgs/top-level/qt5-packages.nix | 2 ++ pkgs/top-level/qt6-packages.nix | 2 ++ 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix index d2d02843c93e..a1a077264b3a 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix @@ -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"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a5296a47bd51..a66e3da5a316 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -322,6 +322,7 @@ mapAliases ({ fcitx-configtool = throw "fcitx-configtool is deprecated, please use fcitx5 instead."; # Added 2023-03-13 fcitx5-skk-qt = libsForQt5.fcitx5-skk-qt; # Added 2024-03-01 + fcitx5-unikey = libsForQt5.fcitx5-unikey; # Added 2024-03-01 ### G ### diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c661f92d8570..191e8b385428 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8058,8 +8058,6 @@ with pkgs; fcitx5-skk = qt6Packages.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { }; - 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 { }; diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index f00d65d22488..bfde2a2c79ef 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -102,6 +102,8 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; }; + fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; + futuresql = callPackage ../development/libraries/futuresql { }; qgpgme = callPackage ../development/libraries/gpgme { }; diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index d99ad26aa2fc..992b8be11825 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -36,6 +36,8 @@ makeScopeWithSplicing' { fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; }; + fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; + kdsoap = callPackage ../development/libraries/kdsoap { }; kcolorpicker = callPackage ../development/libraries/kcolorpicker { };