all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#32137] [PATCH] gnu: Add luakit
@ 2018-07-13 13:38 Raphaël Mélotte
  2018-07-17 13:14 ` bug#32137: " Ludovic Courtès
       [not found] ` <handler.32137.D32137.153183329315581.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Raphaël Mélotte @ 2018-07-13 13:38 UTC (permalink / raw)
  To: 32137


[-- Attachment #1.1: Type: text/plain, Size: 159 bytes --]

This patch adds luakit, a lightweight web browser based on webkitgtk.

NB: this is my first patch submission, I apologize in advance if I did
something wrong.

[-- Attachment #1.2: Type: text/html, Size: 204 bytes --]

[-- Attachment #2: 0001-add-luakit.patch --]
[-- Type: text/x-patch, Size: 4073 bytes --]

From 36bae98701a1c04de2820781dd8b7488cac61e30 Mon Sep 17 00:00:00 2001
From: 43317 <43317@etu.he2b.be>
Date: Fri, 13 Jul 2018 15:28:41 +0200
Subject: [PATCH] add luakit

---
 gnu/packages/web-browsers.scm | 65 +++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index e36677282..02f076bbe 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -27,12 +27,16 @@
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages lua)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -41,9 +45,11 @@
   #:use-module (gnu packages qt)
   #:use-module (gnu packages image)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xorg)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python))
 
 (define-public dillo
@@ -128,6 +134,65 @@ features including, tables, builtin image display, bookmarks, SSL and more.")
     ;; linking of the program with openssl.
     (license license:gpl1+)))
 
+(define-public luakit
+  (package
+    (name "luakit")
+    (version "2017.08.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/luakit/luakit/archive/" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "0dwxhnq90whakgdg21lzcf03n2g1c7hqgliwhav8av5na5mqpn93"))))
+    (inputs
+     `(("lua-5.1", lua-5.1)
+       ("gtk+" ,gtk+)
+       ("gsettings-desktop-schemas", gsettings-desktop-schemas)
+       ("glib-networking", glib-networking)
+       ("lua5.1-filesystem", lua5.1-filesystem)
+       ("luajit", luajit)
+       ("webkitgtk", webkitgtk)
+       ("sqlite", sqlite)))
+    (native-inputs
+     `(("pkg-config", pkg-config)))
+    (build-system glib-or-gtk-build-system)
+    (arguments
+     '(#:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list
+          "CC=gcc"
+          "LUA_BIN_NAME=lua"
+          "DEVELOPMENT_PATHS=0"
+          (string-append "PREFIX=" out)
+          (string-append "XDGPREFIX=" out "/etc/xdg")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'lfs-workaround
+           (lambda _
+             (setenv "LUA_CPATH"
+                     (string-append
+                      (assoc-ref %build-inputs "lua5.1-filesystem")
+                      "/lib/lua/5.1/?.so;;"))
+             #t))
+         (delete 'configure)
+         (delete 'check)
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((luakit (assoc-ref outputs "out"))
+                    (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
+                    (gtk (assoc-ref inputs "gtk+"))
+                    (gtk-share (string-append gtk "/share")))
+               (wrap-program (string-append luakit "/bin/luakit")
+                 `("LUA_CPATH" prefix (,(string-append
+                                         lua5.1-filesystem "/lib/lua/5.1/?.so;;"))))))))))
+    (synopsis "Fast, light and simple browser based on webkit")
+    (description "Luakit is a fast, light and simple to use micro-browser
+ framework extensible by Lua
+ using the WebKit web content engine and the GTK+ toolkit.")
+    (home-page "https://luakit.github.io/")
+    (license license:gpl3)))
+
 (define-public lynx
   (package
     (name "lynx")
-- 
2.18.0


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

* bug#32137: [PATCH] gnu: Add luakit
  2018-07-13 13:38 [bug#32137] [PATCH] gnu: Add luakit Raphaël Mélotte
@ 2018-07-17 13:14 ` Ludovic Courtès
       [not found] ` <handler.32137.D32137.153183329315581.notifdone@debbugs.gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2018-07-17 13:14 UTC (permalink / raw)
  To: Raphaël Mélotte; +Cc: 32137-done

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

Hello Raphaël,

Raphaël Mélotte <raphael.melotte@gmail.com> skribis:

> This patch adds luakit, a lightweight web browser based on webkitgtk.
>
> NB: this is my first patch submission, I apologize in advance if I did
> something wrong.
> From 36bae98701a1c04de2820781dd8b7488cac61e30 Mon Sep 17 00:00:00 2001
> From: 43317 <43317@etu.he2b.be>
> Date: Fri, 13 Jul 2018 15:28:41 +0200
> Subject: [PATCH] add luakit
>
> ---
>  gnu/packages/web-browsers.scm | 65 +++++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)

Thanks for this first patch and welcome!  I made only minor
modifications (patch below):

  1. Add ‘file-name’ to the source to please ‘guix lint’.

  2. Return #t at the end of the ‘wrap’ phase.

  3. Tweak the synopses and description.

  4. Change license to ‘gpl3+’ because source file headers explicitly
     say “version 3 or any later version”.

I provided a commit log that matches our conventions too.

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=700987f72c870b9a8e3ed6cd538064e2c2b8f3ce

That’s it!

I tried running “luakit -c /dev/null” but it insists on having an rc
file that explicitly creates a window, right?

Thank you!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1890 bytes --]

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 02f076bbe..56bfa6ab2 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -144,7 +144,8 @@ features including, tables, builtin image display, bookmarks, SSL and more.")
                                   ".tar.gz"))
               (sha256
                (base32
-                "0dwxhnq90whakgdg21lzcf03n2g1c7hqgliwhav8av5na5mqpn93"))))
+                "0dwxhnq90whakgdg21lzcf03n2g1c7hqgliwhav8av5na5mqpn93"))
+              (file-name (string-append name "-" version ".tar.gz"))))
     (inputs
      `(("lua-5.1", lua-5.1)
        ("gtk+" ,gtk+)
@@ -184,14 +185,16 @@ features including, tables, builtin image display, bookmarks, SSL and more.")
                     (gtk (assoc-ref inputs "gtk+"))
                     (gtk-share (string-append gtk "/share")))
                (wrap-program (string-append luakit "/bin/luakit")
-                 `("LUA_CPATH" prefix (,(string-append
-                                         lua5.1-filesystem "/lib/lua/5.1/?.so;;"))))))))))
-    (synopsis "Fast, light and simple browser based on webkit")
-    (description "Luakit is a fast, light and simple to use micro-browser
- framework extensible by Lua
- using the WebKit web content engine and the GTK+ toolkit.")
+                 `("LUA_CPATH" prefix
+                   (,(string-append lua5.1-filesystem
+                                    "/lib/lua/5.1/?.so;;"))))
+               #t))))))
+    (synopsis "Fast, lightweight, and simple browser based on WebKit")
+    (description "Luakit is a fast, lightweight, and simple to use
+micro-browser framework extensible by Lua using the WebKit web content engine
+and the GTK+ toolkit.")
     (home-page "https://luakit.github.io/")
-    (license license:gpl3)))
+    (license license:gpl3+)))
 
 (define-public lynx
   (package

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

* [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit)
       [not found] ` <handler.32137.D32137.153183329315581.notifdone@debbugs.gnu.org>
@ 2018-07-17 14:15   ` Raphaël Mélotte
  2018-07-24  8:43     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Raphaël Mélotte @ 2018-07-17 14:15 UTC (permalink / raw)
  To: 32137

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

> From: "Ludovic Courtès" <ludo@gnu.org>
>
> Thanks for this first patch and welcome!  I made only minor
> modifications (patch below):
>
>   1. Add ‘file-name’ to the source to please ‘guix lint’.
>

I spotted the issue reported by 'guix lint', but I didn't know how to fix
it. Now I do :-)


>
>   2. Return #t at the end of the ‘wrap’ phase.


I took inspiration from Icecat's definition but it looks like I missed
this. Why is it necessary to return #t ?


>   4. Change license to ‘gpl3+’ because source file headers explicitly
>      say “version 3 or any later version”.
>

I was tricked by the website that says it's GPLv3 but you're right, the
source files says GPLv3+.


I tried running “luakit -c /dev/null” but it insists on having an rc
> file that explicitly creates a window, right?
>

I've never used custom configuration files, but once installed, running
only `luakit` should
load the default files from '~/.guix-profile/etc/xdg/luakit' and open
luakit's homepage.
Does it fail if you only run `luakit` ?


Thanks!

[-- Attachment #2: Type: text/html, Size: 1955 bytes --]

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

* [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit)
  2018-07-17 14:15   ` [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit) Raphaël Mélotte
@ 2018-07-24  8:43     ` Ludovic Courtès
  2018-08-06  8:24       ` Raphaël Mélotte
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-07-24  8:43 UTC (permalink / raw)
  To: Raphaël Mélotte; +Cc: 32137

Hello,

Raphaël Mélotte <raphael.melotte@gmail.com> skribis:

>  From: "Ludovic Courtès" <ludo@gnu.org>
>
>  Thanks for this first patch and welcome!  I made only minor
>  modifications (patch below):
>
>    1. Add ‘file-name’ to the source to please ‘guix lint’.
>
> I spotted the issue reported by 'guix lint', but I didn't know how to fix it. Now I do :-)

:-)

>    2. Return #t at the end of the ‘wrap’ phase. 
>
> I took inspiration from Icecat's definition but it looks like I missed this. Why is it necessary to return #t ?  

Currently the code that runs phases looks at the value they return to
determine success or failure.  That will change hopefully in the near
future, but for now we have to return a Boolean to make that clear.

>  I tried running “luakit -c /dev/null” but it insists on having an rc
>  file that explicitly creates a window, right?
>
> I've never used custom configuration files, but once installed, running only `luakit` should
> load the default files from '~/.guix-profile/etc/xdg/luakit' and open luakit's homepage.
> Does it fail if you only run `luakit` ?

Here’s what I get:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/7fxcgx5vdnlggw2ffc1xamxjlxvl1w09-luakit-2017.08.10/bin/luakit

** (.luakit-real:3176): WARNING **: 10:43:15.534: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[    0.081785] W [core/luah]: couldn't load any rc file
[    0.081813] F [core/luakit]: couldn't find rc file
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.

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

* [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit)
  2018-07-24  8:43     ` Ludovic Courtès
@ 2018-08-06  8:24       ` Raphaël Mélotte
  2018-08-19 21:02         ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Raphaël Mélotte @ 2018-08-06  8:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32137


Ludovic Courtès writes:


> Here’s what I get:
>
> --8<---------------cut here---------------start------------->8---
> $ /gnu/store/7fxcgx5vdnlggw2ffc1xamxjlxvl1w09-luakit-2017.08.10/bin/luakit
>
> ** (.luakit-real:3176): WARNING **: 10:43:15.534: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
> [    0.081785] W [core/luah]: couldn't load any rc file
> [    0.081813] F [core/luakit]: couldn't find rc file
> --8<---------------cut here---------------end--------------->8---
>
> Thanks,
> Ludo’.

Whoops, you're right: it's working for me on GuixSD, but on Debian+Guix,
if I don't source '~/.guix-profile/etc/profile', XDG_CONFIG_DIRS is not
set to look in the Guix store and luakit can't find it's default configuration.

Should I add a wrapping phase that sets XDG_CONFIG_DIRS or do we rely on
the user sourcing '~/.guix-profile/etc/profile' ?


Thanks
-- 
Raphaël Mélotte

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

* [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit)
  2018-08-06  8:24       ` Raphaël Mélotte
@ 2018-08-19 21:02         ` Ludovic Courtès
  2018-08-20 14:40           ` Raphaël Mélotte
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-08-19 21:02 UTC (permalink / raw)
  To: Raphaël Mélotte; +Cc: 32137

Raphaël Mélotte <raphael.melotte@gmail.com> skribis:

> Ludovic Courtès writes:
>
>
>> Here’s what I get:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ /gnu/store/7fxcgx5vdnlggw2ffc1xamxjlxvl1w09-luakit-2017.08.10/bin/luakit
>>
>> ** (.luakit-real:3176): WARNING **: 10:43:15.534: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
>> [    0.081785] W [core/luah]: couldn't load any rc file
>> [    0.081813] F [core/luakit]: couldn't find rc file
>> --8<---------------cut here---------------end--------------->8---
>>
>> Thanks,
>> Ludo’.
>
> Whoops, you're right: it's working for me on GuixSD, but on Debian+Guix,
> if I don't source '~/.guix-profile/etc/profile', XDG_CONFIG_DIRS is not
> set to look in the Guix store and luakit can't find it's default configuration.
>
> Should I add a wrapping phase that sets XDG_CONFIG_DIRS or do we rely on
> the user sourcing '~/.guix-profile/etc/profile' ?

Good question.  Note that ~/.guix-profile/etc/profile will not set
XDG_CONFIG_DIRS, unless qtbase is installed in the profile (from a quick
grep in gnu/packages/*.scm.)

Thus it probably makes sense to add a wrapping phase so that Luakit
always works out of the box.

Thoughts?

Thanks,
Ludo’.

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

* [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit)
  2018-08-19 21:02         ` Ludovic Courtès
@ 2018-08-20 14:40           ` Raphaël Mélotte
  0 siblings, 0 replies; 7+ messages in thread
From: Raphaël Mélotte @ 2018-08-20 14:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32137


Ludovic Courtès writes:

> Good question.  Note that ~/.guix-profile/etc/profile will not set
> XDG_CONFIG_DIRS, unless qtbase is installed in the profile (from a quick
> grep in gnu/packages/*.scm.)
>
> Thus it probably makes sense to add a wrapping phase so that Luakit
> always works out of the box.

Ok, thanks for the explanation, I'll try to send a patch.

-- 
Raphaël Mélotte

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

end of thread, other threads:[~2018-08-20 14:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 13:38 [bug#32137] [PATCH] gnu: Add luakit Raphaël Mélotte
2018-07-17 13:14 ` bug#32137: " Ludovic Courtès
     [not found] ` <handler.32137.D32137.153183329315581.notifdone@debbugs.gnu.org>
2018-07-17 14:15   ` [bug#32137] closed (Re: [bug#32137] [PATCH] gnu: Add luakit) Raphaël Mélotte
2018-07-24  8:43     ` Ludovic Courtès
2018-08-06  8:24       ` Raphaël Mélotte
2018-08-19 21:02         ` Ludovic Courtès
2018-08-20 14:40           ` Raphaël Mélotte

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.