depot/third_party/nixpkgs/pkgs/development/libraries/libpinyin/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

38 lines
946 B
Nix

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