2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2021-01-15 22:18:51 +00:00
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, gettext
|
|
|
|
, fcitx5
|
|
|
|
, librime
|
2023-04-12 12:48:02 +00:00
|
|
|
, rime-data
|
|
|
|
, symlinkJoin
|
|
|
|
, rimeDataPkgs ? [ rime-data ]
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcitx5-rime";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "5.1.4";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.fcitx-im.org/fcitx5/${pname}/${pname}-${version}.tar.xz";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-tbCIWenH5brJUVIsmOiw/E/uIXAWwK1yangIVlkeOAs=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-01-13 20:06:32 +00:00
|
|
|
"-DRIME_DATA_DIR=${placeholder "out"}/share/rime-data"
|
2021-01-15 22:18:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2021-01-15 22:18:51 +00:00
|
|
|
gettext
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fcitx5
|
|
|
|
librime
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
rimeDataDrv = symlinkJoin {
|
|
|
|
name = "fcitx5-rime-data";
|
|
|
|
paths = rimeDataPkgs;
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r "${rimeDataDrv}/share/rime-data/." $out/share/rime-data/
|
|
|
|
'';
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "RIME support for Fcitx5";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx5-rime";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|