87f9c27ba9
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
57 lines
1 KiB
Nix
57 lines
1 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, cmake
|
|
, extra-cmake-modules
|
|
, gettext
|
|
, fcitx5
|
|
, librime
|
|
, rime-data
|
|
, symlinkJoin
|
|
, rimeDataPkgs ? [ rime-data ]
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fcitx5-rime";
|
|
version = "5.0.16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fcitx";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-YAunuxdMlv1KOj2/xXstb/Uhm97G9D9rxb35AbNgMaE=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|