about summary refs log tree commit diff
path: root/pkgs/by-name/wi
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2024-04-17 17:25:36 +0200
committerGitHub <noreply@github.com>2024-04-17 17:25:36 +0200
commite29cb575fcb7fe72611e12c8dc8a30e74da006c4 (patch)
tree1b7ad301e225b7770b69f18ee6d72d71a4127369 /pkgs/by-name/wi
parent4f563494f5ed055cca5bf74cc60330829cdfd28f (diff)
parentf6396255f98c81490f74cb3def841e6eedce7c51 (diff)
Merge pull request #294407 from zendo/upd/wike
wike: 2.1.0 -> 3.0.0
Diffstat (limited to 'pkgs/by-name/wi')
-rw-r--r--pkgs/by-name/wi/wike/package.nix75
1 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/by-name/wi/wike/package.nix b/pkgs/by-name/wi/wike/package.nix
new file mode 100644
index 0000000000000..0afd404e6a79b
--- /dev/null
+++ b/pkgs/by-name/wi/wike/package.nix
@@ -0,0 +1,75 @@
+{ lib
+, fetchFromGitHub
+, python3
+, 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 = "3.0.0";
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "hugolabe";
+    repo = "Wike";
+    rev = version;
+    hash = "sha256-x6HYlpCj7poKWJWB2CnvN1aoTa7LmqYwbPa62WvSYsQ=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    appstream-glib
+    desktop-file-utils
+    gobject-introspection
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    glib
+    gtk4
+    librsvg
+    libadwaita
+    glib-networking
+    webkitgtk_6_0
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    requests
+    pygobject3
+  ];
+
+  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 = platforms.linux;
+    maintainers = with maintainers; [ samalws ];
+    mainProgram = "wike";
+  };
+}