From 02e2e093e858e8a0ca7bd66c1f1f6fd0a1705edb Mon Sep 17 00:00:00 2001 From: Katherine Cox-Buday Date: Thu, 22 Oct 2020 19:40:17 -0500 Subject: import: Add Go importer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds a 'guix import go' command. * doc/guix.texi (Requirements): Mention Guile-Lib dependency. (Invoking guix import): Document 'guix import go'. * gnu/packages/package-management.scm (guix)[inputs, propagated-inputs]: Add GUILE-LIB. * guix/self.scm (compiled-guix)[guile-lib]: New variable. [dependencies]: Add it. (specification->package): Add "guile-lib". * guix/build-system/go.scm (go-version->git-ref): New procedure. * guix/import/go.scm, guix/scripts/import/go.scm, tests/go.scm: New files. * guix/scripts/import.scm: Declare subcommand guix import go * po/guix/POTFILES.in: Add 'guix/scripts/import/go.scm'. * Makefile.am (MODULES): Add 'guix/import/go.scm' and 'guix/scripts/import/go.scm'. (SCM_TESTS): Add 'tests/go.scm'. Co-Authored-By: Helio Machado <0x2b3bfa0@gmail.com> Co-Authored-By: Francois Joulaud Co-Authored-By: Maxim Cournoyer Co-Authored-by: Ludovic Courtès --- doc/guix.texi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index f01e7ca89d..77aafafd97 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -862,6 +862,10 @@ substitutes (@pxref{Invoking guix publish}). @uref{https://ngyro.com/software/guile-semver.html, Guile-Semver} for the @code{crate} importer (@pxref{Invoking guix import}). +@item +@uref{https://www.nongnu.org/guile-lib/doc/ref/htmlprag/, Guile-Lib} for +the @code{go} importer (@pxref{Invoking guix import}). + @item When @url{http://www.bzip.org, libbz2} is available, @command{guix-daemon} can use it to compress build logs. @@ -11494,6 +11498,28 @@ Select the given repository (a repository name). Possible values include: of coq packages. @end itemize @end table + +@item go +@cindex go +Import metadata for a Go module using +@uref{https://proxy.golang.org, proxy.golang.org}. + +This importer is highly experimental. See the source code for more info +about the current state. + +@example +guix import go gopkg.in/yaml.v2 +@end example + +Additional options include: + +@table @code +@item --recursive +@itemx -r +Traverse the dependency graph of the given upstream package recursively +and generate package expressions for all those packages that are not yet +in Guix. +@end table @end table The structure of the @command{guix import} code is modular. It would be -- cgit v1.2.3