1{ lib
2, fetchFromGitHub
3, wrapGAppsHook4
4, python3
5, appstream-glib
6, blueprint-compiler
7, desktop-file-utils
8, meson
9, ninja
10, pkg-config
11, glib
12, gtk4
13, gobject-introspection
14, gst_all_1
15, libsoup_3
16, libadwaita
17, nix-update-script
18}:
19
20python3.pkgs.buildPythonApplication rec {
21 pname = "dialect";
22 version = "2.1.1";
23
24 format = "other";
25
26 src = fetchFromGitHub {
27 owner = "dialect-app";
28 repo = pname;
29 rev = version;
30 fetchSubmodules = true;
31 hash = "sha256-ytZnolQTOj0dpv+ouN1N7sypr1LxSN/Uhp7qP0ZOTHE=";
32 };
33
34 nativeBuildInputs = [
35 appstream-glib
36 blueprint-compiler
37 desktop-file-utils
38 gobject-introspection
39 meson
40 ninja
41 pkg-config
42 wrapGAppsHook4
43 ];
44
45 buildInputs = [
46 gtk4
47 glib
48 gst_all_1.gstreamer
49 gst_all_1.gst-plugins-base
50 libsoup_3
51 libadwaita
52 ];
53
54 propagatedBuildInputs = with python3.pkgs; [
55 dbus-python
56 gtts
57 pygobject3
58 ];
59
60 # Prevent double wrapping, let the Python wrapper use the args in preFixup.
61 dontWrapGApps = true;
62
63 preFixup = ''
64 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
65 '';
66
67 doCheck = false;
68
69 # handle setup hooks better
70 strictDeps = false;
71
72 passthru.updateScript = nix-update-script { };
73
74 meta = with lib; {
75 homepage = "https://github.com/dialect-app/dialect";
76 description = "A translation app for GNOME";
77 maintainers = with maintainers; [ linsui ];
78 license = licenses.gpl3Plus;
79 platforms = platforms.linux;
80 };
81}