Skip to content

Commit f8d40e2

Browse files
committed
rime-ls: init at 0.4.0
NOTE: Currently rime-data is only used to pass checkPhase. Users may need to set RIME_DATA_DIR and configure editors themselves.
1 parent 87ed7eb commit f8d40e2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
lib,
3+
rustPlatform,
4+
fetchFromGitHub,
5+
librime,
6+
rime-data,
7+
}:
8+
rustPlatform.buildRustPackage rec {
9+
pname = "rime-ls";
10+
version = "0.4.0";
11+
12+
src = fetchFromGitHub {
13+
owner = "wlh320";
14+
repo = "rime-ls";
15+
rev = "v${version}";
16+
hash = "sha256-ZqoRFIF3ehfEeTN+ZU+/PAzA4JyS1403+sqZdzwJHA8=";
17+
};
18+
19+
useFetchCargoVendor = true;
20+
cargoHash = "sha256-mbkxOYlOCpNzxVWwG8n4vD8klHGVjvMA8XSsBbifjoM=";
21+
22+
nativeBuildInputs = [ rustPlatform.bindgenHook ];
23+
24+
buildInputs = [ librime ];
25+
26+
# Set RIME_DATA_DIR to work around test_get_candidates during checkPhase
27+
env.RIME_DATA_DIR = "${rime-data}/share/rime-data";
28+
29+
meta = {
30+
description = "Language server for Rime input method engine";
31+
homepage = "https://github.com/wlh320/rime-ls";
32+
license = lib.licenses.bsd3;
33+
platforms = lib.platforms.linux;
34+
maintainers = with lib.maintainers; [ definfo ];
35+
mainProgram = "rime_ls";
36+
};
37+
}

0 commit comments

Comments
 (0)