nixpkgs/pkgs/by-name/li/libpinyin/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.0 KiB
Nix
Raw Normal View History

2022-01-20 04:35:16 +00:00
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
2019-08-12 05:00:17 +00:00
autoreconfHook,
glib,
db,
pkg-config,
2019-08-12 05:00:17 +00:00
}:
2016-03-26 17:08:53 +00:00
2016-10-01 01:52:01 +00:00
let
modelData = fetchurl {
2022-01-20 04:35:16 +00:00
url = "mirror://sourceforge/libpinyin/models/model19.text.tar.gz";
sha256 = "02zml6m8sj5q97ibpvaj9s9yz3gfj0jnjrfhkn02qv4nwm72lhjn";
2016-10-01 01:52:01 +00:00
};
in
stdenv.mkDerivation rec {
pname = "libpinyin";
2023-07-14 13:41:25 +00:00
version = "2.8.1";
2016-10-01 01:52:01 +00:00
src = fetchFromGitHub {
2022-01-20 04:35:16 +00:00
owner = "libpinyin";
repo = "libpinyin";
rev = version;
2023-07-14 13:41:25 +00:00
hash = "sha256-3+CBbjCaY0Ubyphf0uCfYvF2rtc9fF1eEAM1doonjHg=";
2016-10-01 01:52:01 +00:00
};
2016-03-26 17:08:53 +00:00
2019-08-12 05:00:17 +00:00
postUnpack = ''
tar -xzf ${modelData} -C $sourceRoot/data
'';
strictDeps = true;
2022-01-20 04:35:16 +00:00
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
2022-01-20 04:35:16 +00:00
glib
db
];
2019-08-12 05:00:17 +00:00
meta = with lib; {
2016-03-26 17:08:53 +00:00
description = "Library for intelligent sentence-based Chinese pinyin input method";
2022-04-23 12:46:20 +00:00
homepage = "https://github.com/libpinyin/libpinyin";
2022-01-20 04:35:16 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [
linsui
ericsagnes
];
platforms = platforms.linux;
2016-03-26 17:08:53 +00:00
};
}