2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2024-02-29 03:28:22 +00:00
|
|
|
, stdenv
|
2020-12-13 03:07:21 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, fcitx5
|
2021-01-17 16:52:53 +00:00
|
|
|
, qtbase
|
2024-02-29 03:28:22 +00:00
|
|
|
, qtwayland
|
|
|
|
, wrapQtAppsHook
|
2023-11-05 06:30:08 +00:00
|
|
|
, wayland
|
2020-12-13 03:07:21 +00:00
|
|
|
}:
|
2024-02-29 03:28:22 +00:00
|
|
|
let
|
|
|
|
majorVersion = lib.versions.major qtbase.version;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcitx5-qt${majorVersion}";
|
2024-12-02 08:00:13 +00:00
|
|
|
version = "5.1.8";
|
2020-12-13 03:07:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fcitx";
|
2024-03-02 02:04:27 +00:00
|
|
|
repo = "fcitx5-qt";
|
2020-12-13 03:07:21 +00:00
|
|
|
rev = version;
|
2024-12-02 08:00:13 +00:00
|
|
|
hash = "sha256-up4EC4GLzDjd9QJzeV2b2uVZNxYa268D/FotCyy1sos=";
|
2020-12-13 03:07:21 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 03:28:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \
|
|
|
|
--replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
|
2021-01-17 16:52:53 +00:00
|
|
|
'';
|
|
|
|
|
2020-12-13 03:07:21 +00:00
|
|
|
cmakeFlags = [
|
2024-02-29 03:28:22 +00:00
|
|
|
"-DENABLE_QT4=OFF"
|
|
|
|
"-DENABLE_QT5=OFF"
|
|
|
|
"-DENABLE_QT6=OFF"
|
|
|
|
"-DENABLE_QT${majorVersion}=ON"
|
2020-12-13 03:07:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
2024-02-29 03:28:22 +00:00
|
|
|
wrapQtAppsHook
|
2020-12-13 03:07:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-02-29 03:28:22 +00:00
|
|
|
qtbase
|
|
|
|
qtwayland
|
2020-12-13 03:07:21 +00:00
|
|
|
fcitx5
|
2023-11-05 06:30:08 +00:00
|
|
|
wayland
|
2020-12-13 03:07:21 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
meta = with lib; {
|
2020-12-13 03:07:21 +00:00
|
|
|
description = "Fcitx5 Qt Library";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx5-qt";
|
|
|
|
license = with licenses; [ lgpl21Plus bsd3 ];
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|