all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#73937] [PATCH]: Update Nyxt to 3.12.0
@ 2024-10-21 19:16 André A. Gomes
  2024-10-23 12:02 ` Guillaume Le Vaillant
  0 siblings, 1 reply; 4+ messages in thread
From: André A. Gomes @ 2024-10-21 19:16 UTC (permalink / raw)
  To: 73937

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

Hello Guix,

Attached, thanks.

Please note that I am one of the Nyxt developers.  The changes reflect
that fact that the Lisp dependencies are pinned as git submodules.  The
tests are temporarily disabled since they fail due to undocumented
exported symbols (which is unreasonable).  I only noticed it after the
release, but I'll fix it for the next release.


-- 
André A. Gomes
"You cannot even find the ruins..."

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-nyxt-Update-to-3.12.0.patch --]
[-- Type: text/x-diff, Size: 11424 bytes --]

From 3a6970e3f5661c3948cda7a9ab0d256d46f2c948 Mon Sep 17 00:00:00 2001
From: "Andre A. Gomes" <andremegafone@gmail.com>
Date: Mon, 21 Oct 2024 22:10:30 +0300
Subject: [PATCH] gnu: nyxt: Update to 3.12.0.

* gnu/packages/web-browsers.scm (nyxt): Update to 3.12.0.
---
 gnu/packages/web-browsers.scm | 184 +++++++++++++++++-----------------
 1 file changed, 92 insertions(+), 92 deletions(-)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 7f04af981a..492ac9e1e1 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -57,6 +57,7 @@ (define-module (gnu packages web-browsers)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages c)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
@@ -104,8 +105,10 @@ (define-module (gnu packages web-browsers)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages text-editors)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
 (define-public midori
@@ -601,127 +604,124 @@ (define-public vimb
 (define-public nyxt
   (package
     (name "nyxt")
-    (version "3.11.7")
+    (version "3.12.0")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/atlas-engineer/nyxt")
-             (commit version)))
+             (commit version)
+             (recursive? #t)))
        (sha256
         (base32
-         "0qrlks2b4a02b1lf8ah5cv3y32kh8yxnxkvfgrnia92g72xpj4j2"))
+         "0nilfqcsily1y7x641cby5wsbh5va6jcfn8bx3fr90gjgccwvay0"))
        (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list "nyxt" "NYXT_SUBMODULES=false"
+     `(#:make-flags (list "nyxt"
                           (string-append "DESTDIR=" (assoc-ref %outputs "out"))
                           "PREFIX=")
        #:strip-binaries? #f             ; Stripping breaks SBCL binaries.
