summaryrefslogtreecommitdiff
path: root/guix/scripts/import
Commit message (Collapse)AuthorAge
* import: Enable recursive import for texlive packages.Ricardo Wurmus2022-07-19
| | | | | | | | | | | | | * guix/import/texlive.scm (tlpdb->package): Add VERSION argument; include explicit version field in output. (texlive->guix-package): Set default value for VERSION argument; adjust call of tlpdb->package. (texlive-recursive-import): Accept REPO and VERSION keyword arguments. * guix/import/utils.scm (package->definition): Add a clause to deal with output from tlpdb->package. * guix/scripts/import/texlive.scm (%options): Add "recursive" option. (guix-import-texlive): Honor "recursive" option. * doc/guix.texi (Using TeX and LaTeX): Mention "recursive" option.
* import: Add hex.pm importer.Hartmut Goebel2022-06-15
| | | | | | | | | | | | | hex.pm is a package repository for Erlang and Elixir. * guix/scripts/import.scm (importers): Add "hexpm". * guix/scripts/import/hexpm.scm, guix/import/hexpm.scm, guix/hexpm-download.scm: New files. * guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of fetch methods. * guix/upstream.scm (package-update/hexpm-fetch): New function. (%method-updates) Add it. * Makefile.am: Add them.
* import: Add Elm importer.Philip McGrath2022-05-22
| | | | | | | | | | | * guix/import/elm.scm, guix/scripts/import/elm.scm: New files. * Makefile.am (MODULES): Add them. * guix/scripts/import.scm (importers): Add "elm". * doc/guix.texi (Invoking guix import): Document Elm importer. * doc/contributing.texi (Elm Packages): Mention it. * tests/elm.scm ("(guix import elm)"): New test group. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: import: gem: Fix recursive error handling.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/scripts/import/gem.scm (guix-import-gem): Handle error. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: pypi: Use 'with-error-handling'.Ludovic Courtès2022-02-02
| | | | | * guix/scripts/import/pypi.scm (guix-import-pypi): Wrap body in 'with-error-handling'.
* import: texlive: Update error message.Ricardo Wurmus2022-01-10
| | | | | | We aren't downloading anything. * guix/scripts/import/texlive.scm (guix-import-texlive): Update error message.
* scripts: import: go: Wrap body in 'with-error-handling'.Ludovic Courtès2022-01-09
| | | | | | | | This ensures proper error reporting and an exception reaches the top level. * guix/scripts/import/go.scm (guix-import-go): Wrap body in 'with-error-handling'.
* import: Replace texlive importer.Ricardo Wurmus2021-11-17
| | | | | | | | | | | | | * guix/import/texlive.scm (fetch-sxml, sxml->package): Remove procedures. (tlpdb-file, tlpdb, files->directories, tlpdb->package): New procedures. (string->license): Add case for lpplgpl license combination. (guix-name): Remove COMPONENT argument. (texlive->guix-package): Use new procedures. (texlive-recursive-import): New procedure. * guix/scripts/import/texlive.scm (show-help, %options): Remove --archive option. (guix-import-texlive): Adjust call of texlive->guix-package. * doc/guix.texi (Invoking guix import): Update documentation.
* import: cran: Allow imports of a specific version.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | * guix/import/cran.scm (download): Handle the case where URL is a list. (fetch-description-from-tarball): New procedure. (fetch-description): Add #:version parameter. Honor it when REPOSITORY is 'cran. Use 'fetch-description-from-tarball' when REPOSITORY is 'bioconductor. (description->package): SOURCE-URL may now be a list. (cran->guix-package): Pass VERSION to 'fetch-description'. (cran-recursive-import): Add #:version parameter. * guix/scripts/import/cran.scm (guix-import-cran): Expect a spec rather than a mere package name. * doc/guix.texi (Invoking guix import): Document it.
* import: pypi: Allow imports of a specific version.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | | * guix/import/pypi.scm (latest-version): New procedure. (latest-source-release): Rename to... (source-release): ... this. Add 'version' parameter. (latest-wheel-release): Rename to... (wheel-release): ... this. Add 'version' parameter. (pypi->guix-package): Honor 'version' parameter. (pypi-recursive-import): Add 'version' parameter and honor it. * guix/scripts/import/pypi.scm (guix-import-pypi): Expect a spec. Pass it to 'package-name->name+version'. Pass the 'version' parameter. * tests/pypi.scm ("pypi->guix-package, no wheel"): Exercise the #:version parameter. * doc/guix.texi (Invoking guix import): Document it.
* import: egg: Allow imports of a specific version.Xinglu Chen2021-11-07
| | | | | | | | | | | | * guix/import/egg.scm (eggs-repository): Change URL. (egg-metadata): Accept optional #:version keyword argument. (egg->guix-package): Accept ‘version’ argument. (egg-recursive-import): Add ‘version’ argument and honor it. * guix/scripts/import/egg.scm (guix-import-egg): Parse a specification instead of just a package name. * doc/guix.texi (Invoking guix import): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Revert the #51061 patch series for now.Tobias Geerinckx-Rice2021-10-08
| | | | | | | This reverts commits f63c79bf7674df012517f8e9148f94c611e35f32 ..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing. See <https://issues.guix.gnu.org/51061#32>.
* import: Add hex.pm importer.Hartmut Goebel2021-10-07
| | | | | | | | | | | | | hex.pm is a package repository for Erlang and Elixir. * guix/scripts/import.scm (importers): Add "hexpm". * guix/scripts/import/hexpm.scm, guix/import/hexpm.scm, guix/hexpm-download.scm: New files. * guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of fetch methods. * guix/upstream.scm (package-update/hexpm-fetch): New function. (%method-updates) Add it. * Makefile.am: Add them.
* import: go: Improve error handling.zimoun2021-09-01
| | | | | | | | | | * guix/import/go.scm (go-module->guix-package*): Handle errors, remove memoize. (go-module-recursive-import): Remove 'guard', add memoize. * guix/scripts/import/go.scm (guix-import-go): Adjust. * tests/go.scm: Adjust. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix: opam: More flexibility in the importer.Alice BRENON2021-08-21
| | | | | | | | | | | | | | | | | | | | * guix/scripts/import/opam.scm: Pass all instances of --repo as a list to the importer. * guix/import/opam.scm (opam-fetch): Stop expecting "expanded" repositories and call get-opam-repository instead to keep values "symbolic" as long as possible and factorize. (get-opam-repository): Use the same repository source as CLI opam does (i.e. HTTP-served index.tar.gz instead of git repositories). (find-latest-version): Be more flexible on the repositories structure instead of expecting packages/PACKAGE-NAME/PACKAGE-NAME.VERSION/. * tests/opam.scm: Update the call to opam->guix-package since repo is now expected to be a list and remove the mocked get-opam-repository deprecated by the support for local folders by the actual implementation. * doc/guix.texi: Document the new semantics and valid arguments for the --repo option. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
* guix: Add ContentDB importer.Maxime Devos2021-08-20
| | | | | | | | | | | * guix/import/contentdb.scm: New file. * guix/scripts/import/contentdb.scm: New file. * tests/contentdb.scm: New file. * Makefile.am (MODULES, SCM_TESTS): Register them. * po/guix/POTFILES.in: Likewise. * doc/guix.texi (Invoking guix import): Document it. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
* import: gem: Fix typo.Brice Waegeneire2021-08-15
| | | | * guix/scripts/import/gem.scm (%options): Fix typo.
* import: Use PARSE-COMMAND-LINE for options.Sarah Morgensen2021-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. * guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: Likewise. * guix/scripts/import/gem.scm (guix-import-gem)[parse-options]: Likewise. * guix/scripts/import/gnu.scm (guix-import-gnu)[parse-options]: Likewise. * guix/scripts/import/cpan.scm (guix-import-cpan)[parse-options]: Likewise. * guix/scripts/import/cran.scm (guix-import-cran)[parse-options]: Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa)[parse-options]: Likewise. * guix/scripts/import/json.scm (guix-import-json)[parse-options]: Likewise. * guix/scripts/import/opam.scm (guix-import-opam)[parse-options]: Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi)[parse-options]: Likewise. * guix/scripts/import/crate.scm (guix-import-crate)[parse-options]: Likewise. * guix/scripts/import/texlive.scm (guix-import-texlive)[parse-options]: Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage)[parse-options]: Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage)[parse-options]: Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: Add CHICKEN egg importer.Xinglu Chen2021-06-03
| | | | | | | | | | | | * guix/import/egg.scm: New file. * guix/scripts/import/egg.scm: New file. * tests/egg.scm: New file. * Makefile.am (MODULES, SCM_TESTS): Register them. * po/guix/POTFILES.in: Likewise. * guix/scripts/import.scm (importers): Add egg importer. * doc/guix.texi (Invoking guix import, Invoking guix refresh): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: go: Fix goproxy option argument's format.Zheng Junjie2021-05-14
| | | | | | | | | | | | Commit a8b927a562 Added new procedure go-module-available-versions use 'string-append' to GOPROXY, but 'string->symbol' let GOPROXY is a symbol (it must be a string), which would lead to wrong-type-arg errors in the 'string-append' procedure. * guix/scripts/import/go.scm (%options)[goproxy]: Remove call to 'string->symbol'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: Remove Nix importer.Ludovic Courtès2021-04-20
| | | | | | | | | | | | | | | | This importer has suffered from bitrot and no longer works with current Nix and Nixpkgs. See <https://bugs.gnu.org/32339> and <https://bugs.gnu.org/36255>. * guix/import/snix.scm, guix/scripts/import/nix.scm, tests/snix.scm: Remove. * Makefile.am (MODULES, SCM_TESTS): Remove them. * guix/scripts/import.scm (importers): Remove "nix". * build-aux/test-env.in: Remove NIXPKGS variable. * configure.ac: Remove '--with-nixpkgs' option. * doc/guix.texi (Invoking guix import): Remove bit about "guix import nix". * etc/completion/fish/guix.fish: Likewise.
* import: go: Append version to symbol name in the pinned version mode.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | 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.
* import: go: Add an option to use pinned versions.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* scripts: import: cran: Add missing help for 'style' option.zimoun2021-03-29
| | | | | | | * guix/scripts/import/cran.scm (show-help): Add help message for 'style' option. Signed-off-by: Christopher Baines <mail@cbaines.net>
* import: Add Go importer.Katherine Cox-Buday2021-03-10
| | | | | | | | | | | | | | | | | | | | | | | | 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 <francois.joulaud@radiofrance.com> Co-Authored-By: Maxim Cournoyer <maxim.cournoyer@gmail.com> Co-Authored-by: Ludovic Courtès <ludo@gnu.org>
* scripts: import: json: Fix error handling.zimoun2021-01-31
| | | | | | | | Fixes partially <https://bugs.gnu.org/44115>. * guix/scripts/import/json.scm (guix-import-json): Handle error. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import/elpa: Abort early on failure to fetch meta data.Ricardo Wurmus2020-12-31
| | | | | | | * guix/import/elpa.scm (elpa->guix-package): Raise condition instead of returning #FALSE. * guix/scripts/import/elpa.scm (guix-import-elpa): Handle conditions when importing recursively.
* scripts: Fix typo in crate importer help message.Nicolas Goaziou2020-12-23
| | | | | | Fixes <https://issues.guix.gnu.org/45351>. * guix/scripts/import/crate.scm (show-help): Fix URL.
* import/cran: Add input style "specification".Ricardo Wurmus2020-12-22
| | | | | | | | | * guix/import/cran.scm (%input-style): New parameter. (format-inputs): Use it. * guix/scripts/import/cran.scm (guix-import-cran): Set the %input-style parameter. (%options): Add "--style" option. * doc/guix.texi (Invoking guix import): Document it.
* import/cran: Abort with error message when recursive import fails.Ricardo Wurmus2020-12-12
| | | | | | | | | Previously, after a failed recursive import "guix import" would signal success. * guix/import/cran.scm (cran->guix-package): Raise a condition when all repositories have been exhausted. * guix/scripts/import/cran.scm (guix-import-cran): Handle errors.
* guix: opam: Add --repo argument to importer.Julien Lepiller2020-12-08
| | | | | | | | * guix/scripts/import/opam.scm (guix-import-opam): Pass --repo argument to recursive and non-recursive importers. * guix/import/opam.scm (get-opam-repository): Select proper repository location depending on a new repo argument. (opam->guix-package): Use get-opam-repository in the procedure body.
* import/cran: Do not attempt to generate definitions for failed imports.Ricardo Wurmus2020-12-04
| | | | | * guix/scripts/import/cran.scm (guix-import-cran): Remove failed imports from list of packages to define.
* import: crate: Parameterized importing of dev dependencies.Martin Becze2020-12-02
| | | | | | | | | | | | The recursive crate importer will now include development dependencies only for the top level package, but not for any of the recursively imported packages. Also #:skip-build will be false for the top-most package. * guix/import/crate.scm (make-crate-sexp): Add the key BUILD?. (crate->guix-package): Add the key INCLUDE-DEV-DEPS?. (crate-recursive-import): Likewise. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * tests/crate.scm (cargo-recursive-import): Likewise.
* import: crate: Use guile-semver to resolve module versions.Martin Becze2020-12-02
| | | | | | | | | | | | | | | | | | * guix/import/crate.scm: Add guile-semver as a soft dependency. (make-crate-sexp): Don't allow other keys. Add '#:skip-build?' to build system args. Pass a VERSION argument to 'cargo-inputs'. (crate->guix-package): Use guile-semver to resolve the correct module versions. Treat "build" dependencies as normal dependencies. (crate-name->package-name): Reuse the procedure 'guix-name' instead of duplicating its logic. * guix/import/utils.scm (package-names->package-inputs): Implement handling of (name version) pairs. * guix/scripts/import/crate.scm (guix-import-crate): Use crate-recursive-import instead of duplicate code. * tests/crate.scm (recursive-import): Change test packages versions to be distinguishable. Add version data to the test. Check created symbols, too. Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
* import: utils: 'recursive-import' accepts an optional version parameter.Martin Becze2020-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a key VERSION to 'recursive-import' and moves the parameter REPO to a key. This also changes all the places that rely on 'recursive-import'. * guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a key. (package->definition): Add optional 'append-version?'. * guix/scripts/import/crate.scm (guix-import-crate): Add the VERSION key. * guix/import/crate.scm (crate->guix-package): Add the VERSION key. (crate-recursive-import): Pass VERSION to recursive-import, remove now unnecessary code. * guix/import/cran.scm (cran->guix-package, cran-recursive-import): Change the REPO parameter to a key. * guix/import/elpa.scm (elpa->guix-package, elpa-recursive-import): Likewise. * guix/import/gem.scm (gem->guix-package, recursive-import): Likewise. * guix/import/opam.scm (opam-recurive-import): Likewise. * guix/import/pypi.scm (pypi-recursive-import): Likewise. * guix/import/stackage.scm (stackage-recursive-import): Likewise. * guix/scripts/import/cran.scm (guix-import-cran): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * tests/elpa.scm (eval-test-with-elpa): Likewise. * tests/import-utils.scm (recursive-import): Likewise. Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
* import: Fix docstring typoes.Tobias Geerinckx-Rice2020-09-23
| | | | | | * guix/import/cabal.scm (cabal-flags->alist): Fix typo in docstring. * guix/import/stackage.scm (lts-info-ghc-version): Likewise. * guix/scripts/import/hackage.scm (show-help): Likewise.
* import/json: Use json->code.Ricardo Wurmus2020-04-16
| | | | | * guix/import/json.scm (json->code): Export procedure. * guix/scripts/import/json.scm (guix-import-json): Use json->code.
* import: crate: Honor crate version for recursive imports.Ludovic Courtès2019-12-30
| | | | | | | | | | Fixes <https://bugs.gnu.org/38709>. Reported by Valentin Ignatev <valentignatev@gmail.com>. * guix/import/crate.scm (crate-recursive-import): Add optional 'version' parameter and honor it. * guix/scripts/import/crate.scm (guix-import-crate): Pass VERSION as 2nd argument to 'crate-recursive-import'.
* import: utils: 'recursive-import' returns a list rather than a stream.Ludovic Courtès2019-12-11
| | | | | | | | | | | | | | | | | * guix/import/utils.scm (recursive-import): Remove 'list->stream' call. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'stream->list' call. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Likewise. * tests/import-utils.scm ("recursive-import"): Likewise. Co-authored-by: Brian Leung <bkleung89@gmail.com>
* import: utils: 'recursive-import' returns packages in topological order.Ludovic Courtès2019-12-11
| | | | | | | | | | | | | | | | | | * guix/import/utils.scm (topological-sort): New procedure. (recursive-import): Rewrite to use it. * tests/import-utils.scm ("recursive-import"): New test. * guix/import/cran.scm (cran->guix-package): Always return two values. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'reverse' call on 'cran-recursive-import' result. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Change the order of package expressions accordingly.
* import: crate: Add '--recursive'.Martin Becze2019-10-01
| | | | | | | * guix/scripts/import/crate.scm (show-help, guix-import-crate): Add '--recursive'. * doc/guix.texi (Invoking guix import): Mention '--recursive'. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import: crate: Allow imports of a specific version.Martin Becze2019-09-10
| | | | | | | | | | | * guix/import/crate.scm (crate->guix-package): Add optional 'version' argument and honor it. * guix/scripts/import/crate.scm (guix-import-crate): Assume the first argument is a spec and destructure it with 'package-name->name+version'. Pass both to 'crate->guix-package'. * doc/guix.texi (Invoking guix import): Document it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import: cran: guix-import-cran: Use (guix import utils).Ricardo Wurmus2019-08-29
| | | | | * guix/scripts/import/cran.scm (guix-import-cran): Use PACKAGE->DEFINITION from (guix import utils) instead of custom procedure.
* maint: Switch to Guile-JSON 3.x.Ludovic Courtès2019-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on until now: it maps JSON dictionaries to alists (instead of hash tables), and JSON arrays to vectors (instead of lists). This commit is about adjusting all the existing code to this new mapping. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro. * configure.ac: Use it. * doc/guix.texi (Requirements): Mention the Guile-JSON version. * guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3. * guix/import/cpan.scm (string->license): Expect vectors instead of lists. (module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list' for DEPS. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/json.scm (json-fetch-alist): Remove. * guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (latest-source-release, latest-wheel-release): Call 'vector->list' on RELEASES. * guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (lts-package-version): Use 'vector->list'. * guix/import/utils.scm (hash-table->alist): Remove. (alist->package): Pass 'vector->list' on the inputs fields, and default to the empty vector. * guix/scripts/import/json.scm (guix-import-json): Remove call to 'hash-table->alist'. * guix/swh.scm (define-json-reader): Expect pair? or null? instead of hash-table?. [extract-field]: Use 'assoc-ref' instead of 'hash-ref'. (json->branches): Use 'map' instead of 'hash-map->list'. (json->checksums): Likewise. (json->directory-entries, origin-visits): Call 'vector->list' on the result of 'json->scm'. * tests/import-utils.scm ("alist->package with dependencies"): New test. * gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3. * gnu/installer.scm (installer-program)[installer-builder]: Likewise. * gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref' instead of 'hash-ref', and pass vectors through 'vector->list'. (iso3166->iso3166-territories): Likewise. * gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3. * guix/docker.scm (manifest, config): Adjust for Guile-JSON 3. * guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3. * guix/import/github.scm (fetch-releases-or-tags): Update docstring. (latest-released-version): Use 'assoc-ref' instead of 'hash-ref'. Pass the result of 'fetch-releases-or-tags' to 'vector->list'. * guix/import/launchpad.scm (latest-released-version): Likewise.
* import: opam: Add recursive option.Julien Lepiller2019-01-07
| | | | | | * guix/script/import/opam.scm: Add recursive option. * guix/import/opam.scm (opam->guix-package): return two values. (opam-recursive-import): New variable.
* import cran: Document "recursive" option.Pierre Neidhardt2018-10-17
| | | | * guix/scripts/import/cran.scm: (show-help): Document "recursive" option.
* import: pypi: Support recursive importing.Ricardo Wurmus2018-08-30
| | | | | | | | | | | | * guix/import/pypi.scm (guess-requirements): Use upstream names. (compute-inputs): Return the upstream dependency names as an additional value. (make-pypi-sexp): Likewise. (pypi->guix-package): Memoize it. (pypi-recursive-import): New procedure. * guix/scripts/import/pypi.scm (show-help, %options): Accept "recursive" option. (guix-import-pypi): Use pypi-recursive-import. * doc/guix.texi (Invoking guix import): Document it.
* import: stackage: Support recursive importing.Ricardo Wurmus2018-08-30
| | | | | | | | | | * guix/import/hackage.scm (hackage-name->package-name): Export procedure. * guix/import/stackage.scm (lts-info-packages-lts-info): Fix match expression. (stackage-recursive-import): New procedure. (stackage->guix-package): Memoize results. * guix/scripts/import/stackage.scm (show-help, %options, guix-import-stackage): Support recursive importing. * doc/guix.texi (Invoking guix import): Document option.
* import: hackage: Support recursive importing.Ricardo Wurmus2018-08-11
| | | | | | | | | * guix/import/hackage.scm (hackage-recursive-import): New procedure. (hackage-module->sexp): Return dependencies alongside dependencies. (hackage->guix-package): Memoize results. * guix/scripts/import/hackage.scm (show-help, %options, guix-import-hackage): Support recursive importing. * doc/guix.texi (Invoking guix import): Document option.
* import: gem: Add recursive import.Oleg Pykhalov2018-07-11
| | | | | | | | | | | | | * doc/guix.texi (Invoking guix import): Document gem recursive import. * guix/import/gem.scm (gem->guix-package): Return package and dependencies values. (gem-recursive-import): New procedure. * guix/scripts/import/gem.scm (show-help, %options): Add recursive option. (guix-import-gem): Use 'gem-recursive-import'. * tests/gem.scm (test-json): Rename to 'test-foo-json'. ("gem->guix-package"): Use 'test-foo-json'. (test-bar-json, test-bundler-json): New variables. ("gem-recursive-import"): New test.