Subject: Re: [PATCH] gnu: Add wike.

From: Jaft <[email-masked]>
Date: Sun, 20 Oct 2024 03:47:25 +0000 (UTC)

I'm not sure what's corrupted about it.

Unfortunately, Outlook recently revoked basic auth. so I can't (easily) use "git send-email", like I normally would.

I've attached the patch as a file; it seems to work, without error, when I use it with "git apply". Perhaps that may be more fruitful?

* gnu/packages/gnome-xyz.scm (wike): New variable.
---
 gnu/packages/gnome-xyz.scm | 53 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index a09c0befb0..1aa0926383 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Sughosha <[email-masked]>
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <[email-masked]>
 ;;; Copyright © 2023 Eidvilas Markevičius <[email-masked]>
+;;; Copyright © 2024 Wamm K. D. <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -56,6 +57,7 @@ (define-module (gnu packages gnome-xyz)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages build-tools)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -72,6 +74,7 @@ (define-module (gnu packages gnome-xyz)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
@@ -1759,3 +1762,53 @@ (define-public tiramisu
 notifications to STDOUT in order to allow the user to process notifications any
 way they prefer.")
     (license license:expat)))
+
+(define-public wike
+  (package
+    (name "wike")
+    (version "3.1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url (string-append "https://github.com/hugolabe/" name "/"))
+                     (commit version)))
+              (sha256 (base32
+                        "1m8d9v06y4hg9dww5blg5wpg7lv6nkphfd45rjvavn2sxwq267av"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config
+                         desktop-file-utils  ; for 'desktop-file-validate'
+                         `(,glib "bin")      ; for 'glib-compile-resources'
+                         gettext-minimal     ; for 'msgfmt'
+                         `(,gtk  "bin")      ; for gtk4-update-icon-cache
+                         cmake))
+    (inputs (list glib              ; for gio-2.0
+                  libadwaita
+                  python
+                  python-pygobject
+                  webkitgtk))
+    (arguments
+     (list #:glib-or-gtk? #t
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (wrap-program (string-append #$output "/bin/wike")
+                              `("GUIX_PYTHONPATH" =
+                                ,(search-path-as-list
+                                  `(,(string-append "/lib/python"
+                                                    #$(version-major+minor
+                                                       (package-version python))
+                                                    "/site-packages"))
+                                  (map cdr
+                                       (filter (lambda (input)
+                                                 (string-prefix? "python"
+                                                                 (car input)))
+                                               inputs))))
+                              `("GI_TYPELIB_PATH" =
+                                (,(getenv "GI_TYPELIB_PATH")))))))))
+    (synopsis "Native application to browse Wikipedia")
+    (description "Wike is a GTK application that displays Wikipedia pages.
+
+Features include bookmarking with multiple lists, article table of contents,
+browsing history, and text searches.")
+    (home-page "https://hugolabe.github.io/Wike/")
+    (license license:gpl3+)))
-- 
2.46.0