1{ lib, stdenv
2, fetchurl
3, fetchFromGitHub
4, pkg-config
5, cmake
6, extra-cmake-modules
7, cairo
8, cldr-emoji-annotation
9, pango
10, fribidi
11, fmt
12, wayland
13, systemd
14, wayland-protocols
15, json_c
16, isocodes
17, xkeyboard_config
18, enchant
19, gdk-pixbuf
20, libGL
21, libevent
22, libuuid
23, libselinux
24, libXdmcp
25, libsepol
26, libxkbcommon
27, libthai
28, libdatrie
29, xcbutilkeysyms
30, pcre
31, xcbutilwm
32, xcb-imdkit
33, libxkbfile
34}:
35let
36 enDictVer = "20121020";
37 enDict = fetchurl {
38 url = "https://download.fcitx-im.org/data/en_dict-${enDictVer}.tar.gz";
39 sha256 = "1svcb97sq7nrywp5f2ws57cqvlic8j6p811d9ngflplj8xw5sjn4";
40 };
41in
42stdenv.mkDerivation rec {
43 pname = "fcitx5";
44 version = "5.0.9";
45
46 src = fetchFromGitHub {
47 owner = "fcitx";
48 repo = pname;
49 rev = version;
50 sha256 = "161xgm2fs51v8l46raz6xxkjmshpgaaax64lz8208m7fcd32ll3a";
51 };
52
53 prePatch = ''
54 ln -s ${enDict} src/modules/spell/dict/$(stripHash ${enDict})
55 '';
56
57 nativeBuildInputs = [
58 cmake
59 extra-cmake-modules
60 pkg-config
61 ];
62
63 buildInputs = [
64 fmt
65 isocodes
66 cairo
67 enchant
68 pango
69 libthai
70 libdatrie
71 fribidi
72 systemd
73 gdk-pixbuf
74 wayland
75 wayland-protocols
76 cldr-emoji-annotation
77 json_c
78 libGL
79 libevent
80 libuuid
81 libselinux
82 libsepol
83 libXdmcp
84 libxkbcommon
85 pcre
86 xcbutilwm
87 xcbutilkeysyms
88 xcb-imdkit
89 xkeyboard_config
90 libxkbfile
91 ];
92
93 passthru.updateScript = ./update.py;
94
95 meta = with lib; {
96 description = "Next generation of fcitx";
97 homepage = "https://github.com/fcitx/fcitx5";
98 license = licenses.lgpl21Plus;
99 maintainers = with maintainers; [ poscat ];
100 platforms = platforms.linux;
101 };
102}