lol
1{ lib
2, fetchFromGitHub
3, python3
4, meson
5, ninja
6, pkg-config
7, appstream-glib
8, desktop-file-utils
9, gobject-introspection
10, wrapGAppsHook4
11, glib
12, gtk4
13, librsvg
14, libadwaita
15, glib-networking
16, webkitgtk_6_0
17}:
18
19python3.pkgs.buildPythonApplication rec {
20 pname = "wike";
21 version = "2.0.1";
22 format = "other";
23
24 src = fetchFromGitHub {
25 owner = "hugolabe";
26 repo = "Wike";
27 rev = version;
28 hash = "sha256-R8Zg/2tr9MrmtTdbvqD+Ra8+MEBJdgMqC3ptx1VgkeA=";
29 };
30
31 nativeBuildInputs = [
32 meson
33 pkg-config
34 ninja
35 appstream-glib
36 desktop-file-utils
37 gobject-introspection
38 wrapGAppsHook4
39 ];
40
41 buildInputs = [
42 glib
43 gtk4
44 librsvg
45 libadwaita
46 glib-networking
47 webkitgtk_6_0
48 ];
49
50 propagatedBuildInputs = with python3.pkgs; [
51 requests
52 pygobject3
53 ];
54
55 postPatch = ''
56 patchShebangs build-aux/meson/postinstall.py
57 substituteInPlace build-aux/meson/postinstall.py \
58 --replace gtk-update-icon-cache gtk4-update-icon-cache
59 '';
60
61 # prevent double wrapping
62 dontWrapGApps = true;
63 preFixup = ''
64 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
65 '';
66
67 meta = with lib; {
68 description = "Wikipedia Reader for the GNOME Desktop";
69 homepage = "https://github.com/hugolabe/Wike";
70 license = licenses.gpl3Plus;
71 platforms = platforms.linux;
72 maintainers = with maintainers; [ samalws ];
73 };
74}