2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2020-12-13 04:07:21 +01:00
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, fcitx5
|
|
|
|
, qtx11extras
|
|
|
|
, libxcb
|
|
|
|
, libXdmcp
|
2021-01-17 17:52:53 +01:00
|
|
|
, qtbase
|
2022-04-18 17:19:05 +02:00
|
|
|
, qt6
|
2020-12-13 04:07:21 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "fcitx5-qt";
|
2022-09-04 11:22:36 +02:00
|
|
|
version = "5.0.15";
|
2020-12-13 04:07:21 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fcitx";
|
2022-02-03 09:14:22 +01:00
|
|
|
repo = pname;
|
2020-12-13 04:07:21 +01:00
|
|
|
rev = version;
|
2022-09-04 11:22:36 +02:00
|
|
|
sha256 = "sha256-yQFYol4rEXmQBJWoc96yWJkJc3RVP6U964tdJdkGelU=";
|
2020-12-13 04:07:21 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 17:52:53 +01:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace qt5/platforminputcontext/CMakeLists.txt \
|
|
|
|
--replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
|
2022-04-18 17:19:05 +02:00
|
|
|
substituteInPlace qt6/platforminputcontext/CMakeLists.txt \
|
|
|
|
--replace \$"{CMAKE_INSTALL_QT6PLUGINDIR}" $out/${qt6.qtbase.qtPluginPrefix}
|
2021-01-17 17:52:53 +01:00
|
|
|
'';
|
|
|
|
|
2020-12-13 04:07:21 +01:00
|
|
|
cmakeFlags = [
|
2022-04-18 17:19:05 +02:00
|
|
|
# adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
|
|
|
|
"-DCMAKE_PREFIX_PATH=${qt6.qtbase.dev}"
|
2020-12-13 04:07:21 +01:00
|
|
|
"-DENABLE_QT4=0"
|
2022-04-18 17:19:05 +02:00
|
|
|
"-DENABLE_QT6=1"
|
2020-12-13 04:07:21 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fcitx5
|
|
|
|
qtx11extras
|
|
|
|
libxcb
|
|
|
|
libXdmcp
|
|
|
|
];
|
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
meta = with lib; {
|
2020-12-13 04:07:21 +01:00
|
|
|
description = "Fcitx5 Qt Library";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx5-qt";
|
|
|
|
license = with licenses; [ lgpl21Plus bsd3 ];
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|