about summary refs log tree commit diff
path: root/pkgs/applications/misc/wike
diff options
context:
space:
mode:
authorzendo <linzway@qq.com>2023-04-15 14:50:11 +0800
committerzendo <linzway@qq.com>2023-04-23 23:21:14 +0800
commitbfc307189f15407b78f0034251c74cb109804eb3 (patch)
treec314d2bae9168e7f860cb61046f3bb21a8afd89e /pkgs/applications/misc/wike
parent351cec5db3b7ca839779316a8b7c524ea8941f0f (diff)
wike: 1.7.1 -> 2.0.1
Diffstat (limited to 'pkgs/applications/misc/wike')
-rw-r--r--pkgs/applications/misc/wike/default.nix47
1 files changed, 31 insertions, 16 deletions
diff --git a/pkgs/applications/misc/wike/default.nix b/pkgs/applications/misc/wike/default.nix
index 00cd8dcf0518a..e2dafd1ed9219 100644
--- a/pkgs/applications/misc/wike/default.nix
+++ b/pkgs/applications/misc/wike/default.nix
@@ -1,23 +1,31 @@
-{ lib, stdenv, fetchFromGitHub
-, meson, pkg-config, ninja
+{ lib
+, fetchFromGitHub
 , python3
-, glib, appstream-glib , desktop-file-utils
-, gobject-introspection, gtk3
-, wrapGAppsHook
-, libhandy, webkitgtk, glib-networking
-, gnome, dconf
+, meson
+, ninja
+, pkg-config
+, appstream-glib
+, desktop-file-utils
+, gobject-introspection
+, wrapGAppsHook4
+, glib
+, gtk4
+, librsvg
+, libadwaita
+, glib-networking
+, webkitgtk_6_0
 }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "wike";
-  version = "1.7.1";
+  version = "2.0.1";
   format = "other";
 
   src = fetchFromGitHub {
     owner = "hugolabe";
     repo = "Wike";
     rev = version;
-    sha256 = "sha256-QLhfzGRrc2En0Hu+UdtPM572PdtXqOFL0W3LoAki4jI=";
+    hash = "sha256-R8Zg/2tr9MrmtTdbvqD+Ra8+MEBJdgMqC3ptx1VgkeA=";
   };
 
   nativeBuildInputs = [
@@ -27,17 +35,16 @@ python3.pkgs.buildPythonApplication rec {
     appstream-glib
     desktop-file-utils
     gobject-introspection
-    wrapGAppsHook
+    wrapGAppsHook4
   ];
 
   buildInputs = [
     glib
-    gtk3
-    libhandy
-    webkitgtk
+    gtk4
+    librsvg
+    libadwaita
     glib-networking
-    gnome.adwaita-icon-theme
-    dconf
+    webkitgtk_6_0
   ];
 
   propagatedBuildInputs = with python3.pkgs; [
@@ -47,13 +54,21 @@ python3.pkgs.buildPythonApplication rec {
 
   postPatch = ''
     patchShebangs build-aux/meson/postinstall.py
+    substituteInPlace build-aux/meson/postinstall.py \
+      --replace gtk-update-icon-cache gtk4-update-icon-cache
+  '';
+
+  # prevent double wrapping
+  dontWrapGApps = true;
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
   meta = with lib; {
     description = "Wikipedia Reader for the GNOME Desktop";
     homepage = "https://github.com/hugolabe/Wike";
     license = licenses.gpl3Plus;
-    platforms = webkitgtk.meta.platforms;
+    platforms = platforms.linux;
     maintainers = with maintainers; [ samalws ];
   };
 }