2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-15 22:18:51 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, boost
|
|
|
|
, python3
|
|
|
|
, fcitx5
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
table = fetchurl {
|
|
|
|
url = "https://download.fcitx-im.org/data/table.tar.gz";
|
|
|
|
sha256 = "1dw7mgbaidv3vqy0sh8dbfv8631d2zwv5mlb7npf69a1f8y0b5k1";
|
|
|
|
};
|
|
|
|
arpaVer = "20140820";
|
|
|
|
arpa = fetchurl {
|
|
|
|
url = "https://download.fcitx-im.org/data/lm_sc.3gm.arpa-${arpaVer}.tar.bz2";
|
|
|
|
sha256 = "0bqy3l7mif0yygjrcm65qallszgn17mvgyxhvz7a54zaamyan6vm";
|
|
|
|
};
|
2021-12-19 01:06:50 +00:00
|
|
|
dictVer = "20211021";
|
2021-01-15 22:18:51 +00:00
|
|
|
dict = fetchurl {
|
|
|
|
url = "https://download.fcitx-im.org/data/dict.utf8-${dictVer}.tar.xz";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-MAWX5vf3n3iEgP1mXeige/6QInBItafjn0D0OmKpgd8=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libime";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "1.0.10";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fcitx";
|
|
|
|
repo = "libime";
|
|
|
|
rev = version;
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-dHlya2vC3ugslP0K2oIHadcZQTmzt+tzNMkLy8V5M1Q=";
|
2021-01-15 22:18:51 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
ln -s ${table} data/$(stripHash ${table})
|
|
|
|
ln -s ${arpa} data/$(stripHash ${arpa})
|
|
|
|
ln -s ${dict} data/$(stripHash ${dict})
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
fcitx5
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-15 22:18:51 +00:00
|
|
|
description = "A library to support generic input method implementation";
|
|
|
|
homepage = "https://github.com/fcitx/libime";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|