2016-10-01 02:52:01 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, glib, db, pkgconfig }:
|
2016-03-26 17:08:53 +00:00
|
|
|
|
2016-10-01 02:52:01 +01:00
|
|
|
let
|
|
|
|
modelData = fetchurl {
|
|
|
|
url = "mirror://sourceforge/libpinyin/models/model12.text.tar.gz";
|
|
|
|
sha256 = "1fijhhnjgj8bj1xr5pp7c4qxf11cqybgfqg7v36l3x780d84hfnd";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libpinyin-${version}";
|
|
|
|
version = "1.6.0";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook glib db pkgconfig ];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
tar -xzf ${modelData} -C $sourceRoot/data
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libpinyin";
|
|
|
|
repo = "libpinyin";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0k40a7wfp8zj9d426afv0am5sr3m2i2p309fq0vf8qrb050hj17f";
|
|
|
|
};
|
2016-03-26 17:08:53 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library for intelligent sentence-based Chinese pinyin input method";
|
2016-04-15 02:22:35 +01:00
|
|
|
homepage = https://sourceforge.net/projects/libpinyin;
|
2016-03-26 17:08:53 +00:00
|
|
|
license = licenses.gpl2;
|
2016-10-01 02:52:01 +01:00
|
|
|
maintainers = with maintainers; [ ericsagnes ];
|
2016-03-26 17:08:53 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|