[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/07: gnu: go-github-com-aarzilli-golua: Fix for go-1.11.
From: |
Pierre Neidhardt |
Subject: |
07/07: gnu: go-github-com-aarzilli-golua: Fix for go-1.11. |
Date: |
Mon, 12 Nov 2018 04:32:47 -0500 (EST) |
ambrevar pushed a commit to branch master
in repository guix.
commit 5c4758415d4b2565d3ec4a6d89c525d85dafb53a
Author: Pierre Neidhardt <address@hidden>
Date: Sun Nov 11 22:28:05 2018 +0100
gnu: go-github-com-aarzilli-golua: Fix for go-1.11.
* gnu/packages/golang.scm (go-github-com-aarzilli-golua)[arguments]: Fix
for go-1.11.
[native-inputs]: Remove lua.
[propagated-inputs]: Add lua.
---
gnu/packages/golang.scm | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 2fd8bf4..38df23a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2152,26 +2152,28 @@ generate ANSI colored strings.")
(base32
"1d9hr29i36cza98afj3g6rs3l7xbkprwzz0blcxsr9dd7nak20di"))))
(build-system go-build-system)
- (native-inputs
+ ;; 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
`(("lua" ,lua)))
(arguments
`(#:unpack-path "github.com/aarzilli/golua"
#:import-path "github.com/aarzilli/golua/lua"
#:phases
(modify-phases %standard-phases
- (replace 'build
- (lambda* (#:key import-path #:allow-other-keys)
- (invoke "go" "install"
- "-v" ; print the name of packages as they are compiled
- "-x" ; print each command as it is invoked
- "-ldflags=-s -w" ; strip the symbol table and debug
- "-tags" "llua" ; Latest Lua on Guix does not have a
version number.
- import-path)))
- (replace 'check
- (lambda* (#:key import-path #:allow-other-keys)
- (invoke "go" "test"
- "-tags" "llua" ; Latest Lua on Guix does not have a
version number.
- import-path))))))
+ ;; 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
- branch master updated (6c84390 -> 5c47584), Pierre Neidhardt, 2018/11/12
- 01/07: gnu: go: Update default to 1.11., Pierre Neidhardt, 2018/11/12
- 05/07: gnu: go-gopkg.in-asn1-ber.v1: Fix tests for go-1.11., Pierre Neidhardt, 2018/11/12
- 02/07: build-system/go: Plan removal of the pkg folder for go-1.11 onward., Pierre Neidhardt, 2018/11/12
- 03/07: gnu: go-github-com-prometheus-common-expfmt: Fix tests for go-1.11., Pierre Neidhardt, 2018/11/12
- 06/07: gnu: go-github-com-wtolson-go-taglib: Fix tests and build for go-1.11., Pierre Neidhardt, 2018/11/12
- 07/07: gnu: go-github-com-aarzilli-golua: Fix for go-1.11.,
Pierre Neidhardt <=
- 04/07: gnu: go-github-com-audriusbutkevicius-cli: Fix tests for go-1.11., Pierre Neidhardt, 2018/11/12