Files

71 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
cmake,
pkg-config,
kdePackages,
boost,
python3,
fcitx5,
zstd,
}:
let
tableVer = "20240108";
table = fetchurl {
url = "https://download.fcitx-im.org/data/table-${tableVer}.tar.zst";
hash = "sha256-Pp2HsEo5PxMXI0csjqqGDdI8N4o9T2qQBVE7KpWzYUs=";
};
arpaVer = "20250113";
arpa = fetchurl {
url = "https://download.fcitx-im.org/data/lm_sc.arpa-${arpaVer}.tar.zst";
hash = "sha256-7oPs8g1S6LzNukz2zVcYPVPCV3E6Xrd+46Y9UPw3lt0=";
};
dictVer = "20250327";
dict = fetchurl {
url = "https://download.fcitx-im.org/data/dict-${dictVer}.tar.zst";
hash = "sha256-fKa+R1TA1MJ7p3AsDc5lFlm9LKH6pcvyhI2BoAU8jBM=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "libime";
version = "1.1.14";
src = fetchFromGitHub {
owner = "fcitx";
repo = "libime";
tag = finalAttrs.version;
hash = "sha256-q9OSY1q4MNlFqw6lRMrHO6QT9xP8Czz4b4M0BuIkp34=";
fetchSubmodules = true;
};
prePatch = ''
ln -s ${table} data/$(stripHash ${table})
ln -s ${arpa} data/$(stripHash ${arpa})
ln -s ${dict} data/$(stripHash ${dict})
'';
nativeBuildInputs = [
cmake
pkg-config
kdePackages.extra-cmake-modules
python3
];
buildInputs = [
zstd
boost
fcitx5
];
meta = {
description = "Library to support generic input method implementation";
homepage = "https://github.com/fcitx/libime";
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ poscat ];
platforms = lib.platforms.linux;
};
})