+       #:tests? #f
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (add-before 'build 'fix-so-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "_build/cl-plus-ssl/src/reload.lisp"
+               (("libssl.so" all)
+                (string-append (assoc-ref inputs "openssl") "/lib/" all))
+               (("libcrypto.so" all)
+                (string-append (assoc-ref inputs "openssl") "/lib/" all)))
+             (substitute* "_build/iolib/src/syscalls/ffi-functions-unix.lisp"
+               (("\\(:default \"libfixposix\"\\)")
+                (string-append "(:default \""
+                               (assoc-ref inputs "libfixposix")
+                               "/lib/libfixposix\")")))
+             (substitute* "_build/cl-sqlite/sqlite-ffi.lisp"
+               (("libsqlite3" all)
+                (string-append (assoc-ref inputs "sqlite") "/lib/" all)))
+             (substitute* "_build/cl-gobject-introspection/src/init.lisp"
+               (("libgobject-2\\.0\\.so")
+                (search-input-file inputs "/lib/libgobject-2.0.so"))
+               (("libgirepository-1\\.0\\.so")
+                (search-input-file inputs "/lib/libgirepository-1.0.so")))
+             (substitute* "_build/cl-webkit/webkit2/webkit2.init.lisp"
+               (("libwebkit2gtk" all)
+                (string-append (assoc-ref inputs "webkitgtk-for-gtk3") "/lib/" all)))
+             (substitute* "_build/cl-cffi-gtk/glib/glib.init.lisp"
+               (("libglib-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all)))
+               (("libgthread-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/gobject/gobject.init.lisp"
+               (("libgobject-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/gio/gio.init.lisp"
+               (("libgio-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/cairo/cairo.init.lisp"
+               (("libcairo\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/pango/pango.init.lisp"
+               (("libpango-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all)))
+               (("libpangocairo-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/gdk-pixbuf/gdk-pixbuf.init.lisp"
+               (("libgdk_pixbuf-[0-9.]*\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/gdk/gdk.init.lisp"
+               (("libgdk-[0-9]\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))
+             (substitute* "_build/cl-cffi-gtk/gdk/gdk.package.lisp"
+               (("libgtk-[0-9]\\.so" all)
+                (search-input-file inputs (string-append "/lib/" all))))))
+         (add-after 'unpack 'fix-clipboard-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "_build/trivial-clipboard/src/text.lisp"
+               (("\"xsel\"")
+                (string-append "\"" (assoc-ref inputs "xsel") "/bin/xsel\""))
+               (("\"wl-copy\"")
+                (string-append "\"" (assoc-ref inputs "wl-clipboard") "/bin/wl-copy\""))
+               (("\"wl-paste\"")
+                (string-append "\"" (assoc-ref inputs "wl-clipboard") "/bin/wl-paste\"")))))
          (add-before 'build 'fix-common-lisp-cache-folder
            (lambda _ (setenv "HOME" "/tmp")))
          (add-before 'check 'configure-tests
-           (lambda _ (setenv "NYXT_TESTS_NO_NETWORK" "1")))
+           (lambda _ (setenv "NASDF_TESTS_NO_NETWORK" "1")))
          (add-after 'install 'wrap-program
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((bin (string-append (assoc-ref outputs "out") "/bin/nyxt"))
-                    (glib-networking (assoc-ref inputs "glib-networking"))
-                    (libs '("gsettings-desktop-schemas"))
-                    (path (string-join
-                           (map (lambda (lib)
-                                  (string-append (assoc-ref inputs lib) "/lib"))
-                                libs)
-                           ":"))
-                    (gi-path (getenv "GI_TYPELIB_PATH"))
-                    (xdg-path (string-join
-                               (map (lambda (lib)
-                                      (string-append (assoc-ref inputs lib) "/share"))
-                                    libs)
-                               ":")))
-               (wrap-program bin
+             (let ((gsettings (assoc-ref inputs "gsettings-desktop-schemas")))
+               (wrap-program (string-append (assoc-ref outputs "out") "/bin/nyxt")
                  `("GIO_EXTRA_MODULES" prefix
-                   (,(string-append glib-networking "/lib/gio/modules")))
-                 `("GI_TYPELIB_PATH" prefix (,gi-path))
-                 `("LD_LIBRARY_PATH" ":" prefix (,path))
-                 `("XDG_DATA_DIRS" ":" prefix (,xdg-path)))))))))
+                   (,(string-append (assoc-ref inputs "glib-networking")
+                                    "/lib/gio/modules")))
+                 `("GI_TYPELIB_PATH" prefix (,(getenv "GI_TYPELIB_PATH")))
+                 `("LD_LIBRARY_PATH" ":" prefix (,(string-append gsettings "/lib")))
+                 `("XDG_DATA_DIRS" ":" prefix (,(string-append gsettings "/share"))))))))))
     (native-inputs (list cl-lisp-unit2 sbcl))
-    (inputs (list bash-minimal
-                  sbcl-alexandria
-                  sbcl-bordeaux-threads
-                  sbcl-calispel
-                  sbcl-cl-base64
-                  sbcl-cl-colors2
-                  sbcl-cl-containers
-                  sbcl-cl-gopher
-                  sbcl-cl-html-diff
-                  sbcl-cl-json
-                  sbcl-cl-ppcre
-                  sbcl-cl-prevalence
-                  sbcl-cl-qrencode
-                  sbcl-cl-sqlite
-                  sbcl-cl-str
-                  sbcl-cl-tld
-                  sbcl-closer-mop
-                  sbcl-clss
-                  sbcl-cluffer
-                  sbcl-custom-hash-table
-                  sbcl-dexador
-                  sbcl-dissect
-                  sbcl-enchant
-                  sbcl-flexi-streams
-                  sbcl-history-tree
-                  sbcl-iolib
-                  sbcl-lass
-                  sbcl-local-time
-                  sbcl-log4cl
-                  sbcl-lparallel
-                  sbcl-montezuma
-                  sbcl-moptilities
-                  sbcl-named-readtables
-                  sbcl-nclasses
-                  sbcl-ndebug
-                  sbcl-nfiles
-                  sbcl-nhooks
-                  sbcl-njson
-                  sbcl-nkeymaps
-                  sbcl-nsymbols
-                  sbcl-parenscript
-                  sbcl-phos
-                  sbcl-plump
-                  sbcl-prompter
-                  sbcl-py-configparser
-                  sbcl-quri
-                  sbcl-serapeum
-                  sbcl-slime-swank
-                  sbcl-slynk
-                  sbcl-spinneret
-                  sbcl-trivia
-                  sbcl-trivial-clipboard
-                  sbcl-trivial-custom-debugger
-                  sbcl-trivial-features
-                  sbcl-trivial-garbage
-                  sbcl-trivial-package-local-nicknames
-                  sbcl-trivial-types
-                  sbcl-unix-opts
-                  ;; WebKitGTK deps
-                  sbcl-cl-cffi-gtk
-                  sbcl-cl-webkit
+    (inputs (list cairo
+                  git
+                  glib
                   glib-networking
-                  gsettings-desktop-schemas
-                  cl-gobject-introspection
-                  gtk+                  ; For the main loop
-                  webkitgtk-for-gtk3    ; Required when we use its typelib
                   gobject-introspection
-                  pkg-config
-                  ;; Useful for video playback
+                  gsettings-desktop-schemas
                   gst-libav
                   gst-plugins-bad
                   gst-plugins-base
                   gst-plugins-good
-                  gst-plugins-ugly))
+                  gst-plugins-ugly
+                  gtk+
+                  gdk-pixbuf
+                  libfixposix
+                  openssl
+                  pango
+                  pkg-config
+                  sqlite
+                  webkitgtk-for-gtk3
+                  wl-clipboard
+                  xsel))
     (synopsis "Extensible web-browser in Common Lisp")
     (home-page "https://nyxt-browser.com/")
     (description "Nyxt is a keyboard-oriented, extensible web-browser designed
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#73937] [PATCH]: Update Nyxt to 3.12.0
  2024-10-21 19:16 [bug#73937] [PATCH]: Update Nyxt to 3.12.0 André A. Gomes
@ 2024-10-23 12:02 ` Guillaume Le Vaillant
  2024-10-23 12:33   ` André A. Gomes
  0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Le Vaillant @ 2024-10-23 12:02 UTC (permalink / raw)
  To: André A. Gomes; +Cc: 73937

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

André A. Gomes <andremegafone@gmail.com> skribis:

> Hello Guix,
>
> Attached, thanks.
>
> Please note that I am one of the Nyxt developers.  The changes reflect
> that fact that the Lisp dependencies are pinned as git submodules.  The
> tests are temporarily disabled since they fail due to undocumented
> exported symbols (which is unreasonable).  I only noticed it after the
> release, but I'll fix it for the next release.

Hi.
We usually try to avoid taking libraries from git submodules unless the
software can't be made to compile with system libraries.
Can't Nyxt 3.12.0 work with the libraries packaged in Guix?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#73937] [PATCH]: Update Nyxt to 3.12.0
  2024-10-23 12:02 ` Guillaume Le Vaillant
@ 2024-10-23 12:33   ` André A. Gomes
  2024-10-23 19:31     ` Guillaume Le Vaillant
  0 siblings, 1 reply; 4+ messages in thread
From: André A. Gomes @ 2024-10-23 12:33 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: 73937

Guillaume Le Vaillant <glv@posteo.net> writes:

> André A. Gomes <andremegafone@gmail.com> skribis:
>
>> Hello Guix,
>>
>> Attached, thanks.
>>
>> Please note that I am one of the Nyxt developers.  The changes reflect
>> that fact that the Lisp dependencies are pinned as git submodules.  The
>> tests are temporarily disabled since they fail due to undocumented
>> exported symbols (which is unreasonable).  I only noticed it after the
>> release, but I'll fix it for the next release.
>
> Hi.
> We usually try to avoid taking libraries from git submodules unless the
> software can't be made to compile with system libraries.
> Can't Nyxt 3.12.0 work with the libraries packaged in Guix?

Nyxt pins Common Lisp libraries versions as to ensure everything works
as expected.  Concretely, there's an issue related to sbcl-alexandria
since the commit Guix is using breaks Nyxt's functionality (see [1]).

You may argue that a sbcl-alexandria variant could be defined (see [2]),
but it seems brittle from Nyxt's perspective and probably undesirable
from Guix's perspective.

All package managers are using the git submodules to build Nyxt,
including Nix.  From Nyxt's perspective, any build that won't use the
pinned CL libraries versions isn't Nyxt per se, but a custom build (or
perhaps a "variation" in Guix's parlance).

Happy to know your thoughts.

[1] https://github.com/atlas-engineer/nyxt/issues/3503
[2] https://github.com/aadcg/aadcg-guix-channel/blob/284a62f30b91642b08a66d02679611655d0bfb51/packages/aadcg-nyxt.scm#L20


-- 
André A. Gomes
"You cannot even find the ruins..."




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#73937] [PATCH]: Update Nyxt to 3.12.0
  2024-10-23 12:33   ` André A. Gomes
@ 2024-10-23 19:31     ` Guillaume Le Vaillant
  0 siblings, 0 replies; 4+ messages in thread
From: Guillaume Le Vaillant @ 2024-10-23 19:31 UTC (permalink / raw)
  To: André A. Gomes; +Cc: 73937

[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]

André A. Gomes <andremegafone@gmail.com> skribis:

> Guillaume Le Vaillant <glv@posteo.net> writes:
>
>> Hi.
>> We usually try to avoid taking libraries from git submodules unless the
>> software can't be made to compile with system libraries.
>> Can't Nyxt 3.12.0 work with the libraries packaged in Guix?
>
> Nyxt pins Common Lisp libraries versions as to ensure everything works
> as expected.  Concretely, there's an issue related to sbcl-alexandria
> since the commit Guix is using breaks Nyxt's functionality (see [1]).
>
> You may argue that a sbcl-alexandria variant could be defined (see [2]),
> but it seems brittle from Nyxt's perspective and probably undesirable
> from Guix's perspective.
>
> All package managers are using the git submodules to build Nyxt,
> including Nix.  From Nyxt's perspective, any build that won't use the
> pinned CL libraries versions isn't Nyxt per se, but a custom build (or
> perhaps a "variation" in Guix's parlance).
>
> Happy to know your thoughts.
>
> [1] https://github.com/atlas-engineer/nyxt/issues/3503
> [2] https://github.com/aadcg/aadcg-guix-channel/blob/284a62f30b91642b08a66d02679611655d0bfb51/packages/aadcg-nyxt.scm#L20

If I understand correctly, the issue comes from the fact that the
read-stream-content-into-string function from recent versions of
alexandria doesn't accept an octet stream as argument instead of
a character stream anymore.

Wouldn't it be possible to replace

    (alexandria:read-stream-content-into-string connection)

by something like

    (map 'string
         #'code-char
         (alexandria:read-stream-content-into-byte-vector connection))

in Nyxt? If it works it would allow us to continue using the system
libraries (some of which might have patches to work well in Guix).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-23 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21 19:16 [bug#73937] [PATCH]: Update Nyxt to 3.12.0 André A. Gomes
2024-10-23 12:02 ` Guillaume Le Vaillant
2024-10-23 12:33   ` André A. Gomes
2024-10-23 19:31     ` Guillaume Le Vaillant

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.