summaryrefslogtreecommitdiff
path: root/guix/import
AgeCommit message (Collapse)Author
2020-12-04import: crate: Skip tests when Guile-Semver is missing.Ludovic Courtès
* 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.
2020-12-04import/cran: Fix calls to CRAN->GUIX-PACKAGE.Ricardo Wurmus
* guix/import/cran.scm (cran->guix-package, latest-bioconductor-release): Invoke CRAN->GUIX-PACKAGE with #:REPO keyword argument.
2020-12-02import: crate: Use existing package satisfying semver requirement.Hartmut Goebel
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.
2020-12-02import: crate: Trim version for names after left-most non-zero part.Hartmut Goebel
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.
2020-12-02import: utils: Trim patch version from names.Hartmut Goebel
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.
2020-12-02import: crate: Parameterized importing of dev dependencies.Martin Becze
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.
2020-12-02import: crate: Memorize crate->guix-package.Martin Becze
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.
2020-12-02import: crate: Use guile-semver to resolve module versions.Martin Becze
* 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>
2020-12-02import: utils: 'recursive-import' accepts an optional version parameter.Martin Becze
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>
2020-11-21lint: Add 'check-haskell-stackage' checker.Timothy Sample
* 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.
2020-11-03guix import stackage: Default to LTS version that matches GHC.Robert Vollmert
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>
2020-10-19import: crate: make-crate-sexp: Fix missing home-page handling.Christopher Baines
* guix/import/crate.scm (make-crate-sexp): Replace 'null rather than '() with the empty string for the home-page.
2020-10-19import: print: Fix deprecation warning for origin-sha256.Helio Machado
* 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>
2020-10-17import: utils: Fix license name mismatches and define CUA-OPL-1.0.Helio Machado
* 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>
2020-10-02import: opam: Report groups in syntax tree.Julien Lepiller
* guix/import/opam.scm (group-pat): Report in syntax tree. (dependency->input, dependency->native-input, dependency->name): consider the case of a group.
2020-10-01guix: opam: Fix syntax.Julien Lepiller
* guix/import/opam.scm (STRCHR, comment, choice): Fix syntax. (group-pat): Add syntax. (opam->guix-package): Suppport "archive" keyword.
2020-09-23import: Fix docstring typoes.Tobias Geerinckx-Rice
* 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.
2020-09-15import: cpan: Export cpan-release-module.Tobias Geerinckx-Rice
* guix/import/cpan.scm: Fix typo.
2020-09-08Remove (guix json) and require Guile-JSON 4.3.0+.Ludovic Courtès
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.
2020-09-01import: launchpad: Recognize more URLs.Arun Isaac
* guix/import/launchpad.scm (updated-launchpad-url): Recognize more URLs.
2020-09-01import: launchpad: Recognize the .orig.tar.gz extension.Arun Isaac
* guix/import/launchpad.scm (find-extension): Recognize the .orig.tar.gz extension.
2020-09-01import: launchpad: Handle list of source URLs correctly.Arun Isaac
* guix/import/launchpad.scm (updated-launchpad-url): Return updated URL when package has a list of URLs, not the old URL.
2020-07-25utils: Remove compatibility re-export of 'memoize'.Ludovic Courtès
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.
2020-07-24import: github: Gracefully handle projects that have disappeared.Ludovic Courtès
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.
2020-07-05import: pypi: Handle 'null instead of #nil.Arun Isaac
* guix/import/pypi.scm (non-empty-string-or-false): guile-json now returns 'null instead of #nil for null JSON values. Handle it.
2020-07-03import: Do not assume that 'package-source' returns an origin.Ludovic Courtès
* 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.
2020-07-03upstream: Define 'url-predicate' and use it.Ludovic Courtès
* 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'.
2020-06-13guix: Update to Bioconductor 3.11.Ricardo Wurmus
* guix/build-system/r.scm (bioconductor-uri): Use new URL. * guix/import/cran.scm (%bioconductor-version): Update to 3.11.
2020-06-09import: stackage: Fix typo.Tobias Geerinckx-Rice
* guix/import/stackage.scm (latest-lts-release): Fix spelling of ‘if’.
2020-06-09import: stackage: Fix typo.Marius Bakke
* guix/import/stackage.scm (latest-lts-release): Fix spelling of "included".
2020-05-25git: 'update-cached-checkout' returns the commit relation.Ludovic Courtès
* 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.
2020-05-22packages: Introduce <content-hash> and use it in <origin>.Ludovic Courtès
* guix/packages.scm (<content-hash>): New record type. (define-content-hash-constructor, build-content-hash) (content-hash): New macros. (print-content-hash): New procedure. (<origin>): Rename constructor to '%origin'. [sha256]: Remove field. [hash]: New field. Adjust users. (origin-compatibility-helper, origin): New macros. (origin-sha256): New deprecated procedure. (origin->derivation): Adjust accordingly. * tests/packages.scm ("package-source-derivation, origin, sha512"): New test. * guix/tests.scm: Hide (gcrypt hash) 'sha256' for proper syntax matching. * tests/challenge.scm: Add #:prefix for (gcrypt hash) and adjust users. * tests/derivations.scm: Likewise. * tests/store.scm: Likewise. * tests/graph.scm ("bag DAG, including origins"): Provide 'sha256' field with the right length. * gnu/packages/aspell.scm (aspell-dictionary) (aspell-dict-ca, aspell-dict-it): Use 'hash' and 'content-hash' for proper syntax matching. * gnu/packages/bash.scm (bash-patch): Rename 'sha256' to 'sha256-bv'. * gnu/packages/bootstrap.scm (bootstrap-executable): Rename 'sha256' to 'bv'. * gnu/packages/readline.scm (readline-patch): Likewise. * gnu/packages/virtualization.scm (qemu-patch): Rename 'sha256' to 'sha256-bv'. * guix/import/utils.scm: Hide (gcrypt hash) 'sha256'.
2020-05-13guix: cran: Add missing default R package.pimi
* guix/import/cran.scm (default-r-packages): Add "datasets" to the list of default R packages. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2020-05-13mailmap: Update entries for Nikita.nikita
* .mailmap: change email and name for Nikita. * Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish, gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/erlang.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile-xyz.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell-xyz.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp-xyz.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2020-04-27import: crate: Gracefully handle non-existent crates.Ludovic Courtès
Fixes <https://bugs.gnu.org/40891>. Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>. * guix/import/crate.scm (crate->guix-package): Wrap value of 'version-number' and 'version*' in (and crate ...).
2020-04-16import/print: Don't factorize URI if there's no version match.Ricardo Wurmus
* guix/import/print.scm (package->code): If FACTORIZE-URI returns just the unmodified string use that as the URI.
2020-04-16import/utils: alist->package: Include arguments.Ricardo Wurmus
* guix/import/utils.scm (alist->package): Process arguments field in input data and include it in the generated package.
2020-04-16import/json: json->code: Handle files with more than one definition.Ricardo Wurmus
* guix/import/json.scm (json->code): Convert JSON arrays to lists of package definitions. (json->scheme-file): Write all expressions to the target file.
2020-04-16import/utils: alist->package: Ignore known inputs.Ricardo Wurmus
* guix/import/utils.scm (alist->package): Accept optional list of known inputs, which are excluded from the specification lookup. * guix/import/print.scm (package->code)[package-lists->code]: Handle inputs which are just symbols.
2020-04-16import/print: package->code: Wrap S-expression in definition.Ricardo Wurmus
* guix/import/print.scm (package->code): Return a definition, not just a package expression.
2020-04-16import/json: Use json->code.Ricardo Wurmus
* guix/import/json.scm (json->code): Export procedure. * guix/scripts/import/json.scm (guix-import-json): Use json->code.
2020-04-16import/json: Add json->scheme-file.Ricardo Wurmus
* guix/import/json.scm (json->code, json->scheme-file): New procedures.
2020-04-16import/print: package->code: Wrap build system value in module reference.Ricardo Wurmus
* guix/import/print.scm (package->code): Return build system value with corresponding module.
2020-04-16import/print: Return license with prefix.Ricardo Wurmus
* guix/import/print.scm (license->code): Prepend license: prefix.
2020-03-25import/cran: Import missing module.Ricardo Wurmus
This is a follow-up to commit b005c240bb5e436ffe9d55c2dd75c9af85aa0fdd. Reported-by: Ludovic Courtès <ludo@gnu.org> * guix/import/cran.scm: Import (guix ui) module.
2020-03-25import/cran: Support importing from Mercurial repositories.Ricardo Wurmus
* guix/import/cran.scm (download): Accept keyword #:method; add case for hg method. (fetch-description): Handle hg repository. (description->package): Add cases for hg repositories and update call of DOWNLOAD procedure. (cran->guix-package): Retry importing from Bioconductor when hg import failed.
2020-03-24import: crate: Deduplicate dependencies.Martin Becze
* guix/import/crate.scm (crate-version-dependencies): Deduplicate crate dependencies. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-17guix: import: opam: Use a default repository.Julien Lepiller
* guix/import/opam.scm (opam->guix-package): Use a default value for `repository`.
2020-03-12import: cpan: Gracefully handle missing projects.Ludovic Courtès
* guix/import/cpan.scm (cpan-fetch): Check whether 'json-fetch' returns #f.
2020-03-12import: utils: Remove 'assoc-ref*'.Ludovic Courtès
* guix/import/utils.scm (assoc-ref*): Remove.