fcitx5-qt: add support for qt6 applications

This commit is contained in:
Nick Cao 2022-04-18 23:19:05 +08:00
parent f866bfdf02
commit e6b6a9d2a2
No known key found for this signature in database
GPG Key ID: 068A56CEF48FA2C1

View File

@ -8,6 +8,7 @@
, libxcb
, libXdmcp
, qtbase
, qt6
}:
mkDerivation rec {
@ -24,11 +25,15 @@ mkDerivation rec {
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}
'';
cmakeFlags = [
# adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
"-DCMAKE_PREFIX_PATH=${qt6.qtbase.dev}"
"-DENABLE_QT4=0"
"-DENABLE_QT6=0"
"-DENABLE_QT6=1"
];
nativeBuildInputs = [