summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-06-11 17:13:01 +0900
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-06-22 21:36:44 +0100
commitfa1eababe33edac7f5f31e20fa854842b9c7a4de (patch)
treee7e3ede874fc495f51b77f96315a7c17634e368f
parent8f9750239628e1624f0d9a9573608879bfa21810 (diff)
gnu: Add gomacro.
* gnu/packages/go-apps.scm (gomacro): New variable. Change-Id: Ie3575a72baacb2ea3010d727d27f2d50749f93ea Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/go-apps.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/go-apps.scm b/gnu/packages/go-apps.scm
index c78551ca3f9..c549c4211e8 100644
--- a/gnu/packages/go-apps.scm
+++ b/gnu/packages/go-apps.scm
@@ -59,6 +59,52 @@
definitions in Go programs.")
(license license:bsd-3)))
+(define-public gomacro
+ (package
+ (name "gomacro")
+ (version "0.0.0-20240506194242-2ff796e3da10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cosmos72/gomacro")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17v3vlq5s5mxplzvs5d414shd2mqkfj3jwxzfgq6cnr9hgr4b9kc"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/cosmos72/gomacro"
+ ;; There are some unexplained test failures (see:
+ ;; https://github.com/cosmos72/gomacro/issues/164), and even after
+ ;; disabling the problematic tests, the test suite exits uncleanly with
+ ;; an exit status of 1.
+ #:tests? #f
+ #:test-flags
+ #~(list "-skip" (string-join '("TestFiles/slow.input"
+ "TestFromReflect6")
+ "|"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'delete-problematic-tests
+ (lambda _
+ ;; Some test module(s) under go/types fail to build.
+ (for-each delete-file
+ (find-files "src/github.com/cosmos72/gomacro/go/types"
+ "_test\\.go(\\.off)?$")))))))
+ (inputs (list go-golang-org-x-tools go-github-com-peterh-liner
+ go-github-com-mattn-go-runewidth))
+ (home-page "https://github.com/cosmos72/gomacro")
+ (synopsis
+ "Interactive Go interpreter and debugger with generics and macros")
+ (description
+ "@command{gomacro} is an almost complete Go interpreter, implemented in
+pure Go. It offers both an interactive REPL and a scripting mode, and does
+not require a Go toolchain at runtime (except in one very specific case:
+import of a 3rd party package at runtime).")
+ (license license:mpl2.0)))
+
(define-public gore
(package
(name "gore")