python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / libpinyin / default.nix
blob2247c3b9406f6afa4c0f132e2bfc5d57c91d221e
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchFromGitHub
5 , autoreconfHook
6 , glib
7 , db
8 , pkg-config
9 }:
11 let
12   modelData = fetchurl {
13     url = "mirror://sourceforge/libpinyin/models/model19.text.tar.gz";
14     sha256 = "02zml6m8sj5q97ibpvaj9s9yz3gfj0jnjrfhkn02qv4nwm72lhjn";
15   };
17 stdenv.mkDerivation rec {
18   pname = "libpinyin";
19   version = "2.6.2";
21   src = fetchFromGitHub {
22     owner = "libpinyin";
23     repo = "libpinyin";
24     rev = version;
25     sha256 = "sha256-hafetjKWqImg3Jr1tSXjY0RwbBQ7LccXqx0OdtKCy/c=";
26   };
28   postUnpack = ''
29     tar -xzf ${modelData} -C $sourceRoot/data
30   '';
32   nativeBuildInputs = [
33     autoreconfHook
34     glib
35     db
36     pkg-config
37   ];
39   meta = with lib; {
40     description = "Library for intelligent sentence-based Chinese pinyin input method";
41     homepage = "https://github.com/libpinyin/libpinyin";
42     license = licenses.gpl3Plus;
43     maintainers = with maintainers; [ linsui ericsagnes ];
44     platforms = platforms.linux;
45   };