summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-04-26 21:13:06 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-09-13 15:33:30 +0300
commitde4f5df95db6c2e7071bf5e44c0d7ae928da1025 (patch)
treeb760d81f90354814819a41c11684d8084e322b95 /doc/guix.texi
parent43f9757f809d0fb3cd7c3e8b24bfb927179055e8 (diff)
downloadguix-de4f5df95db6c2e7071bf5e44c0d7ae928da1025.tar.gz
build/go: Support cross compiling.
* guix/build-system/go.scm (go-target): New procedure.
(go-build): Add goarch, goos keywords. Adjust bag depending if doing a
native or cross compile.
(go-cross-build): New procedure.
* guix/build/go-build-system.scm (setup-go-environment): Accept goarch,
goos keywords. Set go environment variables based on target architecture.
* doc/guix.texi (Build Systems): Mention new go-build-system keywords.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 220499503d..2fc9687910 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7759,6 +7759,13 @@ Packages that provide Go libraries should install their source code into
 the built output.  The key @code{#:install-source?}, which defaults to
 @code{#t}, controls whether or not the source code is installed.  It can
 be set to @code{#f} for packages that only provide executable files.
+
+Packages can be cross-built, and if a specific architecture or operating
+system is desired then the keywords @code{#:goarch} and @code{#:goos}
+can be used to force the package to be built for that architecture and
+operating system.  The combinations known to Go can be found
+@url{"https://golang.org/doc/install/source#environment", in their
+documentation}.
 @end defvr
 
 @defvr {Scheme Variable} glib-or-gtk-build-system