diff options
| author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-02-07 01:34:11 +0100 |
|---|---|---|
| committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-02-08 00:16:03 +0100 |
| commit | 1c58aa6f0ddc0e1811633ecbabc1a02b01edc04b (patch) | |
| tree | f90d7de76d38b72f4147fb3a179e31b0267cf9d0 /gnu/packages/lua.scm | |
| parent | 232f344f9b9dc775fe8f9c7db2e45ba20431b071 (diff) | |
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.
Diffstat (limited to 'gnu/packages/lua.scm')
| -rw-r--r-- | gnu/packages/lua.scm | 69 |
1 files changed, 40 insertions, 29 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index a69291ec8a1..bd0d58a559c 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | ;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org> | 10 | ;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org> |
| 11 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> | 11 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
| 12 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> | 12 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> |
| 13 | ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> | ||
| 13 | ;;; | 14 | ;;; |
| 14 | ;;; This file is part of GNU Guix. | 15 | ;;; This file is part of GNU Guix. |
| 15 | ;;; | 16 | ;;; |
| @@ -338,40 +339,41 @@ secure session between the peers.") | |||
| 338 | (define-public lua5.2-sec | 339 | (define-public lua5.2-sec |
| 339 | (make-lua-sec "lua5.2-sec" lua-5.2)) | 340 | (make-lua-sec "lua5.2-sec" lua-5.2)) |
| 340 | 341 | ||
| 341 | (define-public lua-lgi | 342 | (define (make-lua-lgi name lua) |
| 342 | (package | 343 | (package |
| 343 | (name "lua-lgi") | 344 | (name name) |
| 344 | (version "0.9.2") | 345 | (version "0.9.2") |
| 345 | (source | 346 | (source |
| 346 | (origin | 347 | (origin |
| 347 | (method git-fetch) | 348 | (method git-fetch) |
| 348 | (uri (git-reference | 349 | (uri (git-reference |
| 349 | (url "https://github.com/pavouk/lgi") | 350 | (url "https://github.com/pavouk/lgi") |
| 350 | (commit version))) | 351 | (commit version))) |
| 351 | (file-name (git-file-name name version)) | 352 | (file-name (git-file-name name version)) |
| 352 | (sha256 | 353 | (sha256 |
| 353 | (base32 | 354 | (base32 "03rbydnj411xpjvwsyvhwy4plm96481d7jax544mvk7apd8sd5jj")))) |
| 354 | "03rbydnj411xpjvwsyvhwy4plm96481d7jax544mvk7apd8sd5jj")))) | ||
| 355 | (build-system gnu-build-system) | 355 | (build-system gnu-build-system) |
| 356 | (arguments | 356 | (arguments |
| 357 | '(#:make-flags (list "CC=gcc" | 357 | `(#:make-flags |
| 358 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | 358 | (list "CC=gcc" |
| 359 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | ||
| 359 | #:phases | 360 | #:phases |
| 360 | (modify-phases %standard-phases | 361 | (modify-phases %standard-phases |
| 361 | (delete 'configure) ; no configure script | 362 | (delete 'configure) ; no configure script |
| 362 | (add-before 'build 'set-env | 363 | (add-before 'build 'set-env |
| 363 | (lambda* (#:key inputs #:allow-other-keys) | 364 | (lambda* (#:key inputs #:allow-other-keys) |
| 364 | ;; we need to load cairo dynamically | 365 | ;; We need to load cairo dynamically. |
| 365 | (let* ((cairo (string-append | 366 | (let* ((cairo (string-append (assoc-ref inputs "cairo") "/lib"))) |
| 366 | (assoc-ref inputs "cairo") "/lib" ))) | ||
| 367 | (setenv "LD_LIBRARY_PATH" cairo) | 367 | (setenv "LD_LIBRARY_PATH" cairo) |
| 368 | #t))) | 368 | #t))) |
| 369 | (add-before 'build 'set-lua-version | 369 | (add-before 'build 'set-lua-version |
| 370 | (lambda _ | 370 | (lambda _ |
| 371 | ;; lua version and therefore install directories are hardcoded | 371 | ;; Lua version and therefore install directories are hardcoded. |
| 372 | ;; FIXME: This breaks when we update lua to >=5.3 | ||
| 373 | (substitute* "./lgi/Makefile" | 372 | (substitute* "./lgi/Makefile" |
| 374 | (("LUA_VERSION=5.1") "LUA_VERSION=5.2")) | 373 | (("LUA_VERSION=5.1") |
| 374 | (format #f | ||
| 375 | "LUA_VERSION=~a" | ||
| 376 | ,(version-major+minor (package-version lua))))) | ||
| 375 | #t)) | 377 | #t)) |
| 376 | (add-before 'check 'skip-test-gtk | 378 | (add-before 'check 'skip-test-gtk |
| 377 | (lambda _ | 379 | (lambda _ |
| @@ -392,26 +394,35 @@ secure session between the peers.") | |||
| 392 | (assoc-ref inputs "xorg-server"))) | 394 | (assoc-ref inputs "xorg-server"))) |
| 393 | (setenv "DISPLAY" ":1") | 395 | (setenv "DISPLAY" ":1") |
| 394 | #t))))) | 396 | #t))))) |
| 397 | (native-inputs | ||
| 398 | `(("dbus" ,dbus) ;tests use 'dbus-run-session' | ||
| 399 | ("pkg-config" ,pkg-config))) | ||
| 395 | (inputs | 400 | (inputs |
| 396 | `(("gobject-introspection" ,gobject-introspection) | 401 | `(("cairo" ,cairo) |
| 397 | ("glib" ,glib) | 402 | ("glib" ,glib) |
| 398 | ("pango" ,pango) | 403 | ("gobject-introspection" ,gobject-introspection) |
| 399 | ("gtk" ,gtk+-2) | 404 | ("gtk" ,gtk+-2) |
| 400 | ("lua" ,lua) | ||
| 401 | ("cairo" ,cairo) | ||
| 402 | ("libffi" ,libffi) | 405 | ("libffi" ,libffi) |
| 406 | ("lua" ,lua) | ||
| 407 | ("pango" ,pango) | ||
| 403 | ("xorg-server" ,xorg-server))) | 408 | ("xorg-server" ,xorg-server))) |
| 404 | (native-inputs | ||
| 405 | `(("pkg-config" ,pkg-config) | ||
| 406 | ("dbus" ,dbus))) ;tests use 'dbus-run-session' | ||
| 407 | (home-page "https://github.com/pavouk/lgi/") | 409 | (home-page "https://github.com/pavouk/lgi/") |
| 408 | (synopsis "Lua bridge to GObject based libraries") | 410 | (synopsis "Lua bridge to GObject based libraries") |
| 409 | (description | 411 | (description |
| 410 | "LGI is gobject-introspection based dynamic Lua binding to GObject | 412 | "LGI is gobject-introspection based dynamic Lua binding to GObject based |
| 411 | based libraries. It allows using GObject-based libraries directly from Lua. | 413 | libraries. It allows using GObject-based libraries directly from Lua. |
| 412 | Notable examples are GTK+, GStreamer and Webkit.") | 414 | Notable examples are GTK+, GStreamer and Webkit.") |
| 413 | (license license:expat))) | 415 | (license license:expat))) |
| 414 | 416 | ||
| 417 | (define-public lua-lgi | ||
| 418 | (make-lua-lgi "lua-lgi" lua)) | ||
| 419 | |||
| 420 | (define-public lua5.1-lgi | ||
| 421 | (make-lua-lgi "lua5.1-lgi" lua-5.1)) | ||
| 422 | |||
| 423 | (define-public lua5.2-lgi | ||
| 424 | (make-lua-lgi "lua5.2-lgi" lua-5.2)) | ||
| 425 | |||
| 415 | (define (make-lua-lpeg name lua) | 426 | (define (make-lua-lpeg name lua) |
| 416 | (package | 427 | (package |
| 417 | (name name) | 428 | (name name) |
