2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, gettext
|
|
|
|
, fcitx5
|
|
|
|
, fcitx5-qt
|
|
|
|
, libskk
|
|
|
|
, qtbase
|
|
|
|
, skk-dicts
|
|
|
|
, enableQt ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcitx5-skk";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.1.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fcitx";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-vg79zJ/ZoUjCKU11krDUjO0rAyZxDMsBnHqJ/I6NTTA=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
gettext
|
|
|
|
pkg-config
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fcitx5
|
|
|
|
libskk
|
|
|
|
] ++ lib.optionals enableQt [
|
|
|
|
fcitx5-qt
|
|
|
|
qtbase
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2024-04-21 15:54:59 +00:00
|
|
|
(lib.cmakeBool "ENABLE_QT" enableQt)
|
|
|
|
(lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6"))
|
2023-05-24 13:37:59 +00:00
|
|
|
"-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.L"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Input method engine for Fcitx5, which uses libskk as its backend";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx5-skk";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ milran ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|