summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-03-21 00:16:22 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-04-09 23:02:37 -0400
commit83f8b6d32c76c56e4bb58eeb5af1259028d7ee72 (patch)
tree64cd50f8c435d240bdbc704ce14c361dc6674293 /doc/guix.texi
parenta8b927a562aad7e5f77d0e4db2d9cee3434446d2 (diff)
downloadguix-83f8b6d32c76c56e4bb58eeb5af1259028d7ee72.tar.gz
import: go: Append version to symbol name in the pinned version mode.
This allows importing packages with complicated version specific dependency
chains without the package symbol names colliding.

* doc/guix.texi (Invoking guix import): Document the --pin-versions option.
Mention that a specific version can be imported.  Remove the experimental
warning.
* guix/import/go.scm (go-module->guix-package-name)[version]: Add optional
argument.  Rewrite the character translation in terms of string-map.
(go-module->guix-package): Conditionally use dependencies whose symbol include
their version, based no the value of the PIN-VERSIONS? argument.
* guix/import/utils.scm (package->definition): Add a new case where the full
version string is appended to the package symbol.
* guix/scripts/import.scm (guix-import): Correctly print forms starting
with '(define-public [...]'.
* guix/scripts/import/go.scm (guix-import-go): Conditionally include the
version in the package symbols defined.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index d4320f16e1..84d8bf50be 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11553,13 +11553,13 @@ Select the given repository (a repository name).  Possible values include:
 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
 
+It is possible to use a package specification with a @code{@@VERSION}
+suffix to import a specific version.
+
 Additional options include:
 
 @table @code
@@ -11568,6 +11568,14 @@ Additional options include:
 Traverse the dependency graph of the given upstream package recursively
 and generate package expressions for all those packages that are not yet
 in Guix.
+@item --pin-versions
+When using this option, the importer preserves the exact versions of the
+Go modules dependencies instead of using their latest available
+versions.  This can be useful when attempting to import packages that
+recursively depend on former versions of themselves to build.  When
+using this mode, the symbol of the package is made by appending the
+version to its name, so that multiple versions of the same package can
+coexist.
 @end table
 @end table