2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
56 lines
1 KiB
Nix
56 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, cmake
|
|
, extra-cmake-modules
|
|
, gettext
|
|
, fcitx5
|
|
, librime
|
|
, rime-data
|
|
, symlinkJoin
|
|
, rimeDataPkgs ? [ rime-data ]
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fcitx5-rime";
|
|
version = "5.1.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://download.fcitx-im.org/fcitx5/${pname}/${pname}-${version}.tar.xz";
|
|
hash = "sha256-qFojAwwR6lqP7RKSJ3LPAxDEscjKJ6wNZFpdlwz+QzM=";
|
|
};
|
|
|
|
cmakeFlags = [
|
|
"-DRIME_DATA_DIR=${placeholder "out"}/share/rime-data"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
extra-cmake-modules
|
|
pkg-config
|
|
gettext
|
|
];
|
|
|
|
buildInputs = [
|
|
fcitx5
|
|
librime
|
|
];
|
|
|
|
rimeDataDrv = symlinkJoin {
|
|
name = "fcitx5-rime-data";
|
|
paths = rimeDataPkgs;
|
|
};
|
|
|
|
postInstall = ''
|
|
cp -r "${rimeDataDrv}/share/rime-data/." $out/share/rime-data/
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|