1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 python3,
8 glib,
9 libuuid,
10 sqlite,
11 nix-update-script,
12}:
13
14stdenv.mkDerivation {
15 pname = "pyzy";
16 version = "1.1-unstable-2023-02-28";
17
18 src = fetchFromGitHub {
19 owner = "openSUSE";
20 repo = "pyzy";
21 rev = "ec719d053bd491ec64fe68fe0d1699ca6039ad80";
22 hash = "sha256-wU7EgP/CPNhBx9N7mOu0WdnoLazzpQtbRxmBKrTUbKM=";
23 };
24
25 nativeBuildInputs = [
26 autoreconfHook
27 pkg-config
28 python3
29 ];
30
31 buildInputs = [
32 glib
33 libuuid
34 sqlite
35 ];
36
37 postPatch = ''
38 patchShebangs ./data/db/android/create_db.py
39 '';
40
41 passthru.updateScript = nix-update-script {
42 extraArgs = [
43 "--version"
44 "branch"
45 ];
46 };
47
48 meta = with lib; {
49 description = "Chinese PinYin and Bopomofo conversion library";
50 homepage = "https://github.com/openSUSE/pyzy";
51 license = licenses.lgpl21;
52 maintainers = with maintainers; [ azuwis ];
53 platforms = platforms.linux;
54 };
55}