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

47 lines
960 B
Nix
Raw Normal View History

2022-01-20 04:35:16 +00:00
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
2019-08-12 05:00:17 +00:00
, autoreconfHook
, glib
, db
, pkg-config
2019-08-12 05:00:17 +00:00
}:
2016-03-26 17:08:53 +00:00
2016-10-01 01:52:01 +00:00
let
modelData = fetchurl {
2022-01-20 04:35:16 +00:00
url = "mirror://sourceforge/libpinyin/models/model19.text.tar.gz";
sha256 = "02zml6m8sj5q97ibpvaj9s9yz3gfj0jnjrfhkn02qv4nwm72lhjn";
2016-10-01 01:52:01 +00:00
};
in
stdenv.mkDerivation rec {
pname = "libpinyin";
2022-01-20 04:35:16 +00:00
version = "2.6.1";
2016-10-01 01:52:01 +00:00
src = fetchFromGitHub {
2022-01-20 04:35:16 +00:00
owner = "libpinyin";
repo = "libpinyin";
rev = version;
sha256 = "0izisma5g9a7mxfxs177pi1d7v9dklm0ar4z404nf2s8x4wcg3ib";
2016-10-01 01:52:01 +00:00
};
2016-03-26 17:08:53 +00:00
2019-08-12 05:00:17 +00:00
postUnpack = ''
tar -xzf ${modelData} -C $sourceRoot/data
'';
2022-01-20 04:35:16 +00:00
nativeBuildInputs = [
autoreconfHook
glib
db
pkg-config
];
2019-08-12 05:00:17 +00:00
meta = with lib; {
2016-03-26 17:08:53 +00:00
description = "Library for intelligent sentence-based Chinese pinyin input method";
2022-01-20 04:35:16 +00:00
homepage = "https://sourceforge.net/projects/libpinyin";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ linsui ericsagnes ];
platforms = platforms.linux;
2016-03-26 17:08:53 +00:00
};
}