aboutsummaryrefslogtreecommitdiff
path: root/guix/import/opam.scm
Commit message (Collapse)AuthorAge
* utils: Don’t re-export ‘call-with-temporary-output-file’.Ludovic Courtès2024-04-15
| | | | | | | | | | | | * guix/utils.scm: Remove re-export of ‘call-with-temporary-output-file’. Autoload a number of modules. * guix/download.scm, guix/import/hackage.scm, guix/import/hexpm.scm, guix/import/opam.scm, guix/import/pypi.scm, tests/cpio.scm, tests/egg.scm, tests/opam.scm, tests/publish.scm, tests/store-database.scm, tests/utils.scm: Adjust imports accordingly. Change-Id: I3f5e94631397996a30be2ea4ff8b50a3371e8ee7
* guix: import: opam: Handle list of licenses.Josselin Poiret2023-10-17
| | | | | | | | | Fixes <https://issues.guix.gnu.org/issue/66461>. Reported by Simon Tournier <zimon.toutoune@gmail.com>. * guix/import/opam.scm (opam->guix-package): Handle lists of licenses. Signed-off-by: Simon Tournier <zimon.toutoune@gmail.com>
* import: opam: opam->guix-package: Fix default repo argument.Csepp2023-04-08
| | | | | | | * guix/import/opam.scm (opam->guix-package): Make default repo a list of strings. Update docstring. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import: Properly report "no specific version" errors.Ludovic Courtès2023-04-08
| | | | | | | | | | * guix/import/cpan.scm (latest-release): Use 'raise' instead of 'error'. * guix/import/elpa.scm (latest-release): Likewise. * guix/import/hackage.scm (latest-release): Likewise. * guix/import/minetest.scm (latest-minetest-release): Likewise. * guix/import/opam.scm (latest-release): Likewise. * guix/import/stackage.scm (latest-lts-release): Likewise.
* guix: Strip #:use-module lists.Ludovic Courtès2023-03-13
| | | | | | | | | | | | This was obtained by setting up this environment: guix shell -D guix --with-input=guile@3.0.9=guile-next \ --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2 -- make -j5 then adding 'unused-module' to (@@ (guix build compiler) %warnings), building, and checking all the "unused module" warnings and removing those that were definitely unused.
* import: opam: Do not crash when description is missing.Ludovic Courtès2023-01-23
| | | | | | | | Previous 'guix import opam coccinelle' would crash due to the lack of a description. * guix/import/opam.scm (opam->guix-package): Call 'beautify-description' only when "description" metadata is available.
* import/utils: Pass all arguments through to package builder.Lars-Dominik Braun2022-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | Individual importer may have additional arguments. * guix/import/utils.scm (recursive-import): Patch all keyword arguments through to repo->guix-package. * guix/import/cran.scm (cran->guix-package): Add #:allow-other-keys. * guix/import/crate.scm (crate->guix-package): Ditto. * guix/import/egg.scm (egg->guix-package): Ditto. * guix/import/elm.scm (elm->guix-package): Ditto. * guix/import/gem.scm (gem->guix-package): Ditto. * guix/import/gnu.scm (gnu->guix-package): Ditto. * guix/import/go.scm (go-module->guix-package): Ditto. (go-module-recursive-import): Ditto. * guix/import/hackage.scm (hackage->guix-package): Ditto. (hackage-recursive-import): Ditto. * guix/import/hexpm.scm (hexpm->guix-package): Ditto. * guix/import/minetest.scm (minetest->guix-package): Ditto. (minetest-recursive-import): Ditto. * guix/import/opam.scm (opam->guix-package): Ditto. * guix/import/pypi.scm (pypi->guix-package): Ditto. * guix/import/stackage.scm (stackage->guix-package): Ditto. (stackage-recursive-import): Ditto. * guix/import/texlive.scm (texlive->guix-package): Ditto.
* import: Issue error-message if version is given.Hartmut Goebel2022-12-26
| | | | | | | | | | | | | | | | These importer don't support importing a specific version, thus the updater does neither. Issue an error message in case version is given. * guix/import/cpan.scm (latest-release), guix/import/elpa.scm (latest-release), guix/import/hackage.scm (latest-release), guix/import/minetest.scm (latest-minetest-release), guix/import/opam.scm (latest-release): Add #:version argument, issue error if version is given. * guix/import/cran.scm (latest-cran-release): Same. (latest-bioconductor-release) Same. <version>: rename to <latest-version>. * guix/import/stackage.scm (latest-lts-release): For each generated updater, add #:version argument and issue error if version is given.
* upstream-updater: Rename record field.Hartmut Goebel2022-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next commits will make the functions, which are currently importing the latest version of a package, change into importing the latest or a given version of the package (for those updaters supporting specifying a version). Thus the name ‘latest‘ is no longer appropriate. * guix/upstream.scm (upstream-updater) Rename field [latest] to [import]. (lookup-updater, package-latest-release) Adjust fieldname accordingly. * guix/gnu-maintenance.scm (%gnu-updater, %gnu-ftp-updater, %savannah-updater, %sourceforge-updater, %xorg-updater, %kernel.org-updater, %generic-html-updater), guix/import/cpan.scm (%cpan-updater), guix/import/cran.scm (%cran-updater, %bioconductor-updater), guix/import/crate.scm (%crate-updater), guix/import/egg.scm (%egg-updater), guix/import/elpa.scm (%elpa-updater), guix/import/gem.scm (%gem-updater), guix/import/git.scm (%generic-git-updater), guix/import/github.scm (%github-updater), guix/import/gnome.scm (%gnome-updater), guix/import/hackage.scm (%hackage-updater), guix/import/hexpm.scm (%hexpm-updater), guix/import/kde.scm (%kde-updater), guix/import/launchpad.scm (%launchpad-updater), guix/import/minetest.scm (%minetest-updater), guix/import/opam.scm (%opam-updater), guix/import/pypi.scm (%pypi-updater), guix/import/stackage.scm (%stackage-updater), tests/import-github.scm (found-sexp) tests/transformations.scm ("options->transformation, with-latest"): Adjust fieldname accordingly.
* import: opam: Factor out source import.Julien Lepiller2022-04-11
| | | | | | | | | | This also ensures a package can be imported even when it does not specify a URL. * guix/import/opam.scm (opam->guix-source): New procedure. (opam->guix-package): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: opam: Accept tabulations.Julien Lepiller2022-04-11
| | | | | | * guix/import/opam.scm (SP, SP2): Accept tabulation as whitespace. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: utils: Harden beautify-description.Alice BRENON2022-02-08
| | | | | | | | | | | * guix/import/utils.scm (beautify-description): Handle non-string arguments. [use-modules]: Explicitly import G_ from (guix i18n) and make (guix ui) import explicit. * guix/import/opam.scm: [use-modules] Make imports explicit for module (guix import utils). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: Beautify descriptions when appropriate.Xinglu Chen2021-12-17
| | | | | | | | | | | * guix/import/elpa.scm (elpa-package->sexp) * guix/import/gnu.scm (gnu-package->sexp) * guix/import/hackage.scm (hackage-module->sexp) * guix/import/minetest.scm (make-minetest-sexp) * guix/import/opam.scm (opam->guix-package) * guix/import/pypi.scm (make-pypi-sexp): Beautify descriptions. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Merge branch 'master' into core-updates-frozenLudovic Courtès2021-11-23
|\
| * import: opam: Fix error on unknown field value.Julien Lepiller2021-11-22
| | | | | | | | | | * guix/import/opam.scm (metadata-ref): Return #f if field is present, but its content is of unknown form.
| * import: opam: Warn instead of leave when fetching fails.zimoun2021-11-19
| | | | | | | | | | | | | | * guix/import/opam.scm (opam-featch): Warn instead of leave when fetching fails. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
* | Merge branch 'master' into core-updates-frozenLudovic Courtès2021-09-07
|\|
| * 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>
* | import: opam: Emit new-style package inputs.Sarah Morgensen2021-07-20
|/ | | | | | | | | * guix/import/opam.scm (opam->guix-package): Wrap INPUTS and NATIVE-INPUTS in 'list' instead of 'quasiquote'. (dependency-list->inputs): Return a list of symbols. * tests/opam.scm ("opam->guix-package"): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix: opam: Allow for whitespace at the start of an opam file.Julien Lepiller2021-07-05
| | | | * guix/import/opam.scm (records): Accept whitespace at the beginning.
* import: opam: Generate license for package.Xinglu Chen2021-05-28
| | | | | | | | | * guix/import/opam.scm (opam->guix-package): Generate license for the ‘license’ field. * tests/opam.scm (test-opam-file): Update accordingly. ("opam->guix-package"): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* 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: 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: 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.
* git: 'update-cached-checkout' returns the commit relation.Ludovic Courtès2020-05-25
| | | | | | | | | | | * guix/git.scm (update-cached-checkout): Add #:starting-commit parameter. Call 'commit-relation' when #:starting-commit is true. Always return the relation or #f as the third value. (latest-repository-commit): Adjust accordingly. * guix/import/opam.scm (get-opam-repository): Likewise. * tests/channels.scm ("latest-channel-instances includes channel dependencies") ("latest-channel-instances excludes duplicate channel dependencies"): Update mock of 'update-cached-checkout' accordingly.
* guix: import: opam: Use a default repository.Julien Lepiller2020-03-17
| | | | | * guix/import/opam.scm (opam->guix-package): Use a default value for `repository`.
* 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.
* 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: 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: opam: Use dune-build-system when possible.Julien Lepiller2019-04-10
| | | | * guix/import/opam.scm (opam->guix-package): Detect when dune can be used.
* import: opam: Add more patterns to opam file parser.Julien Lepiller2019-04-10
| | | | | | * guix/import/opam.scm: Add more patterns to peg parser. (choice-pat choice condition-not condition-paren): New patterns. (ground-value condition-content condition-var): Update patterns.
* import: opam: Also update dune packages.Julien Lepiller2019-03-23
| | | | | * guix/import/opam.scm (opam-package?): Also accept packages that use the dune build system.
* import: opam: Work around janestreet version numbers.Julien Lepiller2019-02-05
| | | | | | | | | janestreet reversionned its packages and prefixed them with "v". Let the importer know about that and choose "v" versions first. * guix/import/opam.scm (find-latest-version): Work around version rewrite from janestreet. (opam->guix-package): Do not pass "v" to version number.
* import: opam: Replace "_" with "-" in imported names.Julien Lepiller2019-02-05
| | | | | | * guix/import/opam.scm (ocaml-name->guix-name): Replace "_" with "-". (opam->guix-packages): Add upstream name when we cannot guess it properly.
* import: opam: Fix conditions.Julien Lepiller2019-02-05
| | | | | | * guix/import/opam.scm (condition-eq, condition-neq): The first argument can be empty. * tests/opam.scm: Add test case.
* import: opam: Parse comments.Julien Lepiller2019-01-07
| | | | * guix/import/opam.scm: Add comment support in parser.
* import: opam: Add updater.Julien Lepiller2019-01-07
| | | | * guix/import/opam.scm (%opam-updater): New variable.
* 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: Update opam importer.Julien Lepiller2018-12-17
| | | | | * guix/import/opam.scm: Update importer for opam 2. * tests/opam.scm: Update tests for the opam 2 importer.
* guix: Add opam importer.Julien Lepiller2018-07-10
* guix/scripts/import.scm (importers): Add opam. * guix/scripts/import/opam.scm: New file. * guix/import/opam.scm: New file. * tests/opam.scm: New file. * Makefile.am: Add them. * doc/guix.texi (Invoking guix import): Document it.