2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-01-15 22:18:51 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, boost
|
|
|
|
, python3
|
|
|
|
, fcitx5
|
2023-10-09 19:29:22 +00:00
|
|
|
, zstd
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-01-25 14:12:00 +00:00
|
|
|
tableVer = "20240108";
|
2021-01-15 22:18:51 +00:00
|
|
|
table = fetchurl {
|
2024-01-25 14:12:00 +00:00
|
|
|
url = "https://download.fcitx-im.org/data/table-${tableVer}.tar.gz";
|
|
|
|
hash = "sha256-cpxZbYaQfecnx00Pw/0kHEBsXevStMt07v4CI4funa4=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
arpaVer = "20230712";
|
2021-01-15 22:18:51 +00:00
|
|
|
arpa = fetchurl {
|
2022-07-14 12:49:19 +00:00
|
|
|
url = "https://download.fcitx-im.org/data/lm_sc.arpa-${arpaVer}.tar.xz";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-ut1iwWxjc3h6D9qPCc1FLRL2DVhohW9lHO7PGge6ujI=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
dictVer = "20240416";
|
2021-01-15 22:18:51 +00:00
|
|
|
dict = fetchurl {
|
2024-05-15 15:35:15 +00:00
|
|
|
url = "https://download.fcitx-im.org/data/dict-${dictVer}.tar.zst";
|
|
|
|
hash = "sha256-nCYsv6MGy0w7BVmRt+IrRT4PJn8gzrXZ2eX4++Ty02c=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libime";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.1.8";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fcitx";
|
|
|
|
repo = "libime";
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-uT0V1CXPaF2FctsndxVszS7Qske6vObbOA4aOnmbdQY=";
|
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 = [
|
2023-10-09 19:29:22 +00:00
|
|
|
zstd
|
2021-01-15 22:18:51 +00:00
|
|
|
boost
|
|
|
|
fcitx5
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library to support generic input method implementation";
|
2021-01-15 22:18:51 +00:00
|
|
|
homepage = "https://github.com/fcitx/libime";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|