gnu: lua-lgi: Use current lua package.
* gnu/packages/lua.scm (make-lua-lgi): New function. (lua-lgi): (lua5.1-lgi): (lua5.2-lgi): New variables. * gnu/packages/wm.scm (awesome)[arguments]: Update LUA_PATH and LUA_CPATH.
This commit is contained in:
parent
232f344f9b
commit
1c58aa6f0d
2 changed files with 48 additions and 37 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
|
;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
|
||||||
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
|
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
|
||||||
|
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
|
@ -338,9 +339,9 @@ secure session between the peers.")
|
||||||
(define-public lua5.2-sec
|
(define-public lua5.2-sec
|
||||||
(make-lua-sec "lua5.2-sec" lua-5.2))
|
(make-lua-sec "lua5.2-sec" lua-5.2))
|
||||||
|
|
||||||
(define-public lua-lgi
|
(define (make-lua-lgi name lua)
|
||||||
(package
|
(package
|
||||||
(name "lua-lgi")
|
(name name)
|
||||||
(version "0.9.2")
|
(version "0.9.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
|
|
@ -350,28 +351,29 @@ secure session between the peers.")
|
||||||
(commit version)))
|
(commit version)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32 "03rbydnj411xpjvwsyvhwy4plm96481d7jax544mvk7apd8sd5jj"))))
|
||||||
"03rbydnj411xpjvwsyvhwy4plm96481d7jax544mvk7apd8sd5jj"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:make-flags (list "CC=gcc"
|
`(#:make-flags
|
||||||
|
(list "CC=gcc"
|
||||||
(string-append "PREFIX=" (assoc-ref %outputs "out")))
|
(string-append "PREFIX=" (assoc-ref %outputs "out")))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(delete 'configure) ; no configure script
|
(delete 'configure) ; no configure script
|
||||||
(add-before 'build 'set-env
|
(add-before 'build 'set-env
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; we need to load cairo dynamically
|
;; We need to load cairo dynamically.
|
||||||
(let* ((cairo (string-append
|
(let* ((cairo (string-append (assoc-ref inputs "cairo") "/lib")))
|
||||||
(assoc-ref inputs "cairo") "/lib" )))
|
|
||||||
(setenv "LD_LIBRARY_PATH" cairo)
|
(setenv "LD_LIBRARY_PATH" cairo)
|
||||||
#t)))
|
#t)))
|
||||||
(add-before 'build 'set-lua-version
|
(add-before 'build 'set-lua-version
|
||||||
(lambda _
|
(lambda _
|
||||||
;; lua version and therefore install directories are hardcoded
|
;; Lua version and therefore install directories are hardcoded.
|
||||||
;; FIXME: This breaks when we update lua to >=5.3
|
|
||||||
(substitute* "./lgi/Makefile"
|
(substitute* "./lgi/Makefile"
|
||||||
(("LUA_VERSION=5.1") "LUA_VERSION=5.2"))
|
(("LUA_VERSION=5.1")
|
||||||
|
(format #f
|
||||||
|
"LUA_VERSION=~a"
|
||||||
|
,(version-major+minor (package-version lua)))))
|
||||||
#t))
|
#t))
|
||||||
(add-before 'check 'skip-test-gtk
|
(add-before 'check 'skip-test-gtk
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
@ -392,26 +394,35 @@ secure session between the peers.")
|
||||||
(assoc-ref inputs "xorg-server")))
|
(assoc-ref inputs "xorg-server")))
|
||||||
(setenv "DISPLAY" ":1")
|
(setenv "DISPLAY" ":1")
|
||||||
#t)))))
|
#t)))))
|
||||||
(inputs
|
|
||||||
`(("gobject-introspection" ,gobject-introspection)
|
|
||||||
("glib" ,glib)
|
|
||||||
("pango" ,pango)
|
|
||||||
("gtk" ,gtk+-2)
|
|
||||||
("lua" ,lua)
|
|
||||||
("cairo" ,cairo)
|
|
||||||
("libffi" ,libffi)
|
|
||||||
("xorg-server" ,xorg-server)))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)
|
`(("dbus" ,dbus) ;tests use 'dbus-run-session'
|
||||||
("dbus" ,dbus))) ;tests use 'dbus-run-session'
|
("pkg-config" ,pkg-config)))
|
||||||
|
(inputs
|
||||||
|
`(("cairo" ,cairo)
|
||||||
|
("glib" ,glib)
|
||||||
|
("gobject-introspection" ,gobject-introspection)
|
||||||
|
("gtk" ,gtk+-2)
|
||||||
|
("libffi" ,libffi)
|
||||||
|
("lua" ,lua)
|
||||||
|
("pango" ,pango)
|
||||||
|
("xorg-server" ,xorg-server)))
|
||||||
(home-page "https://github.com/pavouk/lgi/")
|
(home-page "https://github.com/pavouk/lgi/")
|
||||||
(synopsis "Lua bridge to GObject based libraries")
|
(synopsis "Lua bridge to GObject based libraries")
|
||||||
(description
|
(description
|
||||||
"LGI is gobject-introspection based dynamic Lua binding to GObject
|
"LGI is gobject-introspection based dynamic Lua binding to GObject based
|
||||||
based libraries. It allows using GObject-based libraries directly from Lua.
|
libraries. It allows using GObject-based libraries directly from Lua.
|
||||||
Notable examples are GTK+, GStreamer and Webkit.")
|
Notable examples are GTK+, GStreamer and Webkit.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public lua-lgi
|
||||||
|
(make-lua-lgi "lua-lgi" lua))
|
||||||
|
|
||||||
|
(define-public lua5.1-lgi
|
||||||
|
(make-lua-lgi "lua5.1-lgi" lua-5.1))
|
||||||
|
|
||||||
|
(define-public lua5.2-lgi
|
||||||
|
(make-lua-lgi "lua5.2-lgi" lua-5.2))
|
||||||
|
|
||||||
(define (make-lua-lpeg name lua)
|
(define (make-lua-lpeg name lua)
|
||||||
(package
|
(package
|
||||||
(name name)
|
(name name)
|
||||||
|
|
|
||||||
|
|
@ -948,9 +948,9 @@ experience.")
|
||||||
(lua-lgi (assoc-ref inputs "lua-lgi") ))
|
(lua-lgi (assoc-ref inputs "lua-lgi") ))
|
||||||
(setenv "LD_LIBRARY_PATH" cairo )
|
(setenv "LD_LIBRARY_PATH" cairo )
|
||||||
(setenv "LUA_PATH" (string-append lua-lgi
|
(setenv "LUA_PATH" (string-append lua-lgi
|
||||||
"/share/lua/5.2/?.lua"))
|
"/share/lua/5.3/?.lua"))
|
||||||
(setenv "LUA_CPATH" (string-append lua-lgi
|
(setenv "LUA_CPATH" (string-append lua-lgi
|
||||||
"/lib/lua/5.2/?.so"))
|
"/lib/lua/5.3/?.so"))
|
||||||
#t)))
|
#t)))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
@ -974,9 +974,9 @@ experience.")
|
||||||
`("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
|
`("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
|
||||||
`("LD_LIBRARY_PATH" suffix (, cairo))
|
`("LD_LIBRARY_PATH" suffix (, cairo))
|
||||||
`("LUA_PATH" suffix (,(string-append lua-lgi
|
`("LUA_PATH" suffix (,(string-append lua-lgi
|
||||||
"/share/lua/5.2/?.lua")))
|
"/share/lua/5.3/?.lua")))
|
||||||
`("LUA_CPATH" suffix (,(string-append
|
`("LUA_CPATH" suffix (,(string-append
|
||||||
lua-lgi "/lib/lua/5.2/?.so"))))))))))
|
lua-lgi "/lib/lua/5.3/?.so"))))))))))
|
||||||
(synopsis "Highly configurable window manager")
|
(synopsis "Highly configurable window manager")
|
||||||
(description
|
(description
|
||||||
"Awesome has been designed as a framework window manager. It is fast, small,
|
"Awesome has been designed as a framework window manager. It is fast, small,
|
||||||
|
|
|
||||||
Reference in a new issue