Archived
1
0
Fork 0

gnu: emilua: Update to 0.4.3.

* gnu/packages/lua.scm (emilua): Update to 0.4.3.
[source]: Remove recursive? and replace with inputs.
[arguments]: Update style, add patch phase, enable tests and enable some more
features.
[native-inputs]: Add gperf, gawk and xdd.
[inputs]: Add emilua-http and trial-protocol as origin is no longer recursive,
also add serd, sord, libcap and liburing.

Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
Valter Nazianzeno 2023-08-24 08:08:25 -03:00 committed by Christopher Baines
parent 07d43c66d5
commit 10bc07671e
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -19,6 +19,7 @@
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com> ;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la> ;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream> ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
;;; Copyright © 2023 Valter Nazianzeno <manipuladordedados@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -50,14 +51,18 @@
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages boost) #:use-module (gnu packages boost)
#:use-module (gnu packages build-tools) #:use-module (gnu packages build-tools)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib) #:use-module (gnu packages glib)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gtk) #:use-module (gnu packages gtk)
#:use-module (gnu packages libevent) #:use-module (gnu packages libevent)
#:use-module (gnu packages libffi) #:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages m4) #:use-module (gnu packages m4)
#:use-module (gnu packages ncurses) #:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print) #:use-module (gnu packages pretty-print)
#:use-module (gnu packages rdf)
#:use-module (gnu packages re2c) #:use-module (gnu packages re2c)
#:use-module (gnu packages readline) #:use-module (gnu packages readline)
#:use-module (gnu packages tls) #:use-module (gnu packages tls)
@ -1129,63 +1134,101 @@ shell command executions.")
(define-public emilua (define-public emilua
(package (package
(name "emilua") (name "emilua")
(version "0.3.2") (version "0.4.3")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://gitlab.com/emilua/emilua.git") (url "https://gitlab.com/emilua/emilua.git")
(commit (string-append "v" version)) (commit (string-append "v" version))))
;; Current version requires Trial.Protocol and the HTTP lib (file-name (git-file-name name version))
;; developed as part of GSoC 2014 for Boost, and these are (sha256
;; dependencies unlikely to be "unbundled" in future releases. (base32
(recursive? #t))) "1dwag2pyqc0g86rris4w4fzafmz9a6kiqd47vdq7hl3a1lyi74mx"))))
(file-name (git-file-name name version)) (build-system meson-build-system)
(sha256 (arguments
(base32 (list
"1999bgrh52124a5g4qizav3x257ff2brjr855srpm1jv1nxzbygv")))) #:phases
(build-system meson-build-system) #~(modify-phases %standard-phases
(arguments (add-after 'unpack 'patch
`(;; Tests are disabled for now due to an issue that affecs guix: (lambda* (#:key inputs #:allow-other-keys)
;; <https://gitlab.com/emilua/emilua/-/issues/22> (substitute* "src/emilua_gperf.awk"
(("/usr/bin/env") (which "env")))
(substitute* "src/system.cpp"
(("P_PIDFD") "P_PID"))
(copy-recursively
(assoc-ref inputs "emilua-http")
"emilua-http")
(copy-recursively
(assoc-ref inputs "trial-protocol")
"trial-protocol")
(with-directory-excursion "subprojects"
(symlink "../emilua-http" "emilua-http")
(copy-file "packagefiles/emilua-http/meson.build"
"emilua-http/meson.build")
(symlink "../trial-protocol" "trial-protocol")
(copy-file "packagefiles/trial.protocol/meson.build"
"trial-protocol/meson.build")))))
#:configure-flags #:configure-flags
(list "-Denable_http=true" #~(list "-Denable_http=true"
"-Denable_tests=false" "-Denable_file_io=true"
"-Denable_manpages=false" "-Denable_io_uring=true"
"-Dversion_suffix=-guix1"))) ;; TODO: Linux namespaces are disabled for now due to conflict
(native-inputs ;; with some packages in guix.
(list luajit-lua52-openresty "-Denable_linux_namespaces=false"
pkg-config "-Denable_manpages=false"
re2c "-Dversion_suffix=-guix1")))
xxd)) (native-inputs
(inputs (list luajit-lua52-openresty
(list boost re2c
boost-static gperf
fmt-7 xxd
;; LuaJIT has a 2GiB addressing limit[1] that has been fixed on OpenResty pkg-config))
;; fork. Emilua is severely affected by this limit, so the upstream package (inputs
;; is avoided. Emilua also depends on the -DLUAJIT_ENABLE_LUA52COMPAT `(("emilua-http"
;; configure flag[2] for some features to work (e.g. __pairs on HTTP ,(origin
;; headers). (method git-fetch)
;; (uri (git-reference
;; [1] <http://hacksoflife.blogspot.com/2012/12/integrating-luajit-with-x-plane-64-bit.html> (url "https://github.com/BoostGSoC14/boost.http")
;; [2] <http://luajit.org/extensions.html#lua52> (commit "93ae527c89ffc517862e1f5f54c8a257278f1195")))
luajit-lua52-openresty (sha256
ncurses (base32
openssl)) "0jm7fw0cjd3s9zkkvyh6mcj6z32hcy7l9bszv74l92qk15ivvp9h"))))
(native-search-paths ("trial-protocol"
(list ,(origin
(search-path-specification (method git-fetch)
(variable "EMILUA_PATH") (uri (git-reference
(files (url "https://github.com/breese/trial.protocol")
(list (string-append "lib/emilua-" (version-major+minor version))))))) (commit "79149f604a49b8dfec57857ca28aaf508069b669")))
(home-page "https://gitlab.com/emilua/emilua") (sha256
(synopsis "Lua execution engine") (base32
(description "0k42i5b4v3zz5x0r3dssiymgmn2x8zg4fzdksya9aggxgigippsx"))))
"Emilua is a LuaJIT-based Lua execution engine that supports async IO, ("boost" ,boost)
("boost-static" ,boost-static)
("fmt" ,fmt-8)
("gcc" ,gcc-12)
("luajit-lua52-openresty" ,luajit-lua52-openresty)
("ncurses" ,ncurses)
("serd" ,serd)
("sord" ,sord)
("libcap" ,libcap)
("liburing" ,liburing)
("openssl" ,openssl)))
(native-search-paths
(list
(search-path-specification
(variable "EMILUA_PATH")
(files
(list (string-append "lib/emilua-" (version-major+minor version)))))))
(home-page "https://gitlab.com/emilua/emilua")
(synopsis "Lua execution engine")
(description
"Emilua is a LuaJIT-based Lua execution engine that supports async IO,
fibers and actor-inspired threading. The experimental builtin HTTP module is fibers and actor-inspired threading. The experimental builtin HTTP module is
enabled.") enabled.")
(license license:boost1.0))) (license license:boost1.0)))
(define-public fennel (define-public fennel
(package (package