1{
2 lib,
3 fetchFromGitLab,
4 meson,
5 gobject-introspection,
6 pkg-config,
7 ninja,
8 python3,
9 wrapGAppsHook4,
10 gtk4,
11 gdk-pixbuf,
12 webkitgtk_4_1,
13 gtksourceview5,
14 glib-networking,
15 libadwaita,
16 appstream,
17 blueprint-compiler,
18}:
19python3.pkgs.buildPythonApplication rec {
20 pname = "giara";
21 version = "1.1.0";
22
23 format = "other";
24
25 src = fetchFromGitLab {
26 domain = "gitlab.gnome.org";
27 owner = "World";
28 repo = "giara";
29 rev = version;
30 hash = "sha256-FTy0ElcoTGXG9eV85pUrF35qKDKOfYIovPtjLfTJVOg=";
31 };
32
33 nativeBuildInputs = [
34 appstream
35 meson
36 gobject-introspection
37 pkg-config
38 ninja
39 wrapGAppsHook4
40 blueprint-compiler
41 ];
42
43 buildInputs = [
44 gtk4
45 gdk-pixbuf
46 webkitgtk_4_1
47 gtksourceview5
48 glib-networking
49 libadwaita
50 ];
51
52 pythonPath = with python3.pkgs; [
53 pygobject3
54 pycairo
55 python-dateutil
56 praw
57 pillow
58 mistune
59 beautifulsoup4
60 ];
61
62 postPatch = ''
63 substituteInPlace meson_post_install.py \
64 --replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
65 # blueprint-compiler expects "profile" to be a string.
66 substituteInPlace data/ui/headerbar.blp \
67 --replace "item { custom: profile; }" 'item { custom: "profile"; }'
68 '';
69
70 meta = with lib; {
71 description = "Reddit app, built with Python, GTK and Handy; Created with mobile Linux in mind";
72 maintainers = with maintainers; [ dasj19 ];
73 homepage = "https://gitlab.gnome.org/World/giara";
74 license = licenses.gpl3Plus;
75 platforms = platforms.linux;
76 mainProgram = "giara";
77 };
78}