presenterm: 0.9.0 -> 0.10.0 (#378946)
[NixPkgs.git] / pkgs / by-name / li / libskk / package.nix
blob236ffc1dc0255499da9dfaa25d408392ecfe87d2
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   libtool,
7   gettext,
8   pkg-config,
9   vala,
10   gnome-common,
11   gobject-introspection,
12   libgee,
13   json-glib,
14   skkDictionaries,
15   libxkbcommon,
18 stdenv.mkDerivation rec {
19   pname = "libskk";
20   version = "1.0.5";
22   src = fetchFromGitHub {
23     owner = "ueno";
24     repo = "libskk";
25     tag = version;
26     hash = "sha256-xXed7mQqseefIldGjNsQf8n0YTcI9L9T1FkO/dhNR3g=";
27   };
29   env = {
30     NIX_CFLAGS_COMPILE = toString [
31       "-Wno-error=int-conversion"
32     ];
33   };
35   patches = [
36     # fix parse error in default.json
37     # https://github.com/ueno/libskk/pull/90
38     (fetchpatch {
39       url = "https://github.com/ueno/libskk/commit/2382ebedc8dca88e745d223ad7badb8b73bbb0de.diff";
40       hash = "sha256-e1bKVteNjqmr40XI82Qar63LXPWYIfnUVlo5zQSkPNw=";
41     })
42   ];
44   buildInputs = [ libxkbcommon ];
45   nativeBuildInputs = [
46     vala
47     gnome-common
48     gobject-introspection
49     libtool
50     gettext
51     pkg-config
52   ];
53   propagatedBuildInputs = [
54     libgee
55     json-glib
56   ];
58   configureScript = "./autogen.sh";
60   # link SKK-JISYO.L from skkdicts for the bundled tool `skk`
61   preInstall = ''
62     dictDir=$out/share/skk
63     mkdir -p $dictDir
64     ln -s ${skkDictionaries.l}/share/skk/SKK-JISYO.L $dictDir/
65   '';
67   enableParallelBuilding = true;
69   meta = {
70     description = "Library to deal with Japanese kana-to-kanji conversion method";
71     mainProgram = "skk";
72     longDescription = ''
73       Libskk is a library that implements basic features of SKK including:
74       new word registration, completion, numeric conversion, abbrev mode, kuten input,
75       hankaku-katakana input, Lisp expression evaluation (concat only), and re-conversion.
76       It also supports various typing rules including: romaji-to-kana, AZIK, TUT-Code, and NICOLA,
77       as well as various dictionary types including: file dictionary (such as SKK-JISYO.[SML]),
78       user dictionary, skkserv, and CDB format dictionary.
79     '';
80     homepage = "https://github.com/ueno/libskk";
81     license = lib.licenses.gpl3Plus;
82     maintainers = with lib.maintainers; [ yuriaisaka ];
83     platforms = lib.platforms.linux;
84   };