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-10-11 05:15:48 +00:00
|
|
|
url = "https://download.fcitx-im.org/data/table-${tableVer}.tar.zst";
|
|
|
|
hash = "sha256-Pp2HsEo5PxMXI0csjqqGDdI8N4o9T2qQBVE7KpWzYUs=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
2024-10-11 05:15:48 +00:00
|
|
|
arpaVer = "20241001";
|
2021-01-15 22:18:51 +00:00
|
|
|
arpa = fetchurl {
|
2024-10-11 05:15:48 +00:00
|
|
|
url = "https://download.fcitx-im.org/data/lm_sc.arpa-${arpaVer}.tar.zst";
|
|
|
|
hash = "sha256-VJNOc5Zus46k/o6unGHf5IavN9octTFqBrGcfSieMGM=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
2024-10-11 05:15:48 +00:00
|
|
|
dictVer = "20241001";
|
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";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-0zE7iKaGIKI7yNX5VkzxtniEjcevVBxPXwIZjlo2hr8=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libime";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "1.1.9";
|
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-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-Ky4ERYQRUiPn+EYrgfmfHxdVp31a1oD4nevDniPOT20=";
|
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;
|
|
|
|
};
|
|
|
|
}
|