GNU bug report logs -
#30009
[PATCH 0/1] gnu: Add selene.
Previous Next
Reported by: Fis Trivial <ybbs.daans <at> hotmail.com>
Date: Sat, 6 Jan 2018 18:03:02 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30009 in the body.
You can then email your comments to 30009 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#30009
; Package
guix-patches
.
(Sat, 06 Jan 2018 18:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Fis Trivial <ybbs.daans <at> hotmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 06 Jan 2018 18:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Guix,
This patch adds Selene, a C++11 binding for Lua.
There are a few things I'm not certain that I did right. So I decided to
add some notes here then somebody else will be able to correct me.
1. This is a header only library, so in the install phase I just copy
everything to the output directory explicitly.
2. There is one test executable calling multiple test files. The path
of those test files are hard coded. In order to overcome this, I
modified the check phase to use *copy* and *chdir*. The code looks
more bash than scheme.
3. The source version is from the master branch due to the last release
is quite dated. Besides, the author is seeking for maintainer now. I
packaged it so that it can serve as dependency for other packages who
need c++ binding.
fis (1):
gnu: Add selene.
gnu/packages/lua.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
--
2.13.6
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30009
; Package
guix-patches
.
(Sat, 06 Jan 2018 18:05:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 30009 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/lua.scm (selene): New public variable.
---
gnu/packages/lua.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 3fd1c43d4..dba704ffe 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -28,8 +28,11 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages readline)
#:use-module (gnu packages tls)
@@ -434,3 +437,62 @@ on numbers.")
(define-public lua5.1-bitop
(make-lua-bitop "lua5.1-bitop" lua-5.1))
+
+(define-public selene
+ (package
+ (name "selene")
+ (version "2017.08.25")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jeremyong/Selene.git")
+ ;; The release is quite old.
+ (commit "ffe1ade2568d4cff5894552be8f43e63e379a4c9")))
+ (file-name "Selene")
+ (sha256
+ (base32
+ "1axrgv3rxxdsaf807lwvklfzicn6x6gpf35narllrnz9lg6hn508"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ ;; lua pc file in CMakeLists.txt is lua5.3.pc
+ '("-DLUA_PC_CFG=lua;lua-5.3;lua-5.1")
+ #:test-target "all"
+ #:phases
+ ;; This is a header only library
+ (modify-phases %standard-phases
+ (delete 'build)
+ (replace 'install
+ (lambda _
+ (let* ((output (assoc-ref %outputs "out"))
+ (source (assoc-ref %build-inputs "source"))
+ (includedir (string-append output "/include")))
+ (copy-recursively
+ (string-append source "/include")
+ includedir))
+ #t))
+ ;; The path of test files are hard coded.
+ (replace 'check
+ (lambda _
+ (let* ((output (assoc-ref %output "out"))
+ (source (assoc-ref %build-inputs "source"))
+ (builddir (getcwd))
+ (testdir (string-append builddir "/test")))
+ (and
+ (copy-recursively
+ (string-append source "/test")
+ testdir)
+ (system* "make")
+ ;; To overcome the hardcoded test path
+ (mkdir-p "runner")
+ (copy-file "./test_runner" "./runner/test_runner")
+ (chdir "./runner")
+ (system* "./test_runner"))))))))
+ (native-inputs
+ `(("lua" ,lua)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/jeremyong/Selene")
+ (synopsis "Lua C++11 bindings")
+ (description
+ "Selene is a simple C++11 friendly header-only binding to Lua.")
+ (license license:zlib)))
--
2.13.6
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30009
; Package
guix-patches
.
(Mon, 08 Jan 2018 08:59:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 30009 <at> debbugs.gnu.org (full text, mbox):
Hello,
Some mostly cosmetic suggestions, which hopefully answer your questions:
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> * gnu/packages/lua.scm (selene): New public variable.
[...]
> + (replace 'install
> + (lambda _
> + (let* ((output (assoc-ref %outputs "out"))
> + (source (assoc-ref %build-inputs "source"))
> + (includedir (string-append output "/include")))
Avoid the ‘%outputs’ and ‘%build-inputs’ global variables by writing:
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((output (assoc-ref outputs "out")))
…))
> + ;; The path of test files are hard coded.
> + (replace 'check
> + (lambda _
Likewise.
> + (let* ((output (assoc-ref %output "out"))
> + (source (assoc-ref %build-inputs "source"))
> + (builddir (getcwd))
> + (testdir (string-append builddir "/test")))
> + (and
> + (copy-recursively
> + (string-append source "/test")
> + testdir)
> + (system* "make")
> + ;; To overcome the hardcoded test path
> + (mkdir-p "runner")
> + (copy-file "./test_runner" "./runner/test_runner")
> + (chdir "./runner")
> + (system* "./test_runner"))))))))
Here you can remove ‘and’ and use ‘invoke’ instead of ‘system*’
(‘invoke’ throws an exception when execution fails.)
> + (home-page "https://github.com/jeremyong/Selene")
> + (synopsis "Lua C++11 bindings")
> + (description
> + "Selene is a simple C++11 friendly header-only binding to Lua.")
It’s a library to create Lua bindings, pretty much like Boost::Python,
isn’t it? Perhaps the description could clarify that somehow.
Otherwise LGTM. Could you send an updated patch?
Thank you!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30009
; Package
guix-patches
.
(Mon, 08 Jan 2018 13:15:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 30009 <at> debbugs.gnu.org (full text, mbox):
>
> It’s a library to create Lua bindings, pretty much like Boost::Python,
> isn’t it? Perhaps the description could clarify that somehow.
>
This one is header only. I will try to add better description.
>
> Otherwise LGTM. Could you send an updated patch?
>
I will sent another patch that fix these a few days latter.
Thanks for the help.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30009
; Package
guix-patches
.
(Mon, 08 Jan 2018 17:20:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 30009 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/lua.scm (selene): New public variable.
---
gnu/packages/lua.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 3fd1c43d4..b375ff90c 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2016 doncatnip <gnopap <at> gmail.com>
;;; Copyright © 2016, 2017 Clément Lassieur <clement <at> lassieur.org>
;;; Copyright © 2016 José Miguel Sánchez García <jmi2k <at> openmailbox.org>
+;;; Copyright © 2018 Fis Trivial <ybbs.daans <at> hotmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,8 +29,11 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages readline)
#:use-module (gnu packages tls)
@@ -434,3 +438,59 @@ on numbers.")
(define-public lua5.1-bitop
(make-lua-bitop "lua5.1-bitop" lua-5.1))
+
+(define-public selene
+ (package
+ (name "selene")
+ (version "2017.08.25")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jeremyong/Selene.git")
+ ;; The release is quite old.
+ (commit "ffe1ade2568d4cff5894552be8f43e63e379a4c9")))
+ (file-name "Selene")
+ (sha256
+ (base32
+ "1axrgv3rxxdsaf807lwvklfzicn6x6gpf35narllrnz9lg6hn508"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ ;; lua pc file in CMakeLists.txt is lua5.3.pc
+ '("-DLUA_PC_CFG=lua;lua-5.3;lua-5.1")
+ #:test-target "all"
+ #:phases
+ ;; This is a header only library
+ (modify-phases %standard-phases
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((output (assoc-ref outputs "out"))
+ (source (assoc-ref inputs "source"))
+ (includedir (string-append output "/include")))
+ (copy-recursively
+ (string-append source "/include")
+ includedir))
+ #t))
+ ;; The path of test files are hard coded.
+ (replace 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((output (assoc-ref outputs "out"))
+ (source (assoc-ref inputs "source"))
+ (builddir (getcwd))
+ (testdir (string-append builddir "/test")))
+ (copy-recursively (string-append source "/test") testdir)
+ (invoke "make")
+ (mkdir-p "runner")
+ (copy-file "./test_runner" "./runner/test_runner")
+ (chdir "./runner")
+ (invoke "./test_runner")))))))
+ (native-inputs
+ `(("lua" ,lua)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/jeremyong/Selene")
+ (synopsis "Lua C++11 bindings")
+ (description
+ "Selene is a simple C++11 header-only library enabling seamless
+ interoperability between C++ and Lua programming language.")
+ (license license:zlib)))
--
2.13.6
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Thu, 11 Jan 2018 20:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Fis Trivial <ybbs.daans <at> hotmail.com>
:
bug acknowledged by developer.
(Thu, 11 Jan 2018 20:48:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 30009-done <at> debbugs.gnu.org (full text, mbox):
Fis Trivial <ybbs.daans <at> hotmail.com> skribis:
> * gnu/packages/lua.scm (selene): New public variable.
Perfect. Applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 09 Feb 2018 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 130 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.