all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: awesome: Update to 3.5.9.
@ 2016-09-01 22:59 doncatnip
  2016-09-02 10:43 ` ng0
  2016-09-20 19:02 ` Leo Famulari
  0 siblings, 2 replies; 7+ messages in thread
From: doncatnip @ 2016-09-01 22:59 UTC (permalink / raw)
  To: guix-devel@gnu.org

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

Hey Guix !

Let's try this again.

[-- Attachment #2: 0001-gnu-lua-Remove-conflicting-flag-pass-MYCFLAGS.patch --]
[-- Type: text/x-patch, Size: 905 bytes --]

From 99ac37565b7a4826c9ca3c9f0545825924effc3d Mon Sep 17 00:00:00 2001
From: doncatnip <gnopap@gmail.com>
Date: Thu, 1 Sep 2016 23:08:28 +0200
Subject: [PATCH 1/3] gnu: lua: Remove conflicting flag, pass MYCFLAGS

* gnu/packages/lua.scm (lua)[arguments]: Use MYCFLAGS instead of
CFLAGS and remove conflicting -DLUA_USE_POSIX since -DLUA_USE_LINUX
is passed implicitly for build target "linux".
---
 gnu/packages/lua.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 8bd67c5..9f19cc9 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -51,7 +51,7 @@
                   (srfi srfi-1))
        #:test-target "test"
        #:make-flags
-       '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX"
+       '("MYCFLAGS=-fPIC -DLUA_DL_DLOPEN"
          "linux")
        #:phases
        (modify-phases %standard-phases
-- 
2.9.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-lua-Add-lua-lgi.patch --]
[-- Type: text/x-patch, Size: 4495 bytes --]

From 57a998f52e2d77e758ff339d03f26556b3b9c63f Mon Sep 17 00:00:00 2001
From: doncatnip <gnopap@gmail.com>
Date: Thu, 1 Sep 2016 23:53:32 +0200
Subject: [PATCH 2/3] gnu: lua: Add lua-lgi.

* gnu/packages/lua.scm (lua-lgi): New variable.
---
 gnu/packages/lua.scm | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 9f19cc9..cdc28b0 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +30,12 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages gtk))
 
 (define-public lua
   (package
@@ -259,3 +265,72 @@ directory structure and file attributes.")
 communication.  It takes an already established TCP connection and creates a
 secure session between the peers.")
     (license (package-license lua-5.1))))
