2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, curl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcitx-cloudpinyin";
|
|
|
|
version = "0.3.7";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.fcitx-im.org/fcitx-cloudpinyin/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "0ai347wv3qdjzcbh0j9hdjpzwvh2kk57324xbxq37nzagrdgg5x0";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ fcitx gettext curl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
substituteInPlace src/cmake_install.cmake \
|
|
|
|
--replace ${fcitx} $out
|
|
|
|
substituteInPlace po/cmake_install.cmake \
|
|
|
|
--replace ${fcitx} $out
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
isFcitxEngine = true;
|
|
|
|
description = "A standalone module for fcitx that uses web API to provide better pinyin result";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx-cloudpinyin";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|