nixpkgs/pkgs/development/libraries/libpinyin/default.nix

39 lines
946 B
Nix
Raw Normal View History

2019-08-12 06:00:17 +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 {
2019-08-12 06:00:17 +01:00
url = "mirror://sourceforge/libpinyin/models/model17.text.tar.gz";
sha256 = "1kb2nswpsqlk2qm5jr7vqcp97f2dx7nvpk24lxjs1g12n252f5z0";
2016-10-01 02:52:01 +01:00
};
in
stdenv.mkDerivation rec {
pname = "libpinyin";
2019-08-12 06:00:17 +01:00
version = "2.3.0";
2016-10-01 02:52:01 +01:00
src = fetchFromGitHub {
owner = "libpinyin";
repo = "libpinyin";
rev = version;
2019-08-12 06:00:17 +01:00
sha256 = "14fkpp16s5k0pbw5wwd24pqr0qbdjgbl90n9aqwx72m03n7an40l";
2016-10-01 02:52:01 +01:00
};
2016-03-26 17:08:53 +00:00
2019-08-12 06:00:17 +01:00
postUnpack = ''
tar -xzf ${modelData} -C $sourceRoot/data
'';
nativeBuildInputs = [ autoreconfHook glib db pkgconfig ];
2016-03-26 17:08:53 +00:00
meta = with stdenv.lib; {
description = "Library for intelligent sentence-based Chinese pinyin input method";
2019-08-12 06:00:17 +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;
};
}