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

39 lines
956 B
Nix
Raw Normal View History

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