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

commit af04d4159de82095b644ee2522e85a9122a8b8a0
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Sat Feb 22 15:04:20 2025 +0000

    gnu: go-github-com-aarzilli-golua: Move to music.
    
    * gnu/packages/golang.scm (go-github-com-aarzilli-golua): Move from here ...
    * gnu/packages/music.scm: ... to here.
    
    Change-Id: Ice6875f1b845df5361dd7a7166723a93c558cc20
---
 gnu/packages/golang.scm | 46 ----------------------------------------------
 gnu/packages/music.scm  | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 46 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index eef6fd0d0e..bff0183892 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -1087,52 +1087,6 @@ in the style of communicating sequential processes 
(@dfn{CSP}).")
 (define-public go-std-1.22 (make-go-std go-1.22))
 (define-public go-std-1.23 (make-go-std go-1.23))
 
-(define-public go-github-com-aarzilli-golua
-  (let ((commit "03fc4642d792b1f2bc5e7343b403cf490f8c501d")
-        (revision "0"))
-    (package
-      (name "go-github-com-aarzilli-golua")
-      (version (git-version "0.0.0" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url
-                "https://github.com/aarzilli/golua";)
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           "1d9hr29i36cza98afj3g6rs3l7xbkprwzz0blcxsr9dd7nak20di"))))
-      (build-system go-build-system)
-      ;; From go-1.10 onward, "pkg" compiled libraries are not re-used, so
-      ;; when this package required as input for another one, it will have to
-      ;; be built again.  Thus its CGO requirements must be made available in
-      ;; the environment, that is, they must be propagated.
-      (propagated-inputs
-       (list lua))
-      (arguments
-       `(#:unpack-path "github.com/aarzilli/golua"
-         #:import-path "github.com/aarzilli/golua/lua"
-         #:phases
-         (modify-phases %standard-phases
-           ;; While it's possible to fix the CGO_LDFLAGS with the "-tags"
-           ;; command line argument, go-1.10+ does not re-use the produced pkg
-           ;; for dependencies, which means we would need to propagate the
-           ;; same "-tags" argument to all golua referrers.  A substitution is
-           ;; more convenient here.  We also need to propagate the lua
-           ;; dependency to make it available to referrers.
-           (add-after 'unpack 'fix-lua-ldflags
-             (lambda _
-               (substitute* "src/github.com/aarzilli/golua/lua/lua.go"
-                 (("#cgo linux,!llua,!luaa LDFLAGS: -llua5.3")
-                  "#cgo linux,!llua,!luaa LDFLAGS: -llua")))))))
-      (home-page "https://github.com/aarzilli/golua";)
-      (synopsis "Go Bindings for the Lua C API")
-      (description "This package provides @code{lua}, a Go module that can
-run a Lua virtual machine.")
-      (license license:expat))))
-
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 72f7f393ce..1e27679164 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -6361,6 +6361,54 @@ discard bad quality ones.
       (description "Go wrapper for taglib")
       (license license:unlicense))))
 
+;; demlo is only one user of this package, keep it next to it to prevent
+;; importing lua module into golang-xyz.
+(define-public go-github-com-aarzilli-golua
+  (let ((commit "03fc4642d792b1f2bc5e7343b403cf490f8c501d")
+        (revision "0"))
+    (package
+      (name "go-github-com-aarzilli-golua")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url
+                "https://github.com/aarzilli/golua";)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1d9hr29i36cza98afj3g6rs3l7xbkprwzz0blcxsr9dd7nak20di"))))
+      (build-system go-build-system)
+      ;; From go-1.10 onward, "pkg" compiled libraries are not re-used, so
+      ;; when this package required as input for another one, it will have to
+      ;; be built again.  Thus its CGO requirements must be made available in
+      ;; the environment, that is, they must be propagated.
+      (propagated-inputs
+       (list lua))
+      (arguments
+       `(#:unpack-path "github.com/aarzilli/golua"
+         #:import-path "github.com/aarzilli/golua/lua"
+         #:phases
+         (modify-phases %standard-phases
+           ;; While it's possible to fix the CGO_LDFLAGS with the "-tags"
+           ;; command line argument, go-1.10+ does not re-use the produced pkg
+           ;; for dependencies, which means we would need to propagate the
+           ;; same "-tags" argument to all golua referrers.  A substitution is
+           ;; more convenient here.  We also need to propagate the lua
+           ;; dependency to make it available to referrers.
+           (add-after 'unpack 'fix-lua-ldflags
+             (lambda _
+               (substitute* "src/github.com/aarzilli/golua/lua/lua.go"
+                 (("#cgo linux,!llua,!luaa LDFLAGS: -llua5.3")
+                  "#cgo linux,!llua,!luaa LDFLAGS: -llua")))))))
+      (home-page "https://github.com/aarzilli/golua";)
+      (synopsis "Go Bindings for the Lua C API")
+      (description "This package provides @code{lua}, a Go module that can
+run a Lua virtual machine.")
+      (license license:expat))))
+
 ;; demlo is only one user of this package, keep it next to it to prevent
 ;; importing lua module into golang-xyz.
 (define-public go-github-com-stevedonovan-luar

Reply via email to