summaryrefslogtreecommitdiff
path: root/guix/import
Commit message (Collapse)AuthorAge
* import: gnu: Fix the detection of non-GNU packages.Maxim Cournoyer2021-02-02
| | | | | | * guix/import/gnu.scm (gnu->guix-package): Move the 'find-package' call before the 'latest-release' call, which would fail when the package did not have an entry on the FTP server.
* import: gnu: Mention package name upon failure.zimoun2021-01-31
| | | | | | | * guix/import/gnu.scm (gnu->guix-package): Use 'formatted-message' and mention the package name in error messages. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling.Ludovic Courtès2021-01-21
| | | | | | | | * guix/import/cpan.scm (<cpan-release>)[home-page]: Add 'unspecified?' case. * guix/import/gem.scm (<gem>)[licenses]: Likewise. (json->gem-dependency-list): Likewise. * guix/swh.scm (<directory-entry>)[checksums]: Likewise.
* import/cran: Add more invalid package names to ignore.Ricardo Wurmus2021-01-20
| | | | * guix/import/cran.scm (invalid-packages): Add more names.
* import: texlive: Produce a partial package definition rather than crashing.Maxim Cournoyer2021-01-10
| | | | | | | | | This is a small improvement awaiting a definitive fix for <https://issues.guix.gnu.org/45656>. * guix/import/texlive.scm (sxml->package): Produce a warning when the SVN checkout failed. Rather than crashing on the unexpected #f value, return a partial package definition with the source field set to #f.
* import: elpa: Updater gracefully handles missing upstream data.Ludovic Courtès2021-01-07
| | | | | | | | | Fixes a crash with: guix refresh emacs-exwm-no-x-toolkit * guix/import/elpa.scm (latest-release): Return #f when 'elpa-package-info' returns #f.
* import/utils: recursive-import: Fix typo.Ricardo Wurmus2020-12-31
| | | | * guix/import/utils.scm (recursive-import): Fix typo.
* 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.
* import/utils: alist->package: Handle SPDX license names only as fallback.Ricardo Wurmus2020-12-27
| | | | | | | | | Fixes <https://bugs.gnu.org/45453>. * guix/import/utils.scm (alist->package): Find plain license names in (guix licenses) first, and only fall back to SPDX names on error. * tests/import-utils.scm ("alist->package with SPDX license name 1/2", "alist->package with SPDX license name 2/2"): New tests.
* import/print: package->code: Fix branching.Ricardo Wurmus2020-12-27
| | | | | * guix/import/print.scm (package->code)<license->code>: Branch on VAR, not on the SYMBOL-APPEND return value.
* import: crate: Change updater name from "crates" to "crate".Nicolas Goaziou2020-12-23
| | | | | * guix/import/crate.scm (%crate-updater): Change name to `crate', so it is on par with the importer, and the manual.
* 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: elpa: Support working with MELPA.Carlo Zancanaro2020-12-18
| | | | | | | | | | | | * guix/import/elpa.scm (default-files-spec): New variable. (download-git-repository, package-name->melpa-recipe, file-hash, vcs-file?, git-repository->origin, melpa-recipe->origin, melpa-recipe->maybe-arguments): New procedures. (elpa-package->sexp): Add optional repo argument, and use it to determine whether to attempt to construct a source using the MELPA recipe. (elpa->guix-package): Pass repo to elpa-package->sexp. Signed-off-by: Christopher Baines <mail@cbaines.net>
* import: cran: Use CRAN’s canonical URL as home-page.Lars-Dominik Braun2020-12-15
| | | | | | | * guix/import/cran.scm (%cran-canonical-url): New variable. (description->package): Construct home-page using canonical URL. Signed-off-by: Christopher Baines <mail@cbaines.net>
* 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.
* import/utils: Fix conditional.Ricardo Wurmus2020-12-09
| | | | | | | This is a follow-up to commit 45584061a9ebe961e2be08ee94c3fe8ad74e2713. * guix/import/utils.scm (package->definition): Use EQ? instead of = to compare truthiness; use ELSE instead of (#T).
* import: cran: Update the Bioconductor version to 3.12.Roel Janssen2020-12-09
| | | | | * guix/import/cran.scm (%bioconductor-version): Set to 3.12. * guix/build-system/r.scm (bioconductor-uri): Update to 3.12.
* import: opam: Adjust test to latest 'opam->guix-package' changes.Ludovic Courtès2020-12-08
| | | | | | | | This is a followup to a8dccd4bdc1e58219d4ba08fe1649bf0b8325f44, which broke the test. * guix/import/opam.scm (get-opam-repository): Prevent inlining. * tests/opam.scm ("opam->guix-package"): Mock 'get-opam-repository'.
* guix: opam: Add coq support in the importer.Julien Lepiller2020-12-08
| | | | | | | * guix/import/opam.scm (get-opam-repository): Add support for coq repositories. (ocaml-name->guix-name): Properly name coq package. * doc/guix.texi (Invoking guix import): Document it.
* 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.
* guix: opam: Pass default repository to recursive importer.Julien Lepiller2020-12-08
| | | | | | | * guix/import/opam.scm (opam->guix-package): Rename #:repository key to #:repo. (opam-recursive-import): Pass #:repo keyword. * tests/opam.scm (opam->guix-package): Rename #:repository to #:repo.
* guix: opam: Filter implicit inputs.Julien Lepiller2020-12-08
| | | | | * guix/import/opam.scm (opam->guix-package, depends->inputs): Filter out implicit inputs.
* guix: opam: Remove stray `pk'.Julien Lepiller2020-12-08
| | | | * guix/import/opam.scm (opam->guix-package): Remove stray `pk'.
* import: crate: Skip tests when Guile-Semver is missing.Ludovic Courtès2020-12-04
| | | | | | | | * guix/import/crate.scm: Add comment for the 'module-autoload!' calls. * tests/crate.scm (have-guile-semver?): New variable. ("crate->guix-package", "cargo-recursive-import") ("cargo-recursive-import-hoors-existing-packages"): Skip when HAVE-GUILE-SEMVER? is false.
* import/cran: Fix calls to CRAN->GUIX-PACKAGE.Ricardo Wurmus2020-12-04
| | | | | * guix/import/cran.scm (cran->guix-package, latest-bioconductor-release): Invoke CRAN->GUIX-PACKAGE with #:REPO keyword argument.
* import: crate: Use existing package satisfying semver requirement.Hartmut Goebel2020-12-02
| | | | | | | | | | | | | | | | | | | | If a package satisfying the dependency's semver requirement already exists, use it. Prior to this change the highest version matching the semver requirement was used (and imported in case it was not defined as package already). When resolving a dependency (now done in `sort-map-dependencies`), first search for a package matching the semver requirement and only if this fails reach out for a crate. * guix/import/crate.scm (crate->guix-package)[find-package-version]: New function. [dependency-name+version]: New function. [sort-map-dependencies]: Use it instead of lambda function. * tests/crate.scm (test-doctool-crate, test-doctool-dependencies): New variables. ("self-test …", "cargo-recursive-import-hoors-existing-packages"): New tests.
* import: crate: Trim version for names after left-most non-zero part.Hartmut Goebel2020-12-02
| | | | | | | | | | | | | | This complies to how versions are matched for caret requirements in crates: An update is allowed if the new version number does not modify the left-most non-zero digit in the major, minor, patch grouping. * guix/import/crate.scm (version->semver-prefix): New function. (make-crate-sexp)[format-inputs]: Use it. (make-crate-sexp): Use it to pass shorter version to package->definition. * guix/import/utils.scm (package->definition): Change optional parameter APPEND-VERSION? into APPEND-VERSION?/STRING. If it is a string, append its value to name. * tests/crate.scm: Adjust tests accordingly.
* import: utils: Trim patch version from names.Hartmut Goebel2020-12-02
| | | | | | | | | This remove the patch version from generated package names. For example 'rust-my-crate-1.1.2' now becomes 'rust-my-crate-1.1'. * guix/import/utils.scm (package->definition): Trim patch version from generated package names. * tests/crate.scm: (cargo>guix-package, cargo-recursive-import): Likewise.
* 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: Memorize crate->guix-package.Martin Becze2020-12-02
| | | | | | | | | | | | This adds memorization to procedures that involve network lookups. 'lookup-crate*' is used on every dependency of a package to get its version list. It is also used to lookup a package's metadata. 'crate-recursive-import' is also memorized since creating the same package twice will trigger a lookup on its dependencies. * guix/import/crate.scm (lookup-crate*): New procedure. (crate->guix-package): Memorize package metadata lookups. (crate-recursive-import): Memorize package creation.
* 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>
* lint: Add 'check-haskell-stackage' checker.Timothy Sample2020-11-21
| | | | | | | | | | | * guix/lint.scm (check-haskell-stackage): New procedure. (%network-dependent-checkers): Add 'haskell-stackage' checker. * guix/import/hackage.scm (%hackage-url): New variable. (hackage-source-url, hackage-cabal-url): Use it in place of a hard-coded string. * guix/import/stackage.scm (%stackage-url): Make it a parameter. (stackage-lts-info-fetch): Update accordingly. * tests/lint.scm ("hackage-stackage"): New test.
* guix import stackage: Default to LTS version that matches GHC.Robert Vollmert2020-11-03
| | | | | | | | | | | | | | In particular, this means that 'guix lint' won't warn to update to versions that won't necessarily fit our package set well. * guix/import/stackage.scm (%stackage-url): Change to "https", avoiding redirect log messages. (%default-lts-version): New variable. (stackage-lts-info-fetch, stackage->guix-package, latest-lts-release): Use it. (lts-info-ghc-version): Remove unused procedure. Signed-off-by: Timothy Sample <samplet@ngyro.com>
* import: crate: make-crate-sexp: Fix missing home-page handling.Christopher Baines2020-10-19
| | | | | * guix/import/crate.scm (make-crate-sexp): Replace 'null rather than '() with the empty string for the home-page.
* import: print: Fix deprecation warning for origin-sha256.Helio Machado2020-10-19
| | | | | | | * guix/import/print.scm (source->code source version): Replace 'origin-sha256' by 'origin-hash' and handle non-SHA256 hashes. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import: utils: Fix license name mismatches and define CUA-OPL-1.0.Helio Machado2020-10-17
| | | | | | | | * guix/licenses.scm (cua-opl1.0): New variable. * guix/import/utils.scm (spdx-string->license): Rename licenses to fit the internal names and add a notice pointing to guix/licenses.scm. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: opam: Report groups in syntax tree.Julien Lepiller2020-10-02
| | | | | | * guix/import/opam.scm (group-pat): Report in syntax tree. (dependency->input, dependency->native-input, dependency->name): consider the case of a group.
* guix: opam: Fix syntax.Julien Lepiller2020-10-01
| | | | | | * guix/import/opam.scm (STRCHR, comment, choice): Fix syntax. (group-pat): Add syntax. (opam->guix-package): Suppport "archive" keyword.
* 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: cpan: Export cpan-release-module.Tobias Geerinckx-Rice2020-09-15
| | | | * guix/import/cpan.scm: Fix typo.
* Remove (guix json) and require Guile-JSON 4.3.0+.Ludovic Courtès2020-09-08
| | | | | | | | | | | | | | This is a followup to 4071879c86d059ee087c8986915ea72b8c742b72. * guix/json.scm: Remove. * Makefile.am (MODULES): Adjust accordingly. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): Check for 'define-json-mapping'. * doc/guix.texi (Requirements): Require Guile-JSON 4.3.0+. * guix/ci.scm, guix/cve.scm, guix/import/cpan.scm, guix/import/crate.scm, guix/swh.scm: Remove (guix json) import. * guix/import/gem.scm, guix/import/pypi.scm: Likewise, and import (json). * guix/self.scm (specification->package): Switch to GUILE-JSON-4. * guix/git-download.scm (git-fetch): Likewise.
* import: launchpad: Recognize more URLs.Arun Isaac2020-09-01
| | | | * guix/import/launchpad.scm (updated-launchpad-url): Recognize more URLs.
* import: launchpad: Recognize the .orig.tar.gz extension.Arun Isaac2020-09-01
| | | | | * guix/import/launchpad.scm (find-extension): Recognize the .orig.tar.gz extension.
* import: launchpad: Handle list of source URLs correctly.Arun Isaac2020-09-01
| | | | | * guix/import/launchpad.scm (updated-launchpad-url): Return updated URL when package has a list of URLs, not the old URL.
* utils: Remove compatibility re-export of 'memoize'.Ludovic Courtès2020-07-25
| | | | | | | | | | The 'memoize' binding was re-exported in 2016, commit 19e1d5f7f90194f1ac7e783b28a688ce1441786d, as a backwards-compatibility measure that makes little sense now. * guix/utils.scm: Don't re-export 'memoize'. * guix/import/pypi.scm: Adjust imports. * tests/pypi.scm: Remove duplicate (guix memoization) import.
* import: github: Gracefully handle projects that have disappeared.Ludovic Courtès2020-07-24
| | | | | | | | | Fixes <https://bugs.gnu.org/42509>. Reported by Alexandru-Sergiu Marton <brown121407@posteo.ro>. * guix/import/github.scm (fetch-releases-or-tags): Use 'http-fetch' instead of 'json-fetch', and guard against 404 errors. Upon 404, emit a warning and return the empty vector.
* import: pypi: Handle 'null instead of #nil.Arun Isaac2020-07-05
| | | | | * guix/import/pypi.scm (non-empty-string-or-false): guile-json now returns 'null instead of #nil for null JSON values. Handle it.
* import: Do not assume that 'package-source' returns an origin.Ludovic Courtès2020-07-03
| | | | | | | * guix/gnu-maintenance.scm (gnu-package?): Check whether 'package-source' returns an origin. * guix/import/github.scm (updated-github-url): Likewise. * guix/import/launchpad.scm (updated-launchpad-url): Likewise.
* upstream: Define 'url-predicate' and use it.Ludovic Courtès2020-07-03
| | | | | | | | | | | | | | | * guix/upstream.scm (url-predicate): New procedure. (url-prefix-predicate): Define in terms of 'url-predicate'. * guix/import/cpan.scm (cpan-package?): Use 'url-predicate'. * guix/import/cran.scm (cran-package?) (bioconductor-package?) (bioconductor-data-package?) (bioconductor-experiment-package?): Likewise. * guix/import/crate.scm (crate-package?): Likewise. * guix/import/elpa.scm (package-from-gnu.org?): Likewise. * guix/import/hackage.scm (hackage-package?): Likewise. * guix/import/pypi.scm (pypi-package?): Likewise. * guix/import/gem.scm (gem-package?): Use 'url-prefix-predicate'.