guix-play/guix/import
Maxim Cournoyer a8b927a562
import: go: Add an option to use pinned versions.
The ability to pin versions is handy when having to deal to packages that
bootstrap themselves through a chain of former versions.  Not using pinned
versions in these case could introduce dependency cycles.

* guix/build-system/go.scm (guix)
(%go-version-rx): Rename to...
(%go-pseudo-version-rx): ... this.  Simplify the regular expression, which in
turns makes it more robust.
* guix/build-system/go.scm (go-version->git-ref): Adjust following the above
rename.
(go-pseudo-version?): New predicate.
(go-module-latest-version): Rename to ...
(go-module-version-string): ... this.  Rename goproxy-url argument to just
goproxy.  Add a VERSION keyword argument, update docstring and adjust to have
it used.
(go-module-available-versions): New procedure.
(%go.mod-require-directive-rx): Document regexp.
(parse-go.mod): Harmonize the way dependencies are recorded to a list of lists
rather than a list of pairs, as done for other importers.  Rewrite to directly pass
multiple values rather than a record object.  Filter the replaced modules in a
functional style.
(go-module->guix-package): Add docstring.
[version, pin-versions?]: New arguments.  Rename the GOPROXY-URL argument to
GOPROXY.  Adjust to the new returned value of fetch-go.mod, which is a string.
Fail when the provided version doesn't exist.  Return a list dependencies and
their versions when in pinned versions mode, else just the dependencies.
(go-module-recursive-import)[version, pin-versions?]: New arguments.
Honor the new arguments and guard against network errors.
* guix/scripts/import/go.scm (%default-options): Register a default value for
the goproxy argument.
(show-help): Document that a version can be specified.  Remove the --version
argument and add a --pin-versions argument.
(%options)[version]: Remove option.
[pin-versions]: Add option.
(guix-import-go): Adjust so the version provided from the module name is
honored, along the new pin-versions? argument.
* tests/go.scm: Adjust and add new tests.
2021-04-09 22:41:32 -04:00
..
cabal.scm import: Fix docstring typoes. 2020-09-23 04:36:59 +02:00
cpan.scm import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling. 2021-01-21 00:14:38 +01:00
cran.scm import/cran: Fix detection of Fortran files. 2021-03-01 22:40:41 +01:00
crate.scm import: crate: Use repository when home-page is unavailable 2021-02-12 22:47:09 +01:00
elpa.scm import: elpa: Updater gracefully handles missing upstream data. 2021-01-07 12:08:40 +01:00
gem.scm import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling. 2021-01-21 00:14:38 +01:00
github.scm import: github: Gracefully handle projects that have disappeared. 2020-07-24 14:21:30 +02:00
gnome.scm import: gnome: Silence URL redirect messages. 2021-03-17 23:10:19 +01:00
gnu.scm import: gnu: Fix the detection of non-GNU packages. 2021-02-02 13:48:35 -05:00
go.scm import: go: Add an option to use pinned versions. 2021-04-09 22:41:32 -04:00
hackage.scm import: hackage: Accept optional version parameter. 2021-03-01 17:45:51 +01:00
json.scm import/json: json->code: Handle files with more than one definition. 2020-04-16 23:41:52 +02:00
kde.scm import: KDE updater finds packages even in sub-directory. 2019-09-10 19:04:06 +02:00
launchpad.scm import: launchpad: Recognize more URLs. 2020-09-01 22:45:16 +05:30
opam.scm import: opam: Adjust test to latest 'opam->guix-package' changes. 2020-12-08 22:58:37 +01:00
print.scm import: print: Improve origin method name guesswork. 2021-03-26 00:04:04 +01:00
pypi.scm import: utils: 'recursive-import' accepts an optional version parameter. 2020-12-02 22:09:23 +01:00
snix.scm build: Remove checks for 'nix-instantiate'. 2018-06-18 23:19:51 +02:00
stackage.scm import: utils: 'recursive-import' accepts an optional version parameter. 2020-12-02 22:09:23 +01:00
texlive.scm import: texlive: Produce a partial package definition rather than crashing. 2021-01-10 23:30:30 -05:00
utils.scm import: go: Improve synopsis and description parsing. 2021-04-09 22:41:31 -04:00