summary refs log tree commit diff
path: root/gnu/packages/wm.scm
diff options
context:
space:
mode:
authordoncatnip <gnopap@gmail.com>2016-09-20 14:02:53 -0400
committerLeo Famulari <leo@famulari.name>2016-09-20 14:58:33 -0400
commit22037a327a0340341df7ae71a9c1d3551c28c705 (patch)
tree3ac774c500f8765dc1b18c247a3ba2629aeac8e1 /gnu/packages/wm.scm
parent03d8505f144a8e35c39f9e634d9aecf21326e5a7 (diff)
downloadguix-22037a327a0340341df7ae71a9c1d3551c28c705.tar.gz
gnu: awesome: Update to 3.5.9.
* gnu/packages/wm.scm (awesome): Update to 3.5.9.
[inputs]: Add gobject-introspection, lua-lgi, cairo. Use latest available lua.
[arguments]: Set lua search paths. Add cairo to LD_LIBRARY_PATH. Wrap binary in
respect to those paths plus GI_TYPELIB_PATH.
Diffstat (limited to 'gnu/packages/wm.scm')
-rw-r--r--gnu/packages/wm.scm63
1 files changed, 46 insertions, 17 deletions
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 6275e6fea0..710a93397f 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -383,7 +384,7 @@ experience.")
 (define-public awesome
   (package
     (name "awesome")
-    (version "3.4.15")
+    (version "3.5.9")
     (source
      (origin (method url-fetch)
              (uri (string-append
@@ -391,7 +392,7 @@ experience.")
                    version ".tar.xz"))
              (sha256
               (base32
-               "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb"))
+               "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67"))
              (modules '((guix build utils)
                         (srfi srfi-19)))
              (snippet
@@ -418,12 +419,14 @@ experience.")
               ("dbus" ,dbus)
               ("gdk-pixbuf" ,gdk-pixbuf)
               ("glib" ,glib)
+              ("gobject-introspection" ,gobject-introspection)
               ("imlib2" ,imlib2)
               ("libev" ,libev)
               ("libxcb" ,libxcb)
               ("libxcursor" ,libxcursor)
               ("libxdg-basedir" ,libxdg-basedir)
-              ("lua" ,lua-5.1)
+              ("lua" ,lua)
+              ("lua-lgi",lua-lgi)
               ("pango" ,pango)
               ("startup-notification" ,startup-notification)
               ("xcb-util" ,xcb-util)
@@ -437,20 +440,46 @@ experience.")
        ;; '--no-name' is used, which removes timestamps from gzip output.
        #:configure-flags '("-DCOMPRESS_MANPAGES=off")
 
-       #:phases (modify-phases %standard-phases
-                  (add-before 'build 'xmlto-skip-validation
-                    (lambda _
-                      ;; We can't download the necessary schema, so so skip
-                      ;; validation and assume they're valid.
-                      (substitute* "../build/CMakeFiles/man.dir/build.make"
-                        (("/xmlto")
-                         (string-append "/xmlto --skip-validation")))
-                      #t))
-                  (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")))))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'xmlto-skip-validation
+           (lambda _
+             ;; We can't download the necessary schema, so so skip
+             ;; validation and assume they're valid.
+             (substitute* "../build/CMakeFiles/man.dir/build.make"
+               (("/xmlto")
+                (string-append "/xmlto --skip-validation")))
+             #t))
+         (add-before 'configure 'set-lua-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; The build process 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"))
+               #t)))
+         (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"))))
+         (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 has been designed as a framework window manager.  It is fast, small,