mini-calc: 3.3.3 -> 3.3.5 (#372274)
[NixPkgs.git] / pkgs / by-name / li / libpinyin / package.nix
blob9df54306930b8c2f0042d6d69e5b891e04f72f86
2   lib,
3   stdenv,
4   fetchurl,
5   fetchFromGitHub,
6   autoreconfHook,
7   glib,
8   db,
9   pkg-config,
12 let
13   modelData = fetchurl {
14     url = "mirror://sourceforge/libpinyin/models/model19.text.tar.gz";
15     sha256 = "02zml6m8sj5q97ibpvaj9s9yz3gfj0jnjrfhkn02qv4nwm72lhjn";
16   };
18 stdenv.mkDerivation rec {
19   pname = "libpinyin";
20   version = "2.8.1";
22   src = fetchFromGitHub {
23     owner = "libpinyin";
24     repo = "libpinyin";
25     rev = version;
26     hash = "sha256-3+CBbjCaY0Ubyphf0uCfYvF2rtc9fF1eEAM1doonjHg=";
27   };
29   postUnpack = ''
30     tar -xzf ${modelData} -C $sourceRoot/data
31   '';
33   strictDeps = true;
35   nativeBuildInputs = [
36     autoreconfHook
37     pkg-config
38   ];
40   buildInputs = [
41     glib
42     db
43   ];
45   meta = with lib; {
46     description = "Library for intelligent sentence-based Chinese pinyin input method";
47     homepage = "https://github.com/libpinyin/libpinyin";
48     license = licenses.gpl3Plus;
49     maintainers = with maintainers; [
50       linsui
51       ericsagnes
52     ];
53     platforms = platforms.linux;
54   };