+
+(define-public lua-lgi
+  (package
+    (name "lua-lgi")
+    (version "0.9.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "https://github.com/pavouk/lgi/archive/"
+              version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "1fmgdl5y4ph3yc6ycg865s3vai1rjkyda61cgqxk6zd13hmznw0c"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+      (modify-phases %standard-phases
+        (delete 'configure) ; no configure script
+        (add-before 'build 'set-env
+          (lambda* (#:key inputs #:allow-other-keys)
+            ; we need to load cairo dynamically
+            (let* ((cairo (string-append
+                            (assoc-ref inputs "cairo") "/lib" )))
+              (setenv "LD_LIBRARY_PATH" cairo ))))
+        (add-before 'build 'set-lua-version
+          (lambda _
+            ; lua version and therefore install directories are hardcoded
+            ; FIXME: This breaks when we update lua to >=5.3
+            (substitute* "./lgi/Makefile"
+                       (("LUA_VERSION=5.1") "LUA_VERSION=5.2"))))
+        (add-before 'check 'skip-test-gtk
+          (lambda _
+            ; FIXME: Skip GTK tests:
+            ;   gtk3 - can't get it to run with the xorg-server config below
+            ;          and some non-gtk tests will also fail
+            ;   gtk2 - lots of functions aren't implemented
+            ; We choose gtk2 as the lesser evil and simply skip the test.
+            ; as of 01/09/2016 awesome is the only package dependent on lgi but
+            ; it doesn't need or interact with gtk using lgi.
+            (substitute* "./tests/test.lua"
+                       (("'gtk.lua',") "-- 'gtk.lua',"))))
+        (add-before 'check 'start-xserver-instance
+          (lambda* (#:key inputs #:allow-other-keys)
+            ;; There must be a running X server during tests.
+            (system (format #f "~a/bin/Xvfb :1 &"
+                            (assoc-ref inputs "xorg-server")))
+            (setenv "DISPLAY" ":1"))))
+       #:make-flags (list "CC=gcc"
+             (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+    (inputs
+     `(("gobject-introspection" ,gobject-introspection)
+       ("glib" ,glib)
+       ("pango", pango)
+       ("gtk", gtk+-2)
+       ("lua" ,lua)
+       ("cairo" ,cairo)
+       ("libffi" ,libffi)
+       ("xorg-server", xorg-server)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/pavouk/lgi/")
+    (synopsis "Lua bridge to GObject based libraries")
+    (description
+     "LGI is gobject-introspection based dynamic Lua binding to GObject
+based libraries.  It allows using GObject-based libraries directly from Lua.
+Notable examples are GTK+, GStreamer and Webkit.")
+    (license license:expat)))
-- 
2.9.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-awesome-Update-to-3.5.9.patch --]
[-- Type: text/x-patch, Size: 4774 bytes --]

From 60b06fd4bf04fc9b172cd2d557be9237ffc6fd46 Mon Sep 17 00:00:00 2001
From: doncatnip <gnopap@gmail.com>
Date: Fri, 2 Sep 2016 00:41:22 +0200
Subject: [PATCH 3/3] gnu: awesome: Update to 3.5.9.

* gnu/packages/wm.scm (awesome): Update to 3.5.9.
(awesome)[inputs]: Add gobject-introspection, lua-lgi, cairo. Use
latest available lua.
(awesome)[arguments]: Set lua search paths. Add cairo to
LD_LIBRARY_PATH. Wrap binary in respect to those paths plus
GI_TYPELIB_PATH.
---
 gnu/packages/wm.scm | 37 ++++++++++++++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 2cc9f44..ee67c6d 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -382,7 +383,7 @@ experience.")
 (define-public awesome
   (package
     (name "awesome")
-    (version "3.4.15")
+    (version "3.5.9")
     (source
      (origin (method url-fetch)
              (uri (string-append
@@ -390,7 +391,7 @@ experience.")
                    version ".tar.xz"))
              (sha256
               (base32
-               "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb"))
+               "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67"))
              (modules '((guix build utils)
                         (srfi srfi-19)))
              (snippet
@@ -413,7 +414,9 @@ experience.")
                      ("libxml2" ,libxml2)         ;for XML_CATALOG_FILES
                      ("pkg-config" ,pkg-config)
                      ("xmlto" ,xmlto)))
-    (inputs `(("cairo" ,cairo)
+    (inputs `(("gobject-introspection" ,gobject-introspection)
+              ("lua-lgi",lua-lgi)
+              ("cairo" ,cairo)
               ("dbus" ,dbus)
               ("gdk-pixbuf" ,gdk-pixbuf)
               ("glib" ,glib)
@@ -422,7 +425,7 @@ experience.")
               ("libxcb" ,libxcb)
               ("libxcursor" ,libxcursor)
               ("libxdg-basedir" ,libxdg-basedir)
-              ("lua" ,lua-5.1)
+              ("lua" ,lua)
               ("pango" ,pango)
               ("startup-notification" ,startup-notification)
               ("xcb-util" ,xcb-util)
@@ -445,11 +448,35 @@ experience.")
                         (("/xmlto")
                          (string-append "/xmlto --skip-validation")))
                       #t))
+                  (add-before 'configure 'set-lua-paths
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      ; needs to load cairo dynamically
+                      (let* ((cairo (string-append
+                                      (assoc-ref inputs "cairo") "/lib" ))
+                             (lua-lgi (assoc-ref inputs "lua-lgi") ))
+                        (setenv "LD_LIBRARY_PATH" cairo )
+                        (setenv "LUA_PATH" (string-append
+                                    lua-lgi "/share/lua/5.2/?.lua"))
+                        (setenv "LUA_CPATH" (string-append
+                                    lua-lgi "/lib/lua/5.2/?.so")))))
                   (replace 'check
                     (lambda _
                       ;; There aren't any tests, so just make sure the binary
                       ;; gets built and can be run successfully.
-                      (zero? (system* "../build/awesome" "-v")))))))
+                      (zero? (system* "../build/awesome" "-v"))))
+                  (add-after 'install 'wrap
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((awesome (assoc-ref outputs "out"))
+                             (cairo (string-append
+                                      (assoc-ref inputs "cairo") "/lib" ))
+                             (lua-lgi (assoc-ref inputs "lua-lgi") ))
+                        (wrap-program (string-append awesome "/bin/awesome")
+                          `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
+                          `("LD_LIBRARY_PATH" suffix (, cairo))
+                          `("LUA_PATH" suffix (,(string-append
+                                lua-lgi "/share/lua/5.2/?.lua")))
+                          `("LUA_CPATH" suffix (,(string-append
+                                lua-lgi "/lib/lua/5.2/?.so"))))))))))
     (synopsis "Highly configurable window manager")
     (description
      "awesome is a window manager for X.  It manages windows in different
-- 
2.9.3


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

* Re: [PATCH] gnu: awesome: Update to 3.5.9.
  2016-09-01 22:59 [PATCH] gnu: awesome: Update to 3.5.9 doncatnip
@ 2016-09-02 10:43 ` ng0
  2016-09-02 12:53   ` ng0
  2016-09-20 19:02 ` Leo Famulari
  1 sibling, 1 reply; 7+ messages in thread
From: ng0 @ 2016-09-02 10:43 UTC (permalink / raw)
  To: doncatnip, guix-devel@gnu.org

Hi,

Thanks for your patches.
It works, I'm currently using this patchset.

Some minor improvements can be made (comments style) which in my opinion
the person commiting your patch can apply.

awesome v3.5.9 (Mighty Ravendark)
• Build: Sun Mar 06 14:05:54Z 2016 for x86_64 by gcc version 4.9.3 (@)
• Compiled against Lua 5.2.4 (running with Lua 5.2)
• D-Bus support: ✔
   
doncatnip <gnopap@gmail.com> writes:

> Hey Guix !
>
> Let's try this again.
> From 99ac37565b7a4826c9ca3c9f0545825924effc3d Mon Sep 17 00:00:00 2001
> From: doncatnip <gnopap@gmail.com>
> Date: Thu, 1 Sep 2016 23:08:28 +0200
> Subject: [PATCH 1/3] gnu: lua: Remove conflicting flag, pass MYCFLAGS
>
> * gnu/packages/lua.scm (lua)[arguments]: Use MYCFLAGS instead of
> CFLAGS and remove conflicting -DLUA_USE_POSIX since -DLUA_USE_LINUX
> is passed implicitly for build target "linux".
> ---
>  gnu/packages/lua.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
> index 8bd67c5..9f19cc9 100644
> --- a/gnu/packages/lua.scm
> +++ b/gnu/packages/lua.scm
> @@ -51,7 +51,7 @@
>                    (srfi srfi-1))
>         #:test-target "test"
>         #:make-flags
> -       '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX"
> +       '("MYCFLAGS=-fPIC -DLUA_DL_DLOPEN"
>           "linux")
>         #:phases
>         (modify-phases %standard-phases
> -- 
> 2.9.3

Looks good to me.

> From 57a998f52e2d77e758ff339d03f26556b3b9c63f Mon Sep 17 00:00:00 2001
> From: doncatnip <gnopap@gmail.com>
> Date: Thu, 1 Sep 2016 23:53:32 +0200
> Subject: [PATCH 2/3] gnu: lua: Add lua-lgi.
>
> * gnu/packages/lua.scm (lua-lgi): New variable.
> ---
>  gnu/packages/lua.scm | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 76 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
> index 9f19cc9..cdc28b0 100644
> --- a/gnu/packages/lua.scm
> +++ b/gnu/packages/lua.scm
> @@ -5,6 +5,7 @@
>  ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>  ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -29,7 +30,12 @@
>    #:use-module (gnu packages)
>    #:use-module (gnu packages readline)
>    #:use-module (gnu packages tls)
> -  #:use-module (gnu packages xml))
> +  #:use-module (gnu packages xml)
> +  #:use-module (gnu packages glib)
> +  #:use-module (gnu packages libffi)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages xorg)
> +  #:use-module (gnu packages gtk))
>  
>  (define-public lua
>    (package
> @@ -259,3 +265,72 @@ directory structure and file attributes.")
>  communication.  It takes an already established TCP connection and creates a
>  secure session between the peers.")
>      (license (package-license lua-5.1))))
> +
> +(define-public lua-lgi
> +  (package
> +    (name "lua-lgi")
> +    (version "0.9.1")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (string-append
> +              "https://github.com/pavouk/lgi/archive/"
> +              version ".tar.gz"))
> +        (file-name (string-append name "-" version ".tar.gz"))
> +        (sha256
> +          (base32
> +            "1fmgdl5y4ph3yc6ycg865s3vai1rjkyda61cgqxk6zd13hmznw0c"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:phases
> +      (modify-phases %standard-phases
> +        (delete 'configure) ; no configure script
> +        (add-before 'build 'set-env
> +          (lambda* (#:key inputs #:allow-other-keys)
> +            ; we need to load cairo dynamically

I think you can find more info about this either in the Guile
documentation or by looking at other packages or in the GNU Coding
Standards (I'm not sure where in those 3):
For one line comments you should use ";;", for comments which are
appended in the same line as some code you should use ";".
This would become:

;; We need to load cairo dynamically

> +            (let* ((cairo (string-append
> +                            (assoc-ref inputs "cairo") "/lib" )))

I'm not sure about the correction here, I think it should be:

(let
  ((cairo (string-append (assoc-ref inputs "cairo") "/lib")))

As you only use it in the small setenv, what about...

> +              (setenv "LD_LIBRARY_PATH" cairo ))))

(add-before 'build 'set-env
  (lambda* (#:key inputs #:allow-other-keys)
    ;; We need to load cairo dynamically
    (setenv "LD_LIBRARY_PATH" (string-append (assoc-ref inputs "cairo") "/lib"))))

Of course it's up to you, and what I suggested could contain an error
too. The only thing which really needs to be fixed is the comment ; -> ;;

> +        (add-before 'build 'set-lua-version
> +          (lambda _
> +            ; lua version and therefore install directories are hardcoded
> +            ; FIXME: This breaks when we update lua to >=5.3

Same as above, ; -> ;;

> +            (substitute* "./lgi/Makefile"
> +                       (("LUA_VERSION=5.1") "LUA_VERSION=5.2"))))
> +        (add-before 'check 'skip-test-gtk
> +          (lambda _
> +            ; FIXME: Skip GTK tests:
> +            ;   gtk3 - can't get it to run with the xorg-server config below
> +            ;          and some non-gtk tests will also fail
> +            ;   gtk2 - lots of functions aren't implemented
> +            ; We choose gtk2 as the lesser evil and simply skip the test.
> +            ; as of 01/09/2016 awesome is the only package dependent on lgi but
> +            ; it doesn't need or interact with gtk using lgi.
> +            (substitute* "./tests/test.lua"
> +                       (("'gtk.lua',") "-- 'gtk.lua',"))))
> +        (add-before 'check 'start-xserver-instance
> +          (lambda* (#:key inputs #:allow-other-keys)
> +            ;; There must be a running X server during tests.
> +            (system (format #f "~a/bin/Xvfb :1 &"
> +                            (assoc-ref inputs "xorg-server")))
> +            (setenv "DISPLAY" ":1"))))
> +       #:make-flags (list "CC=gcc"
> +             (string-append "PREFIX=" (assoc-ref %outputs "out")))))
> +    (inputs
> +     `(("gobject-introspection" ,gobject-introspection)
> +       ("glib" ,glib)
> +       ("pango", pango)
> +       ("gtk", gtk+-2)
> +       ("lua" ,lua)
> +       ("cairo" ,cairo)
> +       ("libffi" ,libffi)
> +       ("xorg-server", xorg-server)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (home-page "https://github.com/pavouk/lgi/")
> +    (synopsis "Lua bridge to GObject based libraries")
> +    (description
> +     "LGI is gobject-introspection based dynamic Lua binding to GObject
> +based libraries.  It allows using GObject-based libraries directly from Lua.
> +Notable examples are GTK+, GStreamer and Webkit.")
> +    (license license:expat)))
> -- 
> 2.9.3

Otherwise looks good to me, the only "problem" is stylistic, which is
the way comments are made.

> From 60b06fd4bf04fc9b172cd2d557be9237ffc6fd46 Mon Sep 17 00:00:00 2001
> From: doncatnip <gnopap@gmail.com>
> Date: Fri, 2 Sep 2016 00:41:22 +0200
> Subject: [PATCH 3/3] gnu: awesome: Update to 3.5.9.
>
> * gnu/packages/wm.scm (awesome): Update to 3.5.9.
> (awesome)[inputs]: Add gobject-introspection, lua-lgi, cairo. Use
> latest available lua.
> (awesome)[arguments]: Set lua search paths. Add cairo to
> LD_LIBRARY_PATH. Wrap binary in respect to those paths plus
> GI_TYPELIB_PATH.
> ---
>  gnu/packages/wm.scm | 37 ++++++++++++++++++++++++++++++++-----
>  1 file changed, 32 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 2cc9f44..ee67c6d 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -9,6 +9,7 @@
>  ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
>  ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
>  ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
> +;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -382,7 +383,7 @@ experience.")
>  (define-public awesome
>    (package
>      (name "awesome")
> -    (version "3.4.15")
> +    (version "3.5.9")
>      (source
>       (origin (method url-fetch)
>               (uri (string-append
> @@ -390,7 +391,7 @@ experience.")
>                     version ".tar.xz"))
>               (sha256
>                (base32
> -               "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb"))
> +               "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67"))
>               (modules '((guix build utils)
>                          (srfi srfi-19)))
>               (snippet
> @@ -413,7 +414,9 @@ experience.")
>                       ("libxml2" ,libxml2)         ;for XML_CATALOG_FILES
>                       ("pkg-config" ,pkg-config)
>                       ("xmlto" ,xmlto)))
> -    (inputs `(("cairo" ,cairo)
> +    (inputs `(("gobject-introspection" ,gobject-introspection)
> +              ("lua-lgi",lua-lgi)
> +              ("cairo" ,cairo)
>                ("dbus" ,dbus)
>                ("gdk-pixbuf" ,gdk-pixbuf)
>                ("glib" ,glib)
> @@ -422,7 +425,7 @@ experience.")
>                ("libxcb" ,libxcb)
>                ("libxcursor" ,libxcursor)
>                ("libxdg-basedir" ,libxdg-basedir)
> -              ("lua" ,lua-5.1)
> +              ("lua" ,lua)
>                ("pango" ,pango)
>                ("startup-notification" ,startup-notification)
>                ("xcb-util" ,xcb-util)
> @@ -445,11 +448,35 @@ experience.")
>                          (("/xmlto")
>                           (string-append "/xmlto --skip-validation")))
>                        #t))
> +                  (add-before 'configure 'set-lua-paths
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      ; needs to load cairo dynamically

Same as above.

> +                      (let* ((cairo (string-append
> +                                      (assoc-ref inputs "cairo") "/lib" ))
> +                             (lua-lgi (assoc-ref inputs "lua-lgi") ))
> +                        (setenv "LD_LIBRARY_PATH" cairo )
> +                        (setenv "LUA_PATH" (string-append
> +                                    lua-lgi "/share/lua/5.2/?.lua"))
> +                        (setenv "LUA_CPATH" (string-append
> +                                    lua-lgi "/lib/lua/5.2/?.so")))))
>                    (replace 'check
>                      (lambda _
>                        ;; There aren't any tests, so just make sure the binary
>                        ;; gets built and can be run successfully.
> -                      (zero? (system* "../build/awesome" "-v")))))))
> +                      (zero? (system* "../build/awesome" "-v"))))
> +                  (add-after 'install 'wrap
> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
> +                      (let* ((awesome (assoc-ref outputs "out"))
> +                             (cairo (string-append
> +                                      (assoc-ref inputs "cairo") "/lib" ))
> +                             (lua-lgi (assoc-ref inputs "lua-lgi") ))
> +                        (wrap-program (string-append awesome "/bin/awesome")
> +                          `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
> +                          `("LD_LIBRARY_PATH" suffix (, cairo))
> +                          `("LUA_PATH" suffix (,(string-append
> +                                lua-lgi "/share/lua/5.2/?.lua")))
> +                          `("LUA_CPATH" suffix (,(string-append
> +                                lua-lgi "/lib/lua/5.2/?.so"))))))))))
>      (synopsis "Highly configurable window manager")
>      (description
>       "awesome is a window manager for X.  It manages windows in different
> -- 
> 2.9.3
>

Looks good to me.
-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: awesome: Update to 3.5.9.
  2016-09-02 10:43 ` ng0
@ 2016-09-02 12:53   ` ng0
  2016-09-02 17:33     ` gno
  0 siblings, 1 reply; 7+ messages in thread
From: ng0 @ 2016-09-02 12:53 UTC (permalink / raw)
  To: doncatnip, guix-devel@gnu.org

For some reason xrandr started to kill awesome (X11) session when I
apply my layout now. I checked with arandr and also with --dryrun if my
layout is the problem, but there's nothing faulty.
Maybe there are changes which can't just be installed in my user profile
and need to in system.

Overall, it works and looks good to me.
-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: awesome: Update to 3.5.9.
  2016-09-02 12:53   ` ng0
@ 2016-09-02 17:33     ` gno
  2016-09-02 22:18       ` ng0
  0 siblings, 1 reply; 7+ messages in thread
From: gno @ 2016-09-02 17:33 UTC (permalink / raw)
  To: ng0, guix-devel@gnu.org

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

On 9/2/2016 2:53 PM, ng0 wrote:

> For some reason xrandr started to kill awesome (X11) session when I
> apply my layout now. I checked with arandr and also with --dryrun if my
> layout is the problem, but there's nothing faulty.
> Maybe there are changes which can't just be installed in my user profile
> and need to in system.

Hmm, that's not good. No errors or other logs ?

Also, since I yet again didn't include the list in my previous response:

On 9/2/2016 12:43 PM, ng0 wrote:

> Hi,
> Thanks for your patches.
> It works, I'm currently using this patchset.
> Some minor improvements can be made (comments style) which in my opinion
> the person commiting your patch can apply.

Please, I'd appreciate any hints as to how I could improve my comment
style. Don't hold back

Thanks for testing.


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

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

* Re: [PATCH] gnu: awesome: Update to 3.5.9.
  2016-09-02 17:33     ` gno
@ 2016-09-02 22:18       ` ng0
  2016-09-04 13:00         ` ng0
  0 siblings, 1 reply; 7+ messages in thread
From: ng0 @ 2016-09-02 22:18 UTC (permalink / raw)
  To: gno, guix-devel@gnu.org

gno <gnopap@gmail.com> writes:

> On 9/2/2016 2:53 PM, ng0 wrote:
>
>> For some reason xrandr started to kill awesome (X11) session when I
>> apply my layout now. I checked with arandr and also with --dryrun if my
>> layout is the problem, but there's nothing faulty.
>> Maybe there are changes which can't just be installed in my user profile
>> and need to in system.
>
> Hmm, that's not good. No errors or other logs ?

Could be unrelated. Could be because I did not launch it in a vm but in
my actual live system. This is not a criteria to reject patches, if
anything this is a bug on my end, and if it's a bug in the package, it
is unlikely you introduced it (I would even say impossible, looking at
the patches), there's nothing which could cause this.

> Also, since I yet again didn't include the list in my previous response:
>
> On 9/2/2016 12:43 PM, ng0 wrote:
>
>> Hi,
>> Thanks for your patches.
>> It works, I'm currently using this patchset.
>> Some minor improvements can be made (comments style) which in my opinion
>> the person commiting your patch can apply.
>
> Please, I'd appreciate any hints as to how I could improve my comment
> style. Don't hold back
>
> Thanks for testing.
>

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: awesome: Update to 3.5.9.
  2016-09-02 22:18       ` ng0
@ 2016-09-04 13:00         ` ng0
  0 siblings, 0 replies; 7+ messages in thread
From: ng0 @ 2016-09-04 13:00 UTC (permalink / raw)
  To: gno, guix-devel@gnu.org

Hi,

you possibly need to rebase the patch which adds awesome, I shortened
the description of the package in master:
https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00317.html

I have not tested your patch after this, just a reminder that this was
changed recently.

ng0 <ng0@we.make.ritual.n0.is> writes:

> gno <gnopap@gmail.com> writes:
>
>> On 9/2/2016 2:53 PM, ng0 wrote:
>>
>>> For some reason xrandr started to kill awesome (X11) session when I
>>> apply my layout now. I checked with arandr and also with --dryrun if my
>>> layout is the problem, but there's nothing faulty.
>>> Maybe there are changes which can't just be installed in my user profile
>>> and need to in system.
>>
>> Hmm, that's not good. No errors or other logs ?
>
> Could be unrelated. Could be because I did not launch it in a vm but in
> my actual live system. This is not a criteria to reject patches, if
> anything this is a bug on my end, and if it's a bug in the package, it
> is unlikely you introduced it (I would even say impossible, looking at
> the patches), there's nothing which could cause this.
>
>> Also, since I yet again didn't include the list in my previous response:
>>
>> On 9/2/2016 12:43 PM, ng0 wrote:
>>
>>> Hi,
>>> Thanks for your patches.
>>> It works, I'm currently using this patchset.
>>> Some minor improvements can be made (comments style) which in my opinion
>>> the person commiting your patch can apply.
>>
>> Please, I'd appreciate any hints as to how I could improve my comment
>> style. Don't hold back
>>
>> Thanks for testing.
>>
>
> -- 
> ng0
> For non-prism friendly talk find me on http://www.psyced.org
>

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: awesome: Update to 3.5.9.
  2016-09-01 22:59 [PATCH] gnu: awesome: Update to 3.5.9 doncatnip
  2016-09-02 10:43 ` ng0
@ 2016-09-20 19:02 ` Leo Famulari
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-09-20 19:02 UTC (permalink / raw)
  To: doncatnip; +Cc: guix-devel@gnu.org

On Fri, Sep 02, 2016 at 12:59:53AM +0200, doncatnip wrote:
> Hey Guix !
> 
> Let's try this again.

Okay!

> Subject: [PATCH 1/3] gnu: lua: Remove conflicting flag, pass MYCFLAGS
> 
> * gnu/packages/lua.scm (lua)[arguments]: Use MYCFLAGS instead of
> CFLAGS and remove conflicting -DLUA_USE_POSIX since -DLUA_USE_LINUX
> is passed implicitly for build target "linux".

I made the commit title into a complete sentence and pushed.

> Subject: [PATCH 2/3] gnu: lua: Add lua-lgi.
> 
> * gnu/packages/lua.scm (lua-lgi): New variable.

I took ng0's advice about the comment styles:

https://www.gnu.org/software/guile/manual/html_node/Comments.html

I also made the phases 'set-env', 'set-lua-version', 'skip-test-gtk',
and 'start-xserver-instance' return #t. We want successful phases to
return #t, but things like setenv and substitute* do not specify a
return value, so we explicity return #t.

I moved #:make-flags to the top of the arguments block, which kept
it shorter than 80 columns. And I corrected the indentation of
#:phases by one column.

Pushed!

> Subject: [PATCH 3/3] gnu: awesome: Update to 3.5.9.
> 
> * gnu/packages/wm.scm (awesome): Update to 3.5.9.
> (awesome)[inputs]: Add gobject-introspection, lua-lgi, cairo. Use
> latest available lua.
> (awesome)[arguments]: Set lua search paths. Add cairo to
> LD_LIBRARY_PATH. Wrap binary in respect to those paths plus
> GI_TYPELIB_PATH.

The commit message only needs to refer to the (awesome) variable once in
this case.  Referring to the fields [inputs] and [arguments] later does
not require the variable to be mentioned again. Fixed before pushing.

I sorted the new inputs alphabetically, since the pre-existing inputs
were already sorted. I made the comment about loading Cairo dynamically
into a complete sentence. I made the phase 'set-lua-paths' return #t.

Finally, since the new 'wrap' phase had a too-long line that was ugly to
break up, I shifted the indentation of #:phases down one line and to the
left, giving some more room to breathe on the right.

Pushed as 22037a327a0340341df7ae71a9c1d3551c28c705 !

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

end of thread, other threads:[~2016-09-20 19:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01 22:59 [PATCH] gnu: awesome: Update to 3.5.9 doncatnip
2016-09-02 10:43 ` ng0
2016-09-02 12:53   ` ng0
2016-09-02 17:33     ` gno
2016-09-02 22:18       ` ng0
2016-09-04 13:00         ` ng0
2016-09-20 19:02 ` Leo Famulari

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.