1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00
nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix

81 lines
1.7 KiB
Nix
Raw Normal View History

{ lib
, stdenv
2020-12-13 03:24:30 +00:00
, fetchurl
, fetchFromGitHub
, cmake
, extra-cmake-modules
, boost
, libime
, fcitx5
, fcitx5-qt
, fcitx5-lua
, qtwebengine
, opencc
, curl
, fmt
, qtbase
2020-12-13 03:24:30 +00:00
, luaSupport ? true
}:
let
pyStrokeVer = "20121124";
pyStroke = fetchurl {
url = "http://download.fcitx-im.org/data/py_stroke-${pyStrokeVer}.tar.gz";
hash = "sha256-jrEoqb+kOVLmfPL87h/RNMb0z9MXvC9sOKYV9etk4kg=";
2020-12-13 03:24:30 +00:00
};
pyTableVer = "20121124";
pyTable = fetchurl {
url = "http://download.fcitx-im.org/data/py_table-${pyTableVer}.tar.gz";
hash = "sha256-QhRqyX3mwT1V+eme2HORX0xmc56cEVMqNFVrrfl5LAQ=";
2020-12-13 03:24:30 +00:00
};
in
stdenv.mkDerivation rec {
2020-12-13 03:24:30 +00:00
pname = "fcitx5-chinese-addons";
version = "5.1.5";
2020-12-13 03:24:30 +00:00
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
2020-12-13 03:24:30 +00:00
rev = version;
hash = "sha256-7BgwMKssP9H8hryH+6p3g66ocZQcMvAysQrxZrLI+9I=";
2020-12-13 03:24:30 +00:00
};
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
2021-01-15 09:19:50 +00:00
] ++ lib.optional luaSupport fcitx5-lua;
2020-12-13 03:24:30 +00:00
cmakeFlags = [
(lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6"))
];
dontWrapQtApps = true;
2021-01-15 09:19:50 +00:00
meta = with lib; {
2020-12-13 03:24:30 +00:00
description = "Addons related to Chinese, including IME previous bundled inside fcitx4";
mainProgram = "scel2org5";
2020-12-13 03:24:30 +00:00
homepage = "https://github.com/fcitx/fcitx5-chinese-addons";
license = with licenses; [ gpl2Plus lgpl21Plus ];
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}