From f75ac65b1eeafe333b486a98cc0bb4ad55d67ee7 Mon Sep 17 00:00:00 2001 From: doncatnip Date: Thu, 25 Aug 2016 02:31:07 +0200 Subject: [PATCH 3/3] gnu: wm: Add awesome-3.5. * gnu/packages/wm.scm (awesome-3.5): New variable. --- gnu/packages/wm.scm | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 2cc9f44..ff21da8 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2016 Al McElrath ;;; Copyright © 2016 Carlo Zancanaro ;;; Copyright © 2016 Ludovic Courtès +;;; Copyright © 2016 doncatnip ;;; ;;; This file is part of GNU Guix. ;;; @@ -465,3 +466,91 @@ Windows are grouped by tags in awesome. Each window can be tagged with one or more tags. Selecting certain tags displays all windows with these tags.") (license license:gpl2+) (home-page "https://awesome.naquadah.org/"))) + +(define-public awesome-3.5 + (package (inherit awesome) + (version "3.5.9") + (source (origin + (method url-fetch) + (uri (string-append + "https://awesome.naquadah.org/download/awesome-" + version ".tar.xz")) + (sha256 (base32 "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67")) + (modules '((guix build utils) + (srfi srfi-19))) + (snippet + ;; Remove non-reproducible timestamp and use the date of the + ;; source file instead. + '(substitute* "common/version.c" + (("__DATE__ \" \" __TIME__") + (date->string + (time-utc->date + (make-time time-utc 0 + (stat:mtime (stat "awesome.c")))) + "\"~c\"")))) + (patches (search-patches "awesome-reproducible-png.patch")))) + + (inputs `(("gobject-introspection" ,gobject-introspection) + ("lua-lgi",lua-lgi) + ("cairo" ,cairo) + ("dbus" ,dbus) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("imlib2" ,imlib2) + ("libev" ,libev) + ("libxcb" ,libxcb) + ("libxcursor" ,libxcursor) + ("libxdg-basedir" ,libxdg-basedir) + ("lua" ,lua) + ("pango" ,pango) + ("startup-notification" ,startup-notification) + ("xcb-util" ,xcb-util) + ("xcb-util-cursor" ,xcb-util-cursor) + ("xcb-util-image" ,xcb-util-image) + ("xcb-util-keysyms" ,xcb-util-keysyms) + ("xcb-util-renderutil" ,xcb-util-renderutil) + ("xcb-util-wm" ,xcb-util-wm))) + + (arguments + `(;; Let compression happen in our 'compress-documentation' phase so that + ;; '--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)) + (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")))) + (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")))))))))))) -- 2.9.3