qt6Packages.fcitx5-qt: init

This commit is contained in:
Nick Cao 2024-02-28 22:28:22 -05:00
parent c6caed479a
commit 6479f63ecb
No known key found for this signature in database
2 changed files with 20 additions and 20 deletions

View file

@ -1,19 +1,19 @@
{ lib
, mkDerivation
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, qtx11extras
, libxcb
, libXdmcp
, qtbase
, qt6
, qtwayland
, wrapQtAppsHook
, wayland
}:
mkDerivation rec {
pname = "fcitx5-qt";
let
majorVersion = lib.versions.major qtbase.version;
in
stdenv.mkDerivation rec {
pname = "fcitx5-qt${majorVersion}";
version = "5.1.4";
src = fetchFromGitHub {
@ -23,30 +23,28 @@ mkDerivation rec {
sha256 = "sha256-bVH2US/uEZGERslnAh/fyUbzR9fK1UfG4J+mOmrIE8Y=";
};
preConfigure = ''
substituteInPlace qt5/platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
substituteInPlace qt6/platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QT6PLUGINDIR}" $out/${qt6.qtbase.qtPluginPrefix}
postPatch = ''
substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
'';
cmakeFlags = [
# adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
"-DCMAKE_PREFIX_PATH=${qt6.qtbase};${qt6.qtwayland}"
"-DENABLE_QT4=0"
"-DENABLE_QT6=1"
"-DENABLE_QT4=OFF"
"-DENABLE_QT5=OFF"
"-DENABLE_QT6=OFF"
"-DENABLE_QT${majorVersion}=ON"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
wrapQtAppsHook
];
buildInputs = [
qtbase
qtwayland
fcitx5
qtx11extras
libxcb
libXdmcp
wayland
];

View file

@ -32,6 +32,8 @@ makeScopeWithSplicing' {
accounts-qt = callPackage ../development/libraries/accounts-qt { };
appstream-qt = callPackage ../development/libraries/appstream/qt.nix { };
fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { };
kdsoap = callPackage ../development/libraries/kdsoap { };
kcolorpicker = callPackage ../development/libraries/kcolorpicker { };