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.
This commit is contained in:
Pierre Neidhardt 2018-11-11 22:28:05 +01:00
parent 46a4ae2212
commit 5c4758415d
No known key found for this signature in database
GPG Key ID: 9BDCF497A4BBCC7F
1 changed files with 16 additions and 14 deletions

View File

@ -2152,26 +2152,28 @@ generate ANSI colored strings.")
(base32 (base32
"1d9hr29i36cza98afj3g6rs3l7xbkprwzz0blcxsr9dd7nak20di")))) "1d9hr29i36cza98afj3g6rs3l7xbkprwzz0blcxsr9dd7nak20di"))))
(build-system go-build-system) (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))) `(("lua" ,lua)))
(arguments (arguments
`(#:unpack-path "github.com/aarzilli/golua" `(#:unpack-path "github.com/aarzilli/golua"
#:import-path "github.com/aarzilli/golua/lua" #:import-path "github.com/aarzilli/golua/lua"
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'build ;; While it's possible to fix the CGO_LDFLAGS with the "-tags"
(lambda* (#:key import-path #:allow-other-keys) ;; command line argument, go-1.10+ does not re-use the produced pkg
(invoke "go" "install" ;; for dependencies, which means we would need to propagate the
"-v" ; print the name of packages as they are compiled ;; same "-tags" argument to all golua referrers. A substitution is
"-x" ; print each command as it is invoked ;; more convenient here. We also need to propagate the lua
"-ldflags=-s -w" ; strip the symbol table and debug ;; dependency to make it available to referrers.
"-tags" "llua" ; Latest Lua on Guix does not have a version number. (add-after 'unpack 'fix-lua-ldflags
import-path))) (lambda _
(replace 'check (substitute* "src/github.com/aarzilli/golua/lua/lua.go"
(lambda* (#:key import-path #:allow-other-keys) (("#cgo linux,!llua,!luaa LDFLAGS: -llua5.3")
(invoke "go" "test" "#cgo linux,!llua,!luaa LDFLAGS: -llua")))))))
"-tags" "llua" ; Latest Lua on Guix does not have a version number.
import-path))))))
(home-page "https://github.com/aarzilli/golua") (home-page "https://github.com/aarzilli/golua")
(synopsis "Go Bindings for the Lua C API") (synopsis "Go Bindings for the Lua C API")
(description "This package provides @code{lua}, a Go module that can (description "This package provides @code{lua}, a Go module that can