100
pkgs/tools/inputmethods/fcitx5/default.nix
Normal file
100
pkgs/tools/inputmethods/fcitx5/default.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, cairo
|
||||
, cldr-emoji-annotation
|
||||
, pango
|
||||
, fribidi
|
||||
, fmt
|
||||
, wayland
|
||||
, systemd
|
||||
, wayland-protocols
|
||||
, json_c
|
||||
, isocodes
|
||||
, xkeyboard_config
|
||||
, enchant
|
||||
, gdk-pixbuf
|
||||
, libGL
|
||||
, libevent
|
||||
, libuuid
|
||||
, libselinux
|
||||
, libXdmcp
|
||||
, libsepol
|
||||
, libxkbcommon
|
||||
, libthai
|
||||
, libdatrie
|
||||
, xcbutilkeysyms
|
||||
, pcre
|
||||
, xcbutilwm
|
||||
, xcb-imdkit
|
||||
, libxkbfile
|
||||
}:
|
||||
let
|
||||
enDictVer = "20121020";
|
||||
enDict = fetchurl {
|
||||
url = "https://download.fcitx-im.org/data/en_dict-${enDictVer}.tar.gz";
|
||||
sha256 = "1svcb97sq7nrywp5f2ws57cqvlic8j6p811d9ngflplj8xw5sjn4";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5";
|
||||
version = "5.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5";
|
||||
rev = version;
|
||||
sha256 = "QYMH0WbhHqDKUvpj1VOB8U5sbBD89H6moLFkQBJijZA=";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
ln -s ${enDict} src/modules/spell/dict/$(stripHash ${enDict})
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fmt
|
||||
isocodes
|
||||
cairo
|
||||
enchant
|
||||
pango
|
||||
libthai
|
||||
libdatrie
|
||||
fribidi
|
||||
systemd
|
||||
gdk-pixbuf
|
||||
wayland
|
||||
wayland-protocols
|
||||
cldr-emoji-annotation
|
||||
json_c
|
||||
libGL
|
||||
libevent
|
||||
libuuid
|
||||
libselinux
|
||||
libsepol
|
||||
libXdmcp
|
||||
libxkbcommon
|
||||
pcre
|
||||
xcbutilwm
|
||||
xcbutilkeysyms
|
||||
xcb-imdkit
|
||||
xkeyboard_config
|
||||
libxkbfile
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Next generation of fcitx";
|
||||
homepage = "https://github.com/fcitx/fcitx5";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
76
pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix
Normal file
76
pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{ stdenv
|
||||
, mkDerivation
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, boost
|
||||
, libime
|
||||
, fcitx5
|
||||
, fcitx5-qt
|
||||
, fcitx5-lua
|
||||
, qtwebengine
|
||||
, opencc
|
||||
, curl
|
||||
, fmt
|
||||
, luaSupport ? true
|
||||
}:
|
||||
|
||||
let
|
||||
pyStrokeVer = "20121124";
|
||||
pyStroke = fetchurl {
|
||||
url = "http://download.fcitx-im.org/data/py_stroke-${pyStrokeVer}.tar.gz";
|
||||
sha256 = "0j72ckmza5d671n2zg0psg7z9iils4gyxz7jgkk54fd4pyljiccf";
|
||||
};
|
||||
pyTableVer = "20121124";
|
||||
pyTable = fetchurl {
|
||||
url = "http://download.fcitx-im.org/data/py_table-${pyTableVer}.tar.gz";
|
||||
sha256 = "011cg7wssssm6hm564cwkrrnck2zj5rxi7p9z5akvhg6gp4nl522";
|
||||
};
|
||||
in
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fcitx5-chinese-addons";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-chinese-addons";
|
||||
rev = version;
|
||||
sha256 = "11UIMrwzZqO8nrQx5oubeoQN8hspL1mvHw5Dc9sVOqQ=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_WEBKIT=off"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
boost
|
||||
fcitx5-lua
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
ln -s ${pyStroke} modules/pinyinhelper/$(stripHash ${pyStroke})
|
||||
ln -s ${pyTable} modules/pinyinhelper/$(stripHash ${pyTable})
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
fcitx5
|
||||
fcitx5-qt
|
||||
libime
|
||||
curl
|
||||
opencc
|
||||
qtwebengine
|
||||
fmt
|
||||
] ++ stdenv.lib.optional luaSupport fcitx5-lua;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Addons related to Chinese, including IME previous bundled inside fcitx4";
|
||||
homepage = "https://github.com/fcitx/fcitx5-chinese-addons";
|
||||
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
60
pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix
Normal file
60
pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{ stdenv
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, fcitx5
|
||||
, fcitx5-qt
|
||||
, qtx11extras
|
||||
, kwidgetsaddons
|
||||
, kdeclarative
|
||||
, kirigami2
|
||||
, isocodes
|
||||
, xkeyboardconfig
|
||||
, libxkbfile
|
||||
, libXdmcp
|
||||
, kcmSupport ? true
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fcitx5-configtool";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-configtool";
|
||||
rev = version;
|
||||
sha256 = "npSqd0R6bqKc+JxYCGcfVzgNLpuLtnHq6zM58smZ8/I=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DKDE_INSTALL_USE_QT_SYS_PATHS=ON"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fcitx5
|
||||
fcitx5-qt
|
||||
qtx11extras
|
||||
kirigami2
|
||||
isocodes
|
||||
xkeyboardconfig
|
||||
libxkbfile
|
||||
libXdmcp
|
||||
] ++ stdenv.lib.optionals kcmSupport [
|
||||
kdeclarative
|
||||
kwidgetsaddons
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Configuration Tool for Fcitx5";
|
||||
homepage = "https://github.com/fcitx/fcitx5-configtool";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
71
pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix
Normal file
71
pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, fcitx5
|
||||
, gobject-introspection
|
||||
, gtk2
|
||||
, gtk3
|
||||
, pcre
|
||||
, libuuid
|
||||
, libselinux
|
||||
, libsepol
|
||||
, libthai
|
||||
, libdatrie
|
||||
, libXdmcp
|
||||
, libxkbcommon
|
||||
, epoxy
|
||||
, dbus
|
||||
, at-spi2-core
|
||||
, libXtst
|
||||
, withGTK2 ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-gtk";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-gtk";
|
||||
rev = version;
|
||||
sha256 = "rkusIqMRQMTjcpJR335as1xUQrzD9dLVB/wrLstPXPY=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGOBJECT_INTROSPECTION_GIRDIR=share/gir-1.0"
|
||||
"-DGOBJECT_INTROSPECTION_TYPELIBDIR=lib/girepository-1.0"
|
||||
] ++ stdenv.lib.optional (! withGTK2) "-DENABLE_GTK2_IM_MODULE=off";
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gobject-introspection
|
||||
fcitx5
|
||||
pcre
|
||||
libuuid
|
||||
libselinux
|
||||
libsepol
|
||||
libthai
|
||||
libdatrie
|
||||
libXdmcp
|
||||
libxkbcommon
|
||||
epoxy
|
||||
dbus
|
||||
at-spi2-core
|
||||
libXtst
|
||||
] ++ stdenv.lib.optional withGTK2 gtk2;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fcitx5 gtk im module and glib based dbus client library";
|
||||
homepage = "https://github.com/fcitx/fcitx5-gtk";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/inputmethods/fcitx5/fcitx5-lua.nix
Normal file
40
pkgs/tools/inputmethods/fcitx5/fcitx5-lua.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, fcitx5
|
||||
, lua5_3
|
||||
, luaPackage ? lua5_3
|
||||
, gettext
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-lua";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-lua";
|
||||
rev = "${version}";
|
||||
sha256 = "OiTk9ldqBqF7WT1KY71hacLD6OQQNO05F7+cSXlli40=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fcitx5
|
||||
luaPackage
|
||||
gettext
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Lua support for Fcitx 5";
|
||||
homepage = "https://github.com/fcitx/fcitx5-lua";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
46
pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix
Normal file
46
pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ stdenv
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, fcitx5
|
||||
, qtx11extras
|
||||
, libxcb
|
||||
, libXdmcp
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fcitx5-qt";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-qt";
|
||||
rev = version;
|
||||
sha256 = "BVOumk2xj3vmwmm4KwiktQhWyTuUA2OFwYXNR6HgwyM=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_QT4=0"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fcitx5
|
||||
qtx11extras
|
||||
libxcb
|
||||
libXdmcp
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fcitx5 Qt Library";
|
||||
homepage = "https://github.com/fcitx/fcitx5-qt";
|
||||
license = with licenses; [ lgpl21Plus bsd3 ];
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
Normal file
47
pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, pkgconfig
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, gettext
|
||||
, fcitx5
|
||||
, librime
|
||||
, brise
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-rime";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-rime";
|
||||
rev = version;
|
||||
sha256 = "cVCTsD1Iw6OtyYFpxff3ix2CubRTnDaBevAYA4I9Ai8=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DRIME_DATA_DIR=${brise}/share/rime-data"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
pkgconfig
|
||||
gettext
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fcitx5
|
||||
librime
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "RIME support for Fcitx5";
|
||||
homepage = "https://github.com/fcitx/fcitx5-rime";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix
Normal file
38
pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, gettext
|
||||
, libime
|
||||
, boost
|
||||
, fcitx5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-table-extra";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-table-extra";
|
||||
rev = version;
|
||||
sha256 = "UHhiWm2Khh6JBB9jz0ZKFofkAJPlqn6SqHeK9etoaxs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
gettext
|
||||
libime
|
||||
boost
|
||||
fcitx5
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Extra table for Fcitx, including Boshiamy, Zhengma, Cangjie, and Quick";
|
||||
homepage = "https://github.com/fcitx/fcitx5-table-extra";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix
Normal file
38
pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, gettext
|
||||
, libime
|
||||
, boost
|
||||
, fcitx5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-table-other";
|
||||
version = "5.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-table-other";
|
||||
rev = version;
|
||||
sha256 = "hQlrjDPImDof2+3/uOtTdJ27cInevbxH9B+lNwquKbs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
gettext
|
||||
libime
|
||||
boost
|
||||
fcitx5
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Some other tables for Fcitx";
|
||||
homepage = "https://github.com/fcitx/fcitx5-table-other";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ poscat ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
18
pkgs/tools/inputmethods/fcitx5/with-addons.nix
Normal file
18
pkgs/tools/inputmethods/fcitx5/with-addons.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ symlinkJoin, makeWrapper, fcitx5, fcitx5-lua, fcitx5-configtool, fcitx5-qt, fcitx5-gtk, addons ? [] }:
|
||||
|
||||
symlinkJoin {
|
||||
name = "fcitx5-with-addons-${fcitx5.version}";
|
||||
|
||||
paths = [ fcitx5 fcitx5-configtool fcitx5-lua fcitx5-qt fcitx5-gtk ] ++ addons;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/fcitx5 \
|
||||
--prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \
|
||||
--suffix XDG_DATA_DIRS : "$out/share" \
|
||||
--suffix PATH : "$out/bin"
|
||||
'';
|
||||
|
||||
meta = fcitx5.meta;
|
||||
}
|
||||
Reference in New Issue
Block a user