linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / libpinyin / default.nix
blob2d802cf28d76e4bcb37544f44ec53edb84f57d4f
1 { lib, stdenv, fetchurl, fetchFromGitHub
2 , autoreconfHook
3 , glib
4 , db
5 , pkg-config
6 }:
8 let
9   modelData = fetchurl {
10     url    = "mirror://sourceforge/libpinyin/models/model17.text.tar.gz";
11     sha256 = "1kb2nswpsqlk2qm5jr7vqcp97f2dx7nvpk24lxjs1g12n252f5z0";
12   };
14 stdenv.mkDerivation rec {
15   pname = "libpinyin";
16   version = "2.3.0";
18   src = fetchFromGitHub {
19     owner  = "libpinyin";
20     repo   = "libpinyin";
21     rev    = version;
22     sha256 = "14fkpp16s5k0pbw5wwd24pqr0qbdjgbl90n9aqwx72m03n7an40l";
23   };
25   postUnpack = ''
26     tar -xzf ${modelData} -C $sourceRoot/data
27   '';
29   nativeBuildInputs = [ autoreconfHook glib db pkg-config ];
31   meta = with lib; {
32     description = "Library for intelligent sentence-based Chinese pinyin input method";
33     homepage    = "https://sourceforge.net/projects/libpinyin";
34     license     = licenses.gpl2;
35     maintainers = with maintainers; [ ericsagnes ];
36     platforms   = platforms.linux;
37   };