Merge pull request #155785 from linsui/libpinyin

libpinyin: 2.3.0 -> 2.6.1
This commit is contained in:
Mario Rodas 2022-01-23 21:35:22 -05:00 committed by GitHub
commit 9114e8b4f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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