1{ lib, stdenv, fetchFromGitHub,
2 libtool, gettext, pkg-config,
3 vala, gnome-common, gobject-introspection,
4 libgee, json-glib, skk-dicts, libxkbcommon }:
5
6stdenv.mkDerivation rec {
7 pname = "libskk";
8 version = "1.0.5";
9
10 src = fetchFromGitHub {
11 owner = "ueno";
12 repo = "libskk";
13 rev = version;
14 sha256 = "0y279pcgs3jrsi9vzx086xhz9jbz23dqqijp4agygc9ackp9sxy5";
15 };
16
17 buildInputs = [ skk-dicts libxkbcommon ];
18 nativeBuildInputs = [ vala gnome-common gobject-introspection libtool gettext pkg-config ];
19 propagatedBuildInputs = [ libgee json-glib ];
20
21 preConfigure = ''
22 ./autogen.sh
23 '';
24
25 # link SKK-JISYO.L from skkdicts for the bundled tool `skk`
26 preInstall = ''
27 dictDir=$out/share/skk
28 mkdir -p $dictDir
29 ln -s ${skk-dicts}/share/SKK-JISYO.L $dictDir/
30 '';
31
32 enableParallelBuilding = true;
33
34 meta = {
35 description = "A library to deal with Japanese kana-to-kanji conversion method";
36 longDescription = ''
37 Libskk is a library that implements basic features of SKK including:
38 new word registration, completion, numeric conversion, abbrev mode, kuten input,
39 hankaku-katakana input, Lisp expression evaluation (concat only), and re-conversion.
40 It also supports various typing rules including: romaji-to-kana, AZIK, TUT-Code, and NICOLA,
41 as well as various dictionary types including: file dictionary (such as SKK-JISYO.[SML]),
42 user dictionary, skkserv, and CDB format dictionary.
43 '';
44 homepage = "https://github.com/ueno/libskk";
45 license = lib.licenses.gpl3Plus;
46 maintainers = with lib.maintainers; [ yuriaisaka ];
47 platforms = lib.platforms.linux;
48 };
49}