GNU bug report logs -
#51981
[PATCH 0/1] Fix cross-compilation of packages that use go-build-system
Previous Next
Full log
Message #8 received at 51981 <at> debbugs.gnu.org (full text, mbox):
---
guix/build/go-build-system.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 4768ee8562..f36e98f47a 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -148,7 +148,6 @@ (define* (setup-go-environment #:key inputs outputs goos goarch #:allow-other-ke
;; currently support modules, so turn modules off to continue using the old
;; GOPATH behavior.
(setenv "GO111MODULE" "off")
- (setenv "GOBIN" (string-append (assoc-ref outputs "out") "/bin"))
;; Make sure we're building for the correct architecture and OS targets
;; that Guix targets.
@@ -234,14 +233,19 @@ (define (go-inputs inputs)
(_ #f))
inputs))))
-(define* (build #:key import-path build-flags #:allow-other-keys)
+(define* (build #:key outputs import-path build-flags #:allow-other-keys)
"Build the package named by IMPORT-PATH."
(with-throw-handler
#t
(lambda _
- (apply invoke "go" "install"
+ (apply invoke "go" "build"
"-v" ; print the name of packages as they are compiled
"-x" ; print each command as it is invoked
+ ;; Set the output path for the build
+ (string-append "-o="
+ (assoc-ref outputs "out") "/bin/"
+ (package-name->name+version
+ (strip-store-file-name (assoc-ref outputs "out"))))
;; Respectively, strip the symbol table and debug
;; information, and the DWARF symbol table.
"-ldflags=-s -w"
--
2.33.1
--
Collin J. Doering
http://rekahsoft.ca
http://blog.rekahsoft.ca
http://git.rekahsoft.ca
This bug report was last modified 3 years and 31 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.