@@ -45,9 +45,11 @@ (define-module (gnu packages lua)
#:use-module (guix build-system meson)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
#:use-module (gnu packages build-tools)
+ #:use-module (gnu packages check)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages libevent)
@@ -1284,3 +1286,35 @@ (define-public fnlfmt
"Fnlfmt is a tool for automatically formatting Fennel code in a consistent
way, following established lisp conventions.")
(license license:lgpl3+)))
+
+(define-public lutok
+ ;; The last tag was in 2014, the last commit in 2016.
+ (let ((commit "8f8eaefe8b7c76e286b96fcbe2e860af98de29ea")
+ (revision "0"))
+ (package
+ (name "lutok")
+ (version (git-version "0.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jmmv/lutok")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08ajd8bb4pzrbak3kq5arxgy82wg43vfdxilyfx1p6pyp6g18jj8"))))
+ (build-system gnu-build-system)
+ (inputs (list lua-5.2))
+ (native-inputs (list atf autoconf automake libtool pkg-config))
+ (arguments
+ ;; Tests require Kyua, which itself depends on Lutok.
+ (list #:tests? #f))
+ (home-page "https://github.com/jmmv/lutok")
+ (synopsis "Lightweight C++ API for Lua")
+ (description
+ "Lutok provides a lightweight wrapper around Lua's C interfaces that eases
+the interaction between C++ and Lua. These wrappers make intensive use of RAII
+to prevent resource leakage, expose C++-friendly data types, report errors by
+means of exceptions and ensure that the Lua stack is always left untouched in
+the face of errors.")
+ (license license:bsd-3))))