summaryrefslogtreecommitdiff
path: root/guix/import
Commit message (Collapse)AuthorAge
* import: pypi: Add more licensesLars-Dominik Braun2020-03-04
| | | | | | | * guix/import/pypi.scm (string->license): Add the BSD 2-clause and MPL 2.0 licenses, and add more strings for BSD 3-clause and Expat license. Signed-off-by: Leo Famulari <leo@famulari.name>
* import: github: Use HTTP "Authorization" header for access tokens.Matt Wette2020-02-22
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/39511>. The "access_token" query parameter is now deprecated: https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters * guix/import/github.scm (fetch-releases-or-tags)[headers]: Add "Authorization" header when (%github-token) is true. [decorate]: Remove, and remove callers.
* import: pypi: Support exporting packages with .zip source.Jakub Kądziołka2020-02-05
| | | | | | | | | * guix/import/pypi.scm (make-pypi-sexp): Rename test-inputs to native-inputs. Restructure the way pypi-uri parameters are generated. Use pypi-uri's extension parameter when required. Add "unzip" to native inputs when the package source is a zip file. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
* 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.
* import: texlive: Avoid uses of '@@' in tests.Ludovic Courtès2020-01-17
| | | | | | | | * guix/import/texlive.scm (fetch-sxml, sxml->package): Export. * tests/texlive.scm <top level>: Call '%http-server-port'. ("fetch-sxml: returns SXML for valid XML"): Use 'with-http-server' and set 'current-http-proxy' instead of using 'mock'. ("sxml->package"): Remove use of '@@'.
* import: opam: Avoid uses of '@@' in tests.Ludovic Courtès2020-01-17
| | | | | | | | | | | | | * guix/import/opam.scm (string-pat, multiline-string, list-pat) (dict, condition): Export. (opam-fetch): Add optional 'repository' parameter. (opam->guix-package): Add #:repository parameter and pass it to 'opam-fetch'. * tests/opam.scm ("opam->guix-package"): Remove use of 'mock' and pass TEST-REPO to 'opam->guix-package' instead. ("parse-strings", "parse-multiline-strings") ("parse-lists", "parse-dicts", "parse-conditions"): Remove uses of '@@', which are no longer needed.
* import: elpa: Rewrite test to use an HTTP server instead of mocking.Ludovic Courtès2020-01-16
| | | | | | | | | | | * guix/import/elpa.scm (elpa-url): Add 'gnu/http'. (elpa->guix-package): Handle it. * tests/elpa.scm (elpa-package-info-mock, auctex-readme-mock) (elpa-version->string, package-source-url, ensure-list) (package-home-page, make-elpa-package): Remove. <top level>: Call '%http-server-port'. (eval-test-with-elpa): Remove uses of 'mock'. Use 'with-http-server' and parameterize 'current-http-proxy' instead.
* import: cran: Avoid uses of '@@' in the tests.Ludovic Courtès2020-01-16
| | | | | | | * guix/import/cran.scm (description->alist, description->package): Export. <top level>: Set! 'listify'. * tests/cran.scm (description-alist, "description->package"): Remove use of '@@' to access the relevant bindings.
* import: crate: Export 'string->license'.Ludovic Courtès2020-01-16
| | | | | * guix/import/crate.scm (string->license): Export. * tests/crate.scm (string->license): Remove.
* import: cpan: Rewrite tests to use an HTTP server instead of mocking.Ludovic Courtès2020-01-15
| | | | | | | * guix/import/cpan.scm (%metacpan-base-url): New variable. (module->dist-name, cpan-fetch): Refer to it instead of the hard-coded URL. * tests/cpan.scm ("cpan->guix-package"): Use 'with-http-server' instead of 'mock'.
* import: cpan: Rewrite to use 'define-json-mapping'.Ludovic Courtès2020-01-15
| | | | | | | | | | | | | | | | | | | | * guix/import/cpan.scm (<cpan-dependency>, <cpan-release>): New JSON-mapped record types. (metacpan-url->mirror-url): New procedure. (cpan-source-url): Rewrite in terms of it. (cpan-version): Remove. (cpan-module->sexp): Rewrite to take a <cpan-release> instead of an alist, and rename 'meta' to 'release'. [convert-inputs]: Rewrite to use 'cpan-release-dependencies'. Update calls to 'convert-inputs' to pass a list of symbols. Replace 'assoc-ref' calls with the appropriate field accessors. (cpan->guix-package): Rename 'module-meta' to 'release'. (latest-release): Likewise, and use the appropriate accessors. * tests/cpan.scm (test-json): Remove "prereqs" record; add "dependency" list. ("source-url-http", "source-url-https"): Remove. ("metacpan-url->mirror-url, http") ("metacpan-url->mirror-url, https"): New tests.
* import: cran: Fix file descriptor leak.Ludovic Courtès2020-01-03
| | | | | | | | | Fixes <https://bugs.gnu.org/38836>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/import/cran.scm (bioconductor-packages-list): Close the port returned by 'http-fetch/cached'. (fetch-description): Likewise.
* 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'.
* guix: Upgrade to Bioconductor 3.10.Ricardo Wurmus2019-12-15
| | | | | * guix/build-system/r.scm (bioconductor-uri): Switch to version 3.10. * guix/import/cran.scm (%bioconductor-version): Same.
* import: cran: Recognize LGPL 2.1+.Ricardo Wurmus2019-12-14
| | | | * guix/import/cran.scm (string->license): Add case for lgpl2.1+.
* import: utils: Update docstring of 'recursive-import'.Ludovic Courtès2019-12-13
| | | | | | This is a followup to 70a8e13277d4a44b89dd9ee2290b98105f0235f1. * guix/import/utils.scm (recursive-import): Update docstring.
* import: crate: Better handle license expressions.Brice Waegeneire2019-12-11
| | | | | | | | * guix/import/crate.scm (%dual-license-rx): Removed function. (crate->guix-package): Handle most of the multi-licensing cases. * tests/crate.scm (licenses): Add tests for some licenses. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* 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.
* guix: import: Fix importing dune project.Julien Lepiller2019-11-30
| | | | | * guix/import/opam.scm: Detect dune projects from dependencies, then filter dune from dependencies.
* guix: import: Fix opam importer.Julien Lepiller2019-11-30
| | | | * guix/import/opam.scm: Allow line breaks in strings.
* import: texlive: Handle multi-license packages.Ludovic Courtès2019-11-22
| | | | | | | This fixes "guix import texlive translator". * guix/import/texlive.scm (sxml->package): Add clause for when 'license' is a list of licences, as is the case with the "translator" package.
* gnu: Use GHC 8.6.5 as the main Haskell compiler.Timothy Sample2019-11-20
| | | | | | * gnu/package/haskell.scm (ghc-8): Change to 'ghc-8.6'. * guix/import/hackage.scm (ghc-standard-libraries): Add 'ghc-heap' and 'libiserv'.
* import: crate: Support recursive imports.Martin Becze2019-10-01
| | | | | | | * guix/import/crate.scm (crate-recursive-import): New procedure. (crate->guix-package): Return dependencies as a second value. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: stackage: Fix typo.Vagrant Cascadian2019-09-23
| | | | * guix/import/stackage: Fix spelling of "version".
* import/github: Check for more version prefixes.Efraim Flashner2019-09-20
| | | | | * guix/import/github.scm (latest-released-version): Allow the version string to begin with the word 'version'.
* import: pypi: Refresher recognizes pythonhosted.org source URLs.Ludovic Courtès2019-09-18
| | | | | | | | | | This is a followup to a5376200541abf8245973e601be246bf65b8b6c7. Since that commit, 'pypi-package?' would return false for most Python packages, and thus "guix refresh python-xxx" would report that no updaters apply to the package. * guix/import/pypi.scm (pypi-package?)[pypi-url?]: Recognize "files.pythonhosted.org" URLs.
* import/cran: Export %bioconductor-version.Ricardo Wurmus2019-09-16
| | | | * guix/import/cran.scm (%bioconductor-version): Export it.
* import/utils: beautify-description: Recognize more fragments.Ricardo Wurmus2019-09-14
| | | | | * guix/import/utils.scm (beautify-description): Handle additional common initial sentence fragments in descriptions.
* import: KDE updater finds packages even in sub-directory.Hartmut Goebel2019-09-10
| | | | | | | | | | | | Fixes <http://issues.guix.gnu.org/issue/30345> and finally fixes <http://issues.guix.gnu.org/issue/25020>. Formerly packages living in a path like /stable/frameworks/5.60/portingAids/kross-5.60.0.tar.xz have not been found. * guix/import/kde.scm (uri->kde-path-pattern): New procedure. (latest-kde-release): Use pattern to search for file.
* upstream: Move KDE updater into a separate module.Hartmut Goebel2019-09-10
| | | | | | | | | As it was done for (guix import gnome). * guix/import/kde.scm: New file. * Makefile.am (MODULES): Add it. * guix/gnu-maintenance.scm (%kde-updater) (%kde-file-list-uri) (download.kde.org-files) (latest-kde-release): Remove.
* 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: github: Fix incorrect no-release case.Ludovic Courtès2019-09-08
| | | | | | | | | | This is a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d. Since that commit, when /releases returned an empty JSON array, we would not fall back to /tags because of the incorrect match. * guix/import/github.scm (fetch-releases-or-tags): Match the empty vector instead of the empty list.
* import: opam: Use propagated-inputs instead of inputs.Julien Lepiller2019-09-04
| | | | * guix/import/opam.scm (opam->guix-package): Use propagated-inputs instead of inputs.
* import: opam: Remove initial "v" in some version numbers.Julien Lepiller2019-09-04
| | | | * guix/import/opam.scm (opam-fetch): Remove initial "v" in some version numbers.
* import: crate: Correct interpretation of dual-licensing strings.Ludovic Courtès2019-09-04
| | | | | | | * guix/import/crate.scm (%dual-license-rx): New variable. (crate->guix-package)[string->license]: Rewrite to match it. * tests/crate.scm (test-crate): Adjust "license" field to current practice.
* import: crate: Separate crates.io API from actual conversion.Ludovic Courtès2019-09-04
| | | | | | | | | | | | | | | | | | | | This provides a clean separation between bindings to the https://crates.io/api/v1 API and actual conversion to Guix package sexps. As a side-effect, it fixes things like "guix import blake2-rfc", "guix refresh -t crates", etc. * guix/import/crate.scm (<crate>, <crate-version>, <crate-dependency>): New record types. (lookup-crate, crate-version-dependencies): New procedures. (crate-fetch): Remove. (crate->guix-package): Rewrite to use the new API. (latest-release): Likewise. * guix/build-system/cargo.scm (%crate-base-url): New variable. * tests/crate.scm (test-crate): Update accordingly. fixlet
* import: cran: Only use the git import with what looks like a URL.Ricardo Wurmus2019-09-02
| | | | | * guix/import/cran.scm (fetch-description): Abort if the argument does not look like a URL.
* import: cran: Retry failed git imports on Bioconductor.Ricardo Wurmus2019-09-02
| | | | | * guix/import/cran.scm (cran->guix-package): Retry failed git imports on Bioconductor.
* import: cran: Add support for git repositories.Ricardo Wurmus2019-08-29
| | | | | | | | | | | | | | | | | | | * guix/import/cran.scm (vcs-file?): New procedure. (download): Support downloading from git. (fetch-description): Add a clause for the 'git repository type. (files-match-pattern?): New procedure. (tarball-files-match-pattern?): Implement in terms of FILES-MATCH-PATTERN?. (directory-needs-fortran?, directory-needs-zlib?, directory-needs-pkg-config?): New procedures. (needs-fortran?, needs-zlib?, needs-pkg-config?): Rename these procedures... (tarball-needs-fortran?, tarball-needs-zlib?, tarball-needs-pkg-config?): ...to this, and use them. (file-hash): New procedure. (description->package): Handle the 'git repository type. * guix/import/utils.scm (package->definition): Handle package expression inside of a let. * guix/scripts/import.scm (guix-import): Handle let expressions. * doc/guix.texi (Invoking guix import): Document it.
* import: github: 'github-package?' uses 'package-upstream-name'.Ludovic Courtès2019-08-27
| | | | | | | * guix/import/github.scm (updated-github-url): Use 'package-upstream-name' instead of 'package-name'. This allows 'github-package?' to match more packages, given an appropriate upstream name.
* Revert "import: utils: Add hash-ref*."Mark H Weaver2019-08-22
| | | | This reverts commit 8a3b11d1eb21e54b4f3a3cbceffed8ce2c11512e.
* Revert "import: cpan: Adapt for the change to guile-json version 3."Mark H Weaver2019-08-22
| | | | This reverts commit 01ce7af25add55514f737af48ea6c127bedfde67.
* import: cpan: Adapt for the change to guile-json version 3.Christopher Baines2019-08-21
| | | | | | | | | | | | | | In guile-json version 3, JSON objects are represented as hash tables, rather than alists. * guix/import/cpan.scm (string->license): Change the match expression to match on lists, rather than vectors. (module->dist-name, cpan-source-url, cpan-version): Change assoc-ref to hash-ref. (cpan-module->sexp): Change assoc-ref to hash-ref, and assoc-ref* to hash-ref*. * tests/cpan.scm ("source-url-http", "source-url-https"): Convert the alist to a hash table.
* import: utils: Add hash-ref*.Christopher Baines2019-08-21
| | | | | | | | With the change to guile-json version 3, JSON objects are represented as hash tables, rather than alists. The cpan importer uses assoc-ref* on a hash table, so add an equivalent function for hash tables. * guix/import/utils.scm (hash-ref*): New procedure.
* import: gnome: Update for Guile-JSON 3.x.Ludovic Courtès2019-08-17
| | | | | | | | | This is a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d. * guix/import/gnome.scm (jsonish->upstream-source): Use 'assoc-ref' instead of 'hash-ref'. (latest-gnome-release): Match a vector containing an alist, not a hash table. Use 'fold' instead of 'hash-fold' over RELEASES.
* import: cran: Support experiment and annotation packages.Ricardo Wurmus2019-08-16
| | | | | | | | | | | * guix/import/cran.scm (%bioconductor-packages-list-url): Replace variable... (bioconductor-packages-list-url): ...with this procedure. (bioconductor-packages-list): Accept optional TYPE argument. (latest-bioconductor-package-version): Same. (fetch-description): Determine package type and use it in calls to LATEST-BIOCONDUCTOR-PACKAGE-VERSION and BIOCONDUCTOR-URI. (description->package): Pass package type to URI helper procedure; include package type in annotation or experiment packages from Bioconducter.
* import: hackage: Update list of ghc-included packages.Robert Vollmert2019-08-07
| | | | | | | It turns out the list in the release notes is incomplete. This updates the list from /gnu/store/<hash>-ghc-8.4.3/lib/ghc-8.4.3. * guix/import/hackage.scm (ghc-standard-libraries): Update list.
* 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.