summaryrefslogtreecommitdiff
path: root/guix/import/gem.scm
Commit message (Collapse)AuthorAge
* import: utils: 'recursive-import' accepts an optional version parameter.series-3754Martin Becze2020-04-29
| | | | | | | | | | | | | | | | | | | | | | This adds a key VERSION to 'recursive-import' and move the paramter REPO to a key. This also changes all the things that rely on 'recursive-import' * guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a key. (package->definition): Added optional 'append-version?'. * guix/import/cran.scm (cran->guix-package): Change the REPO parameter to a key. (cran-recursive-import): Likewise. * guix/import/elpa.scm (elpa->guix-pakcage): Likewise. (elpa-recursive-import): Likewise. * guix/import/gem.scm (gem->guix-package): Likewise. (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 Likewise.
* import: gem: Deal with unavailable licensing info.Ludovic Courtès2020-02-05
| | | | | | | | | | Fixes <https://bugs.gnu.org/39404>. Reported by Seth <lee.seth@tuta.io>. * guix/import/gem.scm (<gem>)[licenses]: Adjust for non-vector licenses. * tests/gem.scm (test-bar-json): Change "licenses" to 'null'. ("gem-recursive-import"): Adjust accordingly.
* import: gem: Rewrite to use a JSON mapping to records.Ludovic Courtès2020-02-05
| | | | | | | | | | | | * guix/import/gem.scm (<gem>, <gem-dependencies>, <gem-dependency>): New record types with JSON mapping. (json->gem-dependencies): New procedures. (rubygems-fetch): Use it. (hex-string->bytevector): Remove. (make-gem-sexp): Expect HASH to be a bytevector. (gem->guix-package): Adjust to use the new <gem> data type instead of an alist. (latest-release): Likewise.
* 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: 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.
* import: json: Consolidate duplicate json-fetch functionality.Jelle Licht2018-06-10
| | | | | | | | | | | | | * guix/import/json.scm (json-fetch): Return a list or hash table. (json-fetch-alist): New procedure. * guix/import/github.scm (json-fetch*): Remove. (latest-released-version): Use json-fetch. * guix/import/cpan.scm (module->dist-name): Use json-fetch-alist. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/pypi.scm (pypi-fetch): Likewise. * guix/import/stackage.scm (stackage-lts-info-fetch): Likewise.
* gnu: Use one spelling for ‘copyright’.Tobias Geerinckx-Rice2018-01-10
| | | | | | | | | | * gnu/packages/gtk.scm: Standardise on ‘copyright’ spelling in file headers. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl-check.scm: Likewise. * gnu/packages/perl.scm: Likewise. * guix/import/gem.scm: Likewise. * guix/import/hackage.scm: Likewise.
* import: json: Silence json-fetch output.Eric Bavier2016-12-12
| | | | | | | | * guix/import/json.scm (json-fetch): Use http-fetch instead of url-fetch to avoid writing to stdout and a temporary file for each invocation. * guix/import/gem.scm (rubygems-fetch): Do not redirect json-fetch output to /dev/null. * guix/import/pypi.scm (pypi-fetch): Likewise.
* import: Move string->license to importers.David Craven2016-09-28
| | | | | * guix/import/gem.scm (string->license): Move from (guix import utils). * guix/import/pypi.scm (string->license): Move from (guix import utils).
* upstream: Pass a package object to updaters.Ludovic Courtès2016-04-15
| | | | | | | | | | | | | | * guix/upstream.scm (package-update-path): Pass PACKAGE to 'latest-release'. * guix/gnu-maintenance.scm (latest-release*) (latest-gnome-release, latest-xorg-release): Adjust accordingly. * guix/import/cran.scm (latest-cran-release): (latest-bioconductor-release): Likewise. * guix/import/elpa.scm (latest-release): Likewise. * guix/import/gem.scm (latest-release): Likewise. * guix/import/github.scm (latest-release): Likewise. * guix/import/hackage.scm (latest-release): Likewise. * guix/import/pypi.scm (latest-release): Likewise.
* import: gem: Add updater.Ben Woodcroft2016-02-20
| | | | | | | | | | * guix/import/gem.scm (guix-package->gem-name, gem-package?, latest-release): New procedures. (%gem-updater): New variable. (rubygems-fetch): Wrap body in 'call-with-output-file' and 'with-error-to-port'. * guix/scripts/refresh.scm (%updaters): Add %GEM-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention RubyGems.
* import: gem: Beautify only the description, not the synopsis.Ben Woodcroft2016-01-20
| | | | | | * guix/import/gem.scm (make-gem-sexp): Add synopsis argument. (gem->guix-package): Pass unbeautified synopsis to make-gem-sexp. * tests/gem.scm: Adapt it.
* import: gem: Beautify description field.Ben Woodcroft2016-01-14
| | | | * guix/import/gem.scm (gem->guix-package): Use 'beautify-description'.
* import: gem: Fix minor bug and add unit test.David Thompson2015-09-01
| | | | | | | | * guix/import/gem.scm (make-gem-sexp): Properly handle an empty list of licenses. When rendering a list of licenses, cons 'list onto the front of the expression. * tests/gem.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* import: Add Ruby gem importer.David Thompson2015-08-27
* gnu/scripts/import.scm (importers): Add "gem". * gnu/import/gem.scm: New file. * gnu/scripts/import/gem.scm: New file. * Makefile.am (MODULES): Add them. * guix.texi ("invoking guix import"): Document it.