guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/24: gnu: Add go-github-com-yuin-gopher-lua.


From: guix-commits
Subject: 08/24: gnu: Add go-github-com-yuin-gopher-lua.
Date: Wed, 14 Aug 2024 19:08:58 -0400 (EDT)

sharlatan pushed a commit to branch go-team
in repository guix.

commit d4f3fdda27df8359123faeec088ddd9b7bbc122a
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Wed Aug 14 23:01:49 2024 +0100

    gnu: Add go-github-com-yuin-gopher-lua.
    
    * gnu/packages/golang-xyz.scm (glua, go-github-com-yuin-gopher-lua): New
    variables.
    
    Change-Id: Icd37ede94082d46e34465d345659885e3fafa98e
---
 gnu/packages/golang-xyz.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index f34d09674c..bd1866fa5e 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -5632,6 +5632,48 @@ string.  The string can be a string retorned for 
@code{time.Duration} or a
 similar string with weeks or days too.")
     (license license:bsd-3)))
 
+(define-public go-github-com-yuin-gopher-lua
+  (package
+    (name "go-github-com-yuin-gopher-lua")
+    (version "1.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/yuin/gopher-lua";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bvmd6kywbwzcpdqmmk6gjzrc2x4q24q1p25si4sm0s18kfqnmap"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/yuin/gopher-lua"
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; FIXME: "ls" needs to be substituted in _glua-tests/issues.lua and
+          ;; _lua5.1-tests/files.lua with full path, but attempt was failed:
+          ;; Throw to key `decoding-error' with args `("peek-char" "input
+          ;; decoding error" 84 #<input: _lua5.1-tests/files.lua 11>)'.
+          (add-after 'unpack 'disable-failing-tests
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (substitute* "script_test.go"
+                  ((".issues.lua.*") "")
+                  ((".files.lua.*") ""))
+                (for-each delete-file
+                          (list "_glua-tests/issues.lua"
+                                "_lua5.1-tests/files.lua"))))))))
+    (propagated-inputs
+     (list go-github-com-chzyer-readline))
+    (home-page "https://github.com/yuin/gopher-lua";)
+    (synopsis "VM and compiler for Lua in Golang")
+    (description
+     "GopherLua is a Lua5.1(+ goto statement in Lua5.2) VM and compiler.  It
+provides Go APIs that allow you to easily embed a scripting language to your
+Go host programs.")
+    (license license:expat)))
+
 (define-public go-go-etcd-io-bbolt
   (package
     (name "go-go-etcd-io-bbolt")
@@ -5949,6 +5991,17 @@ values.")
 ;;; Executables:
 ;;;
 
+(define-public glua
+  (package
+    (inherit go-github-com-yuin-gopher-lua)
+    (name "glua")
+    (arguments
+     (list
+      #:tests? #f
+      #:install-source? #f
+      #:import-path "github.com/yuin/gopher-lua/cmd/glua"
+      #:unpack-path "github.com/yuin/gopher-lua"))))
+
 (define-public go-chroma
   (package
     (name "go-chroma")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]