2023-08-18 10:00:15 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2021-01-17 09:17:16 +00:00
|
|
|
, pkg-config
|
2020-12-13 03:16:03 +00:00
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, gettext
|
2024-04-23 11:57:55 +01:00
|
|
|
, zstd
|
2020-12-13 03:16:03 +00:00
|
|
|
, fcitx5
|
|
|
|
, librime
|
2023-04-01 08:12:19 +01:00
|
|
|
, rime-data
|
|
|
|
, symlinkJoin
|
|
|
|
, rimeDataPkgs ? [ rime-data ]
|
2020-12-13 03:16:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcitx5-rime";
|
2024-04-23 11:57:55 +01:00
|
|
|
version = "5.1.6";
|
2020-12-13 03:16:03 +00:00
|
|
|
|
2023-08-18 10:00:15 +01:00
|
|
|
src = fetchurl {
|
2024-04-23 11:57:55 +01:00
|
|
|
url = "https://download.fcitx-im.org/fcitx5/${pname}/${pname}-${version}.tar.zst";
|
|
|
|
hash = "sha256-Ll0T+bgGXYbg/POJmCeDVjkTvaNuR/bxw9hQJJV+CQo=";
|
2020-12-13 03:16:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2022-01-02 01:53:11 +00:00
|
|
|
"-DRIME_DATA_DIR=${placeholder "out"}/share/rime-data"
|
2020-12-13 03:16:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
2021-01-17 09:17:16 +00:00
|
|
|
pkg-config
|
2020-12-13 03:16:03 +00:00
|
|
|
gettext
|
2024-04-23 11:57:55 +01:00
|
|
|
zstd
|
2020-12-13 03:16:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fcitx5
|
|
|
|
librime
|
|
|
|
];
|
|
|
|
|
2023-04-01 08:12:19 +01:00
|
|
|
rimeDataDrv = symlinkJoin {
|
|
|
|
name = "fcitx5-rime-data";
|
|
|
|
paths = rimeDataPkgs;
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r "${rimeDataDrv}/share/rime-data/." $out/share/rime-data/
|
|
|
|
'';
|
2022-04-02 11:43:39 +01:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
meta = with lib; {
|
2020-12-13 03:16:03 +00:00
|
|
|
description = "RIME support for Fcitx5";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx5-rime";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|