[PATCH] gnu: nomad: Update to 0.2.0-alpha.

DoneSubmitted by Mike Rosset.
Details
2 participants
  • Mike Rosset
  • Mathieu Othacehe
Owner
unassigned
Severity
normal
M
M
Mike Rosset wrote on 28 Jul 2020 16:27
(address . guix-patches@gnu.org)(name . Mike Rosset)(address . mike.rosset@gmail.com)
20200728142722.408593-1-mike.rosset@gmail.com
* gnu/packages/guile-xyz.scm (nomad): Update to 0.2.0-alpha.

This is a significant update to Nomad. This removes the majority of C code and
replaces it with gobject introspection using g-golf.

In the process the nomad package expression has changed significantly.
---
gnu/packages/guile-xyz.scm | 210 ++++++++++++++++++++-----------------
1 file changed, 115 insertions(+), 95 deletions(-)

Toggle diff (230 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 5f7a93b8c6..1cf2327de6 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -66,6 +66,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages hurd)
@@ -2952,101 +2953,120 @@ perform geometrical transforms on JPEG images.")
       (license license:gpl3+))))
 
 (define-public nomad
-  (package
-    (name "nomad")
-    (version "0.1.2-alpha")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://git.savannah.gnu.org/git/nomad.git")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1dnkr1hmvfkwgxd75dcf93pg39yfgawvdpzdhv991yhghv0qxc9h"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("bash" ,bash)
-       ("pkg-config" ,pkg-config)
-       ("libtool" ,libtool)
-       ("guile" ,guile-2.2)
-       ("glib:bin" ,glib "bin")
-       ("texinfo" ,texinfo)
-       ("perl" ,perl)))
-    (inputs
-     `(("guile" ,guile-2.2)
-       ("guile-lib" ,guile2.2-lib)
-       ("guile-gcrypt" ,guile2.2-gcrypt)
-       ("guile-readline" ,guile2.2-readline)
-       ("gnutls" ,gnutls)
-       ("shroud" ,shroud)
-       ("emacsy" ,emacsy-minimal)
-       ("glib" ,glib)
-       ("dbus-glib" ,dbus-glib)
-       ("gtk+" ,gtk+)
-       ("gtksourceview" ,gtksourceview)
-       ("webkitgtk" ,webkitgtk)
-       ("xorg-server" ,xorg-server)))
-    (propagated-inputs
-     `(("glib" ,glib)
-       ("glib-networking" ,glib-networking)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (ice-9 popen)
-                  (ice-9 rdelim)
-                  (srfi srfi-26))
-       #:configure-flags
-       ;; Ignore ‘error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead.’
-       (list "CFLAGS=-Wno-error")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'check 'start-xorg-server
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; The test suite requires a running X server.
-             (system (format #f "~a/bin/Xvfb :1 &"
-                             (assoc-ref inputs "xorg-server")))
-             (setenv "DISPLAY" ":1")
-             #t))
-         (add-after 'install 'wrap-binaries
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (gio-deps (map (cut assoc-ref inputs <>) '("glib-networking"
-                                                               "glib")))
-                    (gio-mod-path (map (cut string-append <> "/lib/gio/modules")
-                                       gio-deps))
-                    (effective (read-line (open-pipe*
-                                           OPEN_READ
-                                           "guile" "-c"
-                                           "(display (effective-version))")))
-                    (deps (map (cut assoc-ref inputs <>)
-                               '("emacsy" "guile-lib" "guile-readline"
-                                 "shroud")))
-                    (scm-path (map (cut string-append <>
-                                        "/share/guile/site/" effective)
-                                   `(,out ,@deps)))
-                    (go-path (map (cut string-append <>
-                                       "/lib/guile/" effective "/site-ccache")
-                                  `(,out ,@deps)))
-                    (progs (map (cut string-append out "/bin/" <>)
-                                '("nomad"))))
-               (map (cut wrap-program <>
-                         `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-path)
-                         `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
-                         `("GUILE_LOAD_COMPILED_PATH" ":"
-                           prefix ,go-path))
-                    progs)
-               #t))))))
-    (home-page "https://savannah.nongnu.org/projects/nomad/")
-    (synopsis "Extensible Web Browser in Guile Scheme")
-    (description "Nomad is an Emacs-like Web Browser built using Webkitgtk and
-Emacsy.  It has a small C layer and most browser features are fully
-programmable in Guile.  It has hooks, keymaps, and self documentation
-features.")
-    (license license:gpl3+)))
+  (let ((commit "0.2.0-alpha")
+        (hash   (base32 "1z2z5x37v1qrk2vb8qlz2yj030iirzzd0maa9fjxzlqkrg6krbaj")))
+    (package
+      (name "nomad")
+      (version commit)
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://git.savannah.gnu.org/git/nomad.git")
+                      (commit version)))
+                (file-name (git-file-name name version))
+                (sha256 hash)))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("bash" ,bash)
+         ("pkg-config" ,pkg-config)
+         ("libtool" ,libtool)
+         ("guile" ,guile-2.2)
+         ("glib:bin" ,glib "bin")
+         ("texinfo" ,texinfo)
+         ("perl" ,perl)))
+      (inputs
+       `(("guile" ,guile-2.2)
+         ("guile-lib" ,guile2.2-lib)
+         ("guile-readline" ,guile2.2-readline)
+         ("guile-gcrypt" ,guile2.2-gcrypt)
+         ("gnutls" ,gnutls)
+         ("shroud" ,shroud)
+         ("emacsy" ,emacsy-minimal)
+         ("glib" ,glib)
+         ("dbus-glib" ,dbus-glib)
+         ("gtk+" ,gtk+)
+         ("gtk+:bin" ,gtk+ "bin")
+         ("gtksourceview" ,gtksourceview)
+         ("webkitgtk" ,webkitgtk)
+         ("g-golf" ,g-golf)
+         ("xorg-server" ,xorg-server)))
+      (propagated-inputs
+       `(("glib" ,glib)
+         ("glib-networking" ,glib-networking)
+         ("gstreamer" ,gstreamer)
+         ("gst-plugins-base" ,gst-plugins-base)
+         ("gst-plugins-good" ,gst-plugins-good)
+         ("gst-plugins-bad" ,gst-plugins-bad)
+         ("gst-plugins-ugly" ,gst-plugins-ugly)
+         ("gtk+" ,gtk+)
+         ("gtksourceview" ,gtksourceview)
+         ("vte" ,vte)
+         ("webkitgtk" ,webkitgtk)
+         ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
+      (arguments
+       `(#:modules ((guix build gnu-build-system)
+                    (guix build utils)
+                    (ice-9 popen)
+                    (ice-9 rdelim)
+                    (srfi srfi-26))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'start-xorg-server
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; The test suite requires a running X server.
+               (system (format #f "~a/bin/Xvfb :1 &"
+                               (assoc-ref inputs "xorg-server")))
+               (setenv "DISPLAY" ":1")
+               #t))
+           (add-after 'install 'wrap-binaries
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (gio-deps (map (cut assoc-ref inputs <>) '("glib-networking"
+                                                                 "glib"
+                                                                 "gstreamer"
+                                                                 "gst-plugins-base"
+                                                                 "gst-plugins-good"
+                                                                 "gst-plugins-bad"
+                                                                 "gst-plugins-ugly")))
+                      (gio-mod-path (map (cut string-append <> "/lib/gio/modules")
+                                         gio-deps))
+                      (effective (read-line (open-pipe*
+                                             OPEN_READ
+                                             "guile" "-c"
+                                             "(display (effective-version))")))
+                      (deps (map (cut assoc-ref inputs <>)
+                                 '("emacsy" "guile-lib" "guile-readline" "g-golf"
+                                   "shroud")))
+                      (scm-path (map (cut string-append <>
+                                          "/share/guile/site/" effective)
+                                     `(,out ,@deps)))
+                      (go-path (map (cut string-append <>
+                                         "/lib/guile/" effective "/site-ccache")
+                                    `(,out ,@deps)))
+                      (progs (map (cut string-append out "/bin/" <>)
+                                  '("nomad"))))
+                 (map (cut wrap-program <>
+                           `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-path)
+                           `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+                           `("GUILE_LOAD_COMPILED_PATH" ":"
+                             prefix ,go-path))
+                      progs)
+                 #t))))))
+      (native-search-paths
+       (list (search-path-specification
+              (variable "GI_TYPELIB_PATH")
+              (separator ":")
+              (files '("lib/girepository-1.0")))
+             (search-path-specification
+              (variable "NOMAD_WEB_EXTENSION_DIR")
+              (separator ":")
+              (files '("libexec/nomad")))))
+      (home-page "https://savannah.nongnu.org/projects/nomad/")
+      (synopsis "Extensible Web Browser in Guile Scheme")
+      (description "Nomad is a Emacs-like web browser that consists of a modular feature-set fully programmable in Guile Scheme.")
+      (license license:gpl3+))))
 
 (define-public guile-cv
   (package
-- 
2.27.0
M
M
Mathieu Othacehe wrote on 1 Aug 2020 09:29
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 42582@debbugs.gnu.org)
87a6zeako5.fsf@gnu.org
Hello Mike,

Toggle quote (2 lines)
> * gnu/packages/guile-xyz.scm (nomad): Update to 0.2.0-alpha.

Thanks for this patch. When I'm trying to run nomad, I have the
following error:

Toggle snippet (32 lines)
In nomad/gtk/window.scm:
19:0 19 (_)
In ice-9/boot-9.scm:
2874:4 18 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
2887:24 17 (_)
222:29 16 (map1 (((nomad gtk gi)) ((srfi srfi-26)) ((oop #)) (#) …))
222:29 15 (map1 (((srfi srfi-26)) ((oop goops)) ((emacsy #)) (#) …))
222:29 14 (map1 (((oop goops)) ((emacsy emacsy)) ((emacsy #)) # …))
222:29 13 (map1 (((emacsy emacsy)) ((emacsy window)) ((nomad …)) …))
222:29 12 (map1 (((emacsy window)) ((nomad web)) ((nomad text)) …))
222:29 11 (map1 (((nomad web)) ((nomad text)) ((nomad gtk #)) # …))
222:29 10 (map1 (((nomad text)) ((nomad gtk widget)) ((nomad …)) …))
222:17 9 (map1 (((nomad gtk widget)) ((nomad gtk frame)) ((…)) #))
2800:17 8 (resolve-interface (nomad gtk widget) #:select _ #:hide …)
In ice-9/threads.scm:
390:8 7 (_ _)
In ice-9/boot-9.scm:
2726:13 6 (_)
In ice-9/threads.scm:
390:8 5 (_ _)
In ice-9/boot-9.scm:
2994:20 4 (_)
2312:4 3 (save-module-excursion #<procedure 7f7138864690 at ice-…>)
3014:26 2 (_)
In unknown file:
1 (primitive-load-path "nomad/gtk/widget" #<procedure 7f7…>)
In nomad/gtk/widget.scm:
60:0 0 (_)

nomad/gtk/widget.scm:60:0: In procedure module-lookup: Unbound variable: <gtk-source-view>

do you know why?

Thanks,

Mathieu
M
M
Mike Rosset wrote on 1 Aug 2020 17:33
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
877duipehq.fsf@gmail.com
Mathieu Othacehe writes:

Toggle quote (46 lines)
> Hello Mike,
>
>> * gnu/packages/guile-xyz.scm (nomad): Update to 0.2.0-alpha.
>
> Thanks for this patch. When I'm trying to run nomad, I have the
> following error:
>
> --8<---------------cut here---------------start------------->8---
> In nomad/gtk/window.scm:
> 19:0 19 (_)
> In ice-9/boot-9.scm:
> 2874:4 18 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
> 2887:24 17 (_)
> 222:29 16 (map1 (((nomad gtk gi)) ((srfi srfi-26)) ((oop #)) (#) …))
> 222:29 15 (map1 (((srfi srfi-26)) ((oop goops)) ((emacsy #)) (#) …))
> 222:29 14 (map1 (((oop goops)) ((emacsy emacsy)) ((emacsy #)) # …))
> 222:29 13 (map1 (((emacsy emacsy)) ((emacsy window)) ((nomad …)) …))
> 222:29 12 (map1 (((emacsy window)) ((nomad web)) ((nomad text)) …))
> 222:29 11 (map1 (((nomad web)) ((nomad text)) ((nomad gtk #)) # …))
> 222:29 10 (map1 (((nomad text)) ((nomad gtk widget)) ((nomad …)) …))
> 222:17 9 (map1 (((nomad gtk widget)) ((nomad gtk frame)) ((…)) #))
> 2800:17 8 (resolve-interface (nomad gtk widget) #:select _ #:hide …)
> In ice-9/threads.scm:
> 390:8 7 (_ _)
> In ice-9/boot-9.scm:
> 2726:13 6 (_)
> In ice-9/threads.scm:
> 390:8 5 (_ _)
> In ice-9/boot-9.scm:
> 2994:20 4 (_)
> 2312:4 3 (save-module-excursion #<procedure 7f7138864690 at ice-…>)
> 3014:26 2 (_)
> In unknown file:
> 1 (primitive-load-path "nomad/gtk/widget" #<procedure 7f7…>)
> In nomad/gtk/widget.scm:
> 60:0 0 (_)
>
> nomad/gtk/widget.scm:60:0: In procedure module-lookup: Unbound variable: <gtk-source-view>
> --8<---------------cut here---------------end--------------->8---
>
> do you know why?
>
> Thanks,
>
> Mathieu

Hello Mathieu,

A number of things could be causing this either gtksourceview is not
being propagated or there could be a problem with g-golf. Or how you are
invoking nomad.

Please try with ./pre-inst-env nomad --ad-hoc nomad -- nonmad. This is
assuming you have patched guile-xyz.scm locally in the guix source tree.

Let me know how it goes.

Mike
M
M
Mike Rosset wrote on 1 Aug 2020 17:35
(name . Mike Rosset)(address . mike.rosset@gmail.com)
874kpmpeey.fsf@gmail.com
Mike Rosset writes:

Toggle quote (2 lines)
> Please try with ./pre-inst-env nomad --ad-hoc nomad -- nonmad. This is

This should be ./pre-inst-env guix --ad-hoc nomad -- nonmad. Applogies I
just woke up :)
M
M
Mathieu Othacehe wrote on 1 Aug 2020 20:05
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 42582-done@debbugs.gnu.org)
871rkqb5s4.fsf@gnu.org
Hey,

Toggle quote (3 lines)
> This should be ./pre-inst-env guix --ad-hoc nomad -- nonmad. Applogies I
> just woke up :)

You were right my environment was somehow polluted. I made a few
cosmetic changes, added your copyright and pushed.

Thanks,

Mathieu
Closed
M
M
Mike Rosset wrote on 1 Aug 2020 20:28
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
871rkqp6e1.fsf@gmail.com
Mathieu Othacehe writes:

Toggle quote (12 lines)
> Hey,
>
>> This should be ./pre-inst-env guix --ad-hoc nomad -- nonmad. Applogies I
>> just woke up :)
>
> You were right my environment was somehow polluted. I made a few
> cosmetic changes, added your copyright and pushed.
>
> Thanks,
>
> Mathieu

Great! I appreciate you looking at this Mathieu.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 42582@debbugs.gnu.org