summaryrefslogtreecommitdiff
path: root/guix/import
Commit message (Collapse)AuthorAge
* import: elpa: Emit new-style package inputs.Ludovic Courtès2021-07-11
| | | | | | * guix/import/elpa.scm (elpa-package->sexp)[dependencies]: Turn into a list of symbols. [maybe-inputs]: Wrap in 'list' instead of 'quasiquote'.
* import: print: Emit new-style package inputs when possible.Ludovic Courtès2021-07-11
| | | | | | | | * guix/import/print.scm (redundant-input-labels?): New procedure. (package->code)[package-lists->code]: Rename to... [inputs->code]: ... this. When 'redundant-input-labels?' returns true, emit label-less inputs. Adjust callers to new name. * tests/print.scm (pkg-with-inputs): Adjust accordingly.
* import: cran: Emit new-style package inputs.Ludovic Courtès2021-07-11
| | | | | | | * guix/import/cran.scm (format-inputs): Emit symbols or 'specification->package' calls. (maybe-inputs): Wrap in 'list' instead of 'quasiquote'. * tests/cran.scm ("description->package"): Adjust accordingly.
* import: pypi: Emit new-style package inputs.Ludovic Courtès2021-07-11
| | | | | | | | * guix/import/pypi.scm (maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'. (compute-inputs)[requirement->package-name/sort]: Return a list of symbols. * tests/pypi.scm ("pypi->guix-package, no wheel") ("pypi->guix-package, wheels"): Adjust accordingly.
* import: egg: Edit egg->guix-package docstring.Tobias Geerinckx-Rice2021-06-21
| | | | * guix/import/egg.scm (egg->guix-package): Edit docstring.
* import: launchpad: Fix typo.Brice Waegeneire2021-06-19
| | | | | * guix/import/launchpad.scm (latest-release): Rename 'origin-github-uri' to 'origin-launchpad-uri'.
* import: launchpad: Use repository to retrieve releases.Matthew James Kraai2021-06-19
| | | | | | | | * guix/import/launchpad.scm (latest-released-version): Use repository instead of package name. (latest-release): Pass repository to latest-released-version. Signed-off-by: Brice Waegeneire <brice@waegenei.re>
* import: launchpad: Gracefully handle 404s from api.launchpad.net.Ludovic Courtès2021-06-18
| | | | | | | | Fixes <https://bugs.gnu.org/49031>. Reported by Emad Alblueshi <emad.albloushi@gmail.com>. * guix/import/launchpad.scm (latest-released-version): Gracefully handle 'json-fetch' returning #f.
* guix: Update to Bioconductor 3.13.Ricardo Wurmus2021-06-05
| | | | | * guix/build-system/r.scm (bioconductor-uri): Update version. * guix/import/cran.scm (%bioconductor-version): Update.
* import: Add CHICKEN egg importer.Xinglu Chen2021-06-03
| | | | | | | | | | | | * guix/import/egg.scm: New file. * guix/scripts/import/egg.scm: New file. * tests/egg.scm: New file. * Makefile.am (MODULES, SCM_TESTS): Register them. * po/guix/POTFILES.in: Likewise. * guix/scripts/import.scm (importers): Add egg importer. * doc/guix.texi (Invoking guix import, Invoking guix refresh): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* 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: hackage: Prefix licenses with 'license:'.Xinglu Chen2021-05-22
| | | | | | | | | * guix/import/hackage.scm (string->license): Prefix the value of the license field with ‘license:’. * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: pypi: Clarify docstring of parse-requires.txtRovanion Luckey2021-04-22
| | | | | | | * guix/import/pypi.scm (parse-requires.txt): Document the parameter more explicitly. Signed-off-by: Leo Famulari <leo@famulari.name>
* import: go: Autoload (htmlprag).Ludovic Courtès2021-04-23
| | | | | | | Fixes <https://bugs.gnu.org/47924>. Reported by Carl Dong <contact@carldong.me>. * guix/import/go.scm: Autoload (htmlprag).
* import: go: Do not set '%strict-tokenizer?' from the top level.Ludovic Courtès2021-04-23
| | | | | | | | | | This avoids interference with other users of (htmlprag) and makes the intent clearer. * guix/import/go.scm <top level>: Remove call to '%strict-tokenizer?'. (go-package-licenses, go-package-description) (go-package-synopsis, fetch-module-meta-data): Pass #:strict? #t to 'html->sxml'.
* import: Remove Nix importer.Ludovic Courtès2021-04-20
| | | | | | | | | | | | | | | | This importer has suffered from bitrot and no longer works with current Nix and Nixpkgs. See <https://bugs.gnu.org/32339> and <https://bugs.gnu.org/36255>. * guix/import/snix.scm, guix/scripts/import/nix.scm, tests/snix.scm: Remove. * Makefile.am (MODULES, SCM_TESTS): Remove them. * guix/scripts/import.scm (importers): Remove "nix". * build-aux/test-env.in: Remove NIXPKGS variable. * configure.ac: Remove '--with-nixpkgs' option. * doc/guix.texi (Invoking guix import): Remove bit about "guix import nix". * etc/completion/fish/guix.fish: Likewise.
* import: go: Append version to symbol name in the pinned version mode.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | This allows importing packages with complicated version specific dependency chains without the package symbol names colliding. * doc/guix.texi (Invoking guix import): Document the --pin-versions option. Mention that a specific version can be imported. Remove the experimental warning. * guix/import/go.scm (go-module->guix-package-name)[version]: Add optional argument. Rewrite the character translation in terms of string-map. (go-module->guix-package): Conditionally use dependencies whose symbol include their version, based no the value of the PIN-VERSIONS? argument. * guix/import/utils.scm (package->definition): Add a new case where the full version string is appended to the package symbol. * guix/scripts/import.scm (guix-import): Correctly print forms starting with '(define-public [...]'. * guix/scripts/import/go.scm (guix-import-go): Conditionally include the version in the package symbols defined.
* import: go: Add an option to use pinned versions.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ability to pin versions is handy when having to deal to packages that bootstrap themselves through a chain of former versions. Not using pinned versions in these case could introduce dependency cycles. * guix/build-system/go.scm (guix) (%go-version-rx): Rename to... (%go-pseudo-version-rx): ... this. Simplify the regular expression, which in turns makes it more robust. * guix/build-system/go.scm (go-version->git-ref): Adjust following the above rename. (go-pseudo-version?): New predicate. (go-module-latest-version): Rename to ... (go-module-version-string): ... this. Rename goproxy-url argument to just goproxy. Add a VERSION keyword argument, update docstring and adjust to have it used. (go-module-available-versions): New procedure. (%go.mod-require-directive-rx): Document regexp. (parse-go.mod): Harmonize the way dependencies are recorded to a list of lists rather than a list of pairs, as done for other importers. Rewrite to directly pass multiple values rather than a record object. Filter the replaced modules in a functional style. (go-module->guix-package): Add docstring. [version, pin-versions?]: New arguments. Rename the GOPROXY-URL argument to GOPROXY. Adjust to the new returned value of fetch-go.mod, which is a string. Fail when the provided version doesn't exist. Return a list dependencies and their versions when in pinned versions mode, else just the dependencies. (go-module-recursive-import)[version, pin-versions?]: New arguments. Honor the new arguments and guard against network errors. * guix/scripts/import/go.scm (%default-options): Register a default value for the goproxy argument. (show-help): Document that a version can be specified. Remove the --version argument and add a --pin-versions argument. (%options)[version]: Remove option. [pin-versions]: Add option. (guix-import-go): Adjust so the version provided from the module name is honored, along the new pin-versions? argument. * tests/go.scm: Adjust and add new tests.
* import: go: Improve synopsis and description parsing.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | | | | * guix/import/go.scm (%strict-tokenizer?): Set parameter to #t. (go-path-escape): Redefine to prevent inlining. (http-get*): Replace by ... (http-fetch*): this ... (json-fetch*): New procedure. (go.pkg.dev-info): Use http-fetch*. (go-package-licenses): Rewrite in terms of go.pkg.dev-info. (go-package-description): Likewise. (go-package-synopsis): Likewise. (fetch-go.mod): Use the memoized http-fetch*. (parse-go.mod): Adjust to receive content as a string. (fetch-module-meta-data): Adjust to use http-fetch*. (go-module->guix-package): Adjust to the modified fetch-go.mod return value. [inputs]: Use propagated inputs, which is the most common situations for Go libraries. [description]: Beautify description. [licenses]: Do no check for #f. The result of the license parsing is always a list. * tests/go.scm: Adjust following above changes.
* import: utils: Refactor maybe-inputs and add maybe-propagated-inputs.Maxim Cournoyer2021-04-09
| | | | | | | * guix/import/utils.scm (maybe-inputs)[type]: New argument. Update docstring. The argument is used to derive the input field name to use. (maybe-native-inputs): Adjust to use the above. (maybe-propagated-inputs): New procedure.
* import: go: Replace underscores with hyphens in package names.Xinglu Chen2021-04-04
| | | | | | | | | | As per section '16.4.2 Package Naming' in the manual, use hypens instead of underscores in package names. * guix/import/go.scm (go-module->guix-package-name): Replace underscores with hyphens. Signed-off-by: Leo Famulari <leo@famulari.name>
* licenses: Add Free Art License 1.3.Felix Gruber2021-03-29
| | | | | | | * guix/licenses.scm (lal1.3): New variable. * guix/import/utils.scm (spdx-string->license): Add LAL-1.3. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
* import: print: Improve origin method name guesswork.Ludovic Courtès2021-03-26
| | | | | | | | Fixes <https://bugs.gnu.org/47375>. Reported by Léo Le Bouter <lle-bout@zaclys.net>. * guix/import/print.scm (package->code): For METHOD, use 'variable-name' preferably, and call 'procedure-name' as a last resort.
* import: gnome: Silence URL redirect messages.Ludovic Courtès2021-03-17
| | | | | * guix/import/gnome.scm (latest-gnome-release): Pass #:log-port to 'http-fetch/cached'.
* import: gnome: Exclude version numbers that do not start with a digit.Ludovic Courtès2021-03-17
| | | | | | | Fixes a bug whereby NetworkManager would be updated to version "rc2". * guix/import/gnome.scm (latest-gnome-release)[even-minor-version?]: Change catch-all case to return #f when the first part is not a digit.
* import: go: Compute the hash of Git checkouts.Ludovic Courtès2021-03-10
| | | | | | * guix/import/go.scm (vcs-file?, file-hash, git-checkout-hash): New procedures. (vcs->origin): Use 'git-checkout-hash' in the 'git case.
* import: Add Go importer.Katherine Cox-Buday2021-03-10
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a 'guix import go' command. * doc/guix.texi (Requirements): Mention Guile-Lib dependency. (Invoking guix import): Document 'guix import go'. * gnu/packages/package-management.scm (guix)[inputs, propagated-inputs]: Add GUILE-LIB. * guix/self.scm (compiled-guix)[guile-lib]: New variable. [dependencies]: Add it. (specification->package): Add "guile-lib". * guix/build-system/go.scm (go-version->git-ref): New procedure. * guix/import/go.scm, guix/scripts/import/go.scm, tests/go.scm: New files. * guix/scripts/import.scm: Declare subcommand guix import go * po/guix/POTFILES.in: Add 'guix/scripts/import/go.scm'. * Makefile.am (MODULES): Add 'guix/import/go.scm' and 'guix/scripts/import/go.scm'. (SCM_TESTS): Add 'tests/go.scm'. Co-Authored-By: Helio Machado <0x2b3bfa0@gmail.com> Co-Authored-By: Francois Joulaud <francois.joulaud@radiofrance.com> Co-Authored-By: Maxim Cournoyer <maxim.cournoyer@gmail.com> Co-Authored-by: Ludovic Courtès <ludo@gnu.org>
* licenses: Add Zero-Clause BSD License.Alexandros Theodotou2021-03-06
| | | | | | * guix/licenses.scm (bsd-0): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import/cran: Fix detection of Fortran files.Mădălin Ionel Patrașcu2021-03-01
| | | | | | | | | | | | | This fixes a bug whereby the Guix importer considers files like .f.* to be Fortran files. The expression "\\.f(90|95)?" would match a lot of files containing ".f" although they are not Fortran files. Instead we should only consider files with this *suffix*. * guix/import/cran.scm (directory-needs-fortran?): Only check for suffixes. Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
* import: hackage: Accept optional version parameter.Xinglu Chen2021-03-01
| | | | | | | * guix/import/hackage.scm (hackage-recursive-import): Add the VERSION key. Make REPO a key. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: crate: Use repository when home-page is unavailableNicolas Goaziou2021-02-12
| | | | | | * guix/import/crate.scm (make-crate-sexp): Always use home-page, which is properly set up by the caller. (crate->guix-package): Make sure to use the repository when home-page is null.
* 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.