summaryrefslogtreecommitdiff
path: root/guix/import
Commit message (Collapse)AuthorAge
* 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: hackage: Filter upper/mixed case dependencies too.Lars-Dominik Braun2022-06-06
| | | | | | | | | * guix/import/hackage.scm (filter-dependencies): Convert OWN-NAMES to lowercase before filtering. (hackage-module->sexp): Remove #f from OWN-NAMES, which is used for unnamed (default) libraries. * tests/hackage.scm (test-cabal-internal-library-ignored): Add mismatched uppercase letters.
* import: hackage: Filter internal libraries from inputs and native-inputs.Lars-Dominik Braun2022-06-06
| | | | | | | | | | | Fixes <https://issues.guix.gnu.org/54760>. * guix/import/hackage.scm (filter-dependencies): Support multiple OWN-NAMES. (hackage-module->sexp): Filter OWN-NAMES from HACKAGE-DEPENDENCIES and HACKAGE-NATIVE-DEPENDENCIES. * tests/hackage.scm (test-cabal-internal-library-ignored): New variable. ("hackage->guix-package test internal libraries are ignored"): New testcase.
* import: cabal: Support library namesLars-Dominik Braun2022-06-06
| | | | | | | | | | | | | | * guix/import/cabal.scm (make-cabal-parser): Add name to section. (is-lib): Add optional name to regular expression. (lex-rx-res): Support selecting different substring. (lex-lib): Match 2nd substring from IS-LIB. (lex-line): Adapt to changes for lex-lib. (cabal-library): Add name field and export CABAL-LIBRARY-NAME. (eval): Remove special case for 'library, which is not required any more. (make-cabal-section): Move special case for LIBRARY. * tests/hackage.scm (test-read-cabal-library-name): New variable. ("read-cabal test 1"): Adapt testcase to changed internal structure. ("read-cabal test: library name"): New testcase.
* import: cabal: Allow curly bracket before else statement.Lars-Dominik Braun2022-06-06
| | | | | | | * guix/import/cabal.scm (is-else): Turn into procedure. (lex-line): Move IS-ELSE… (lex-word): …here. * tests/hackage.scm (test-cabal-elif-brackets): Extend testcase.
* import: cabal: Allow properties without space between key and value.Lars-Dominik Braun2022-06-06
| | | | | | * guix/import/cabal.scm (lex-word): Add colon to delimiters. * tests/hackage.scm (test-cabal-property-no-space): New variable. ("hackage->guix-package test properties without space"): New test.
* import: cabal: Allow curly brackets in more positions.Lars-Dominik Braun2022-06-06
| | | | | | | | * guix/import/cabal.scm (is-layout-property): Do not expect end of line. (lex-layout-property): Check for newline. (lex-property): Stop reading on closing curly bracket. * tests/hackage.scm (test-read-cabal-2): New variable. ("read-cabal test: if brackets on the same line"): New test.
* import: cabal: Support elif statement.Lars-Dominik Braun2022-06-06
| | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/54752>. * guix/import/cabal.scm (make-cabal-parser): Replace if-then-else grammar case with elif-else, modify if-then accordingly. (is-elif): New procedure. (lex-elif): Likewise. (is-id): Add elif keyword. (lex-word): Add test for elif. * tests/hackage.scm (test-cabal-if): New variale. (test-cabal-else): Likewise. (test-cabal-elif): Likewise. (test-cabal-elif-brackets): Likewise. (match-ghc-elif): Likewise. ("hackage->guix-package test lonely if statement", "hackage->guix-package test else statement", "hackage->guix-package test elif statement", "hackage->guix-package test elif statement with brackets"): New tests.
* import: minetest: Fix typo.Tobias Geerinckx-Rice2022-05-29
| | | | * guix/import/minetest.scm (important-dependencies): Fix ‘choosen’ typo.
* guix: Upgrade to Bioconductor 3.15.Ricardo Wurmus2022-05-28
| | | | | | * guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to 3.15. * guix/import/cran.scm (%bioconductor-version): Same.
* licenses: Add Expat No Attribution license.Kyle Meyer2022-05-23
| | | | | | | * guix/licenses.scm (expat-0): New variable. * guix/import/utils.scm (spdx-string->license): Add MIT-0. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: utils: Update list of SPDX licenses.Nicolas Graves2022-05-23
| | | | | | * guix/import/utils.scm (spdx-string->license): Update. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* 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>
* import: json: Accept '#:http-fetch' in 'json-fetch'.Philip McGrath2022-05-22
| | | | | | | | For example, supplying 'http-fetch/cached' would enable caching. * guix/import/json.scm (json-fetch): Add '#:http-fetch' argument. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* 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: pypi: Use new style for the conditional unzip input.Maxim Cournoyer2022-04-04
| | | | * guix/import/pypi.scm (make-pypi-sexp)<unzip>: Use new style.
* import: hackage: Use SRFI-71 instead of SRFI-11.Ludovic Courtès2022-03-07
| | | | | | | * guix/import/hackage.scm (read-cabal-and-hash) (hackage-fetch-and-hash, hackage-fetch) (hackage->guix-package): Use 'let' and 'let*' instead of 'let-values' and 'let*-values'.
* import: hackage: Avoid pointless use of 'compose'.Ludovic Courtès2022-03-07
| | | | | | * guix/import/hackage.scm (hackage-module->sexp): Unroll pointless calls to 'compose'. (hackage->guix-package): Likewise.
* import: cran: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/pypi.scm (cran->guix-package): Return 'values'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: elpa: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/elpa.scm (elpa->guix-package): Return values. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: hackage: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/hackage.scm (hackage->guix-package): Return 'values'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: pypi: Return multiple values for unknown packages.zimoun2022-03-07
| | | | | | | | | Partly fixes <https://bugs.gnu.org/44115>. * guix/import/pypi.scm (pypi->guix-package): Return two values when PROJECT is false. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import: pypi: Gracefully handle missing project home page.Ludovic Courtès2022-03-07
| | | | | | | | | Fixes <https://issues.guix.gnu.org/54259>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/import/pypi.scm (pypi->guix-package): Upon 'missing-source-error?', raise '&fix-hint' only if 'project-info-home-page' returns a non-empty string.
* import: github: Reuse HTTP connection for the /tags URL fallback.Ludovic Courtès2022-03-06
| | | | | | | * guix/import/github.scm (fetch-releases-or-tags): Call 'open-connection-for-uri' and reuse the same connection for the two 'http-fetch' calls. * .dir-locals.el (scheme-mode): Add 'call-with-port'.
* import: github: Gracefully handle rate limit exhaustion.Ludovic Courtès2022-03-06
| | | | | | | | | | | | | | | | | | | | Previously, 'guix refresh' would literally crash when the rate limit was reached due to the call to 'error'. With this change, the updater notices when the rate limit is reached and it turns itself into a no-op until the rate limit has been reset. When running "guix refresh" (with no arguments), the 'github' updater gets used until the rate limit has been reached, after which "guix refresh" automatically picks up the next valid updater, typically 'generic-git'. * guix/import/github.scm (fetch-releases-or-tags): Use 'http-fetch' directly instead of 'json-fetch' to let 'http-get-error?' exceptions through. Handle 403 errors with an 'X-RateLimit-Remaining' header. (%rate-limit-reset-time): New variable. (update-rate-limit-reset-time!, request-rate-limit-reached?): New procedures. (latest-released-version): Remove calls to 'error'.
* 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: pypi: Display a hint upon "no source release" errors.Ludovic Courtès2022-02-02
| | | | | | | Fixes <https://issues.guix.gnu.org/49083>. * guix/import/pypi.scm (pypi->guix-package): Upon 'missing-source-error?', raise a compound condition with a hint.
* import: pypi: Convert hyphens to underscores in PyPI URLs if needed.Vivien Kraus2022-01-26
| | | | | | | | | | | | * guix/import/pypi.scm (find-project-url): New function. (make-pypi-sexp): Use find-project-url. * tests/pypi.scm (foo-json): New procedure. (test-json-1, test-json-2): Define in terms of it. ("find-project-url, with numpy", "find-project-url, uWSGI"): ("find-project-url, flake8-array-spacing") ("find-project-url, foo/goo"): New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* import/texlive: Add helper to check installed files.Ricardo Wurmus2022-01-20
| | | | * guix/import/texlive.scm (files-differ?): New procedure.
* guix: import/cran: Cast booleans.Ricardo Wurmus2022-01-20
| | | | | | | This is needed due to a change in file-hash*. * guix/import/cran.scm (description->package): Ensure that GIT? and HG? are booleans.
* import/github: Test it.Maxime Devos2022-01-16
| | | | | | | | | | * Makefile.am (SCM_TESTS): Register new tests. * guix/import/github.scm (%github-api): New variable. (fetch-releases-or-tags): Use the new variable. * tests/import-github.scm: New file with tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import/github: Return <git-reference> objects for git-fetch origins.Maxime Devos2022-01-16
| | | | | | | | | * guix/import/github.scm (latest-released-version): Also return the tag. (latest-release): Use this information to return <git-reference> objects when appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: texlive: Remove labels from 'propagated-inputs' field.Ludovic Courtès2022-01-13
| | | | | | * guix/import/texlive.scm (tlpdb->package): Remove labels from 'propagated-inputs' field. * tests/texlive.scm ("texlive->guix-package"): Adjust accordingly.
* import: texlive: Remove more specific entries with the same prefix.Ricardo Wurmus2022-01-10
| | | | | | * guix/import/texlive.scm (files->directories): Ensure that any more specific directory is removed if a parent directory is in the list of provided locations.
* import: go: Correctly report diagnostics upon version mismatch.Ludovic Courtès2022-01-09
| | | | | | | * guix/import/go.scm (strip-v-prefix, ensure-v-prefix) (validate-version): New procedures. (go-module->guix-package): Use 'validate-version' when defining 'version*'. Remove 'else' clause in SRFI-34 guard.
* upstream: Support updating and fetching 'git-fetch' origins.Sarah Morgensen2022-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | Updaters need to be modified to return 'git-reference' objects. This patch modifies the 'generic-git' and 'minetest' updater, but others might need to be modified as well. * guix/git.scm (git-reference->git-checkout): New procedure. * guix/upstream.scm (package-update/git-fetch): New procedure. (<upstream-source>)[urls]: Document it can be a 'git-reference'. (%method-updates): Add 'git-fetch' mapping. (update-package-source): Support 'git-reference' sources. (upstream-source-compiler/url-fetch): Split off from ... (upstream-source-compiler): ... this, and call ... (upstream-source-compiler/git-fetch): ... this new procedure if the URL field contains a 'git-reference'. * guix/import/git.scm (latest-git-tag-version): Always return two values and document that the tag is returned as well. (latest-git-release)[urls]: Use the 'git-reference' instead of the repository URL. * guix/import/minetest.scm (latest-minetest-release)[urls]: Don't wrap the 'git-reference' in a list. * tests/minetest.scm (upstream-source->sexp): Adjust to new convention. Co-authored-by: Maxime Devos <maximedevos@telenet.be> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: Factorize file hashing.Sarah Morgensen2022-01-06
| | | | | | | | | | | | | * guix/import/cran.scm (vcs-file?, file-hash): Remove procedures. (description->package): Use 'file-hash*' instead. * guix/import/elpa.scm (vcs-file?, file-hash): Remove procedures. (git-repository->origin, elpa-package->sexp): Use 'file-hash* instead'. * guix/import/go.scm (vcs-file?, file-hash): Remove procedures. (git-checkout-hash): Use 'file-hash*' instead. * guix/import/minetest.scm (file-hash): Remove procedure. (make-minetest-sexp): Use 'file-hash*' instead. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: elpa: Also check NonGNU ELPA for updates.Xinglu Chen2022-01-05
| | | | | | | | | | | * guix/import/elpa.scm (latest-release): Determine the repository based on the URL of the source. (package-from-gnu.org?): Rename to ... (elpa-repository): ...this; memoize. (package-from-elpa-repository?): New procedure. (%elpa-updater): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: elpa: Support ‘upstream-name’ property.Xinglu Chen2021-12-18
| | | | | | | | | * guix/import/elpa.scm: (guix-package->elpa-name): New procedure. (latest-release): Use it. * tests/elpa.scm ("guix-package->elpa-name: without 'upstream-name' property") ("guix-package->elpa-name: with 'upstream-name' property"): Test it. 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>
* import: utils: Wrap lines in description.Xinglu Chen2021-12-17
| | | | | | | * guix/import/utils.scm (beautify-description): Use ‘fill-paragraph’; add optional ‘length’ argument. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus2021-12-05
|\
| * import: PyPI: Validate GPG signatures when applicable.Marius Bakke2021-12-05
| | | | | | | | | | | | * guix/import/pypi.scm (<distribution>): Fix funny typo. (latest-release): When the distribution has a cryptographic signature, pass it along to UPSTREAM-SOURCE.
| * build-system: haskell: Add ‘hackage-uri’ procedure.Xinglu Chen2021-12-01
| | | | | | | | | | | | | | | | | | * guix/build-system/haskell (hackage-uri): New procedure. * guix/import/hackage.scm (hackage-module->sexp, latest-release): Use it. * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision, match-ghc-foo-import): Adjust accordingly. 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>
| * import: texlive: Take different package database as optional argument.Ricardo Wurmus2021-11-18
| | | | | | | | | | | | * guix/import/texlive.scm (tlpdb->package): Expect PACKAGE-DATABASE as argument. (texlive->guix-package): Accept PACKAGE-DATABASE keyword.
| * import: texlive: Print inputs with labels and guixified names.Ricardo Wurmus2021-11-18
| | | | | | | | * guix/import/texlive.scm (tlpdb->package): Improve handling of propagated-inputs.