With SYSTEM* we see a file descriptor leak. See the discussion at
<https://codeberg.org/guix-science/guix-cran-scripts/issues/5>. There is no
such leak when using SPAWN.
* guix/import/cran.scm (fetch-description-from-tarball, source->dependencies):
Use SPAWN instead of SYSTEM*.
Change-Id: Idb13f775317e6d5d426f8675e169f0ebbe246fe2
Previously version lists containing zeroes would be rejected; furthermore, #f
would be returned even though callers expect a string:
$ guix refresh emacs-counsel
guix refresh: Package version for counsel contains non numeric part.
Backtrace:
[…]
In guix/utils.scm:
925:32 5 (_ #f "0.15.1")
In unknown file:
4 (string->pointer #f #<undefined>)
[…]
guix/ui.scm:920:18: In procedure string->pointer: Wrong type argument in position 1 (expecting string): #f
* guix/import/elpa.scm (elpa-version->string): Accept zeroes in
‘elpa-version’. Raise an error instead of returning #f on failure. Clarify
error messages.
Change-Id: I1ab1d6892b434747d91e9090bb5f2f3c93f1ee92
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7484
elpa-version->string construct the version (needed later to construct the full
package name to fetch the archive...) from the version numbers given as a list
from archive-contents. This list representation is documented in emacs's
version-to-list and version-regexp-alist docstrings.
In these list, A negative integer specify a non-numeric part of a
version. Different non-numeric may lead to the same negative
integer (e.g. 1.2.CVS, 1.2cvs, 1.2_Cvs, ...).
If there is a negative integer, we need to gather more information because the
list version present in archive-contents is not enough to reconstruct the
archive address.
We parse the ATOM feed at elpa.gnu.org/devel/PACKAGE.xml
Tested on all packages. only loc-changes does not have an ATOM feed.
* guix/import/elpa.scm (elpa-version->string): New repo and name arguments,
use version-from-elpa-devel-feed if needed.
(fetch-elpa-package): Upgrade elpa-version->string call.
(latest-release): Same.
(version-from-elpa-devel-feed): New function.
Change-Id: Ic446d81593d9e6422c20a1ac427438e540e963b0
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
* guix/import/utils.scm (tarball-url->git-repository-url): New procedure.
* guix/scripts/style.scm (url-fetch->git-fetch)[transform-source]: Add
‘repository-url’ parameter.
Use ‘tarball-url->git-repository-url’ when ‘home-page’ is not a Git URL.
(transform-to-git-fetch): Rename ‘home-page’ to ‘repository-url’.
* tests/import/utils.scm ("tarball-url->git-repository-url, guile"): New test.
* tests/style.scm ("url-fetch->git-fetch, mirror:// URL"): New test.
Change-Id: I4f8ca7c67a58f917d69380678b62c00962b0f9cd
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/import/cpan.scm (cpan-module->sexp): Fill in description field in
template.
* tests/import/cpan.scm (test-source): Update test to account for change in
description text.
Change-Id: I3bc3e4c2cc90f7a1f1f0d56e9213b6a1d0b8e841
Signed-off-by: jgart <jgart@dismail.de>
* guix/import/cran.scm (cran-package-propagated-inputs): Replace lset-union
with actual sets, because the former does not remove duplicates of its
arguments.
Change-Id: I84c57c2426aef656bdd20e30e65b510e27603a64
* guix/import/cran.scm (import-pattern): Also match on single quotes.
(needed-vignettes-inputs-in-directory): Use EXTRACT-IMPORTS.
* tests/import/cran.scm: Add test.
Change-Id: Ie69027992519bd8d886860346f4a359514d8e822
* guix/import/pypi.scm (python->package-name): Add a special case for
the python maturin package so it maps to the Guix maturin package.
Change-Id: Ie8c294035541247703eb3f71d4233f365338385d
* guix/import/pypi.scm (unzip-command): Use invoke instead of
system*.
(read-wheel-metadata): Adapt accordingly.
(guess-requirements-from-wheel): Improve readability.
* tests/import/pypi.scm (parse-wheel-metadata): Add test (used to
isolate the issue in another test).
(pypi->guix-package, no wheel): Remove python-wheel from the result.
(pypi->guix-package, no usable requirement file, no wheel.): Likewise.
(pypi->guix-package, package name contains \"-\" followed by digits):
Likewise.
(package-latest-release): Likewise.
(pypi->guix-package, no requires.txt, but wheel): Likewise. Also
improve readability.
Change-Id: I49e6ae549437a068acd85fa0f13471bc0af5a399
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/import/cran.scm (maybe-arguments): Do not overwrite %STANDARD-PHASES
with the definition from MINIFY-BUILD-SYSTEM.
Change-Id: I6e4cd64575ea029665db0d3b3aecdea38c41fe9d
Fixes <https://issues.guix.gnu.org/75458>.
Fixes a bug whereby bootloader, image, platform, etc. modules would be
searched for in locations other than the current profile, possibly leading to
incompatible files being loaded. More generally, this bug would break
statelessness: depending on what happens to be available in $GUILE_LOAD_PATH,
some modules would or would not be loaded.
* guix/describe.scm (modules-from-current-profile): New procedure.
* gnu/bootloader.scm (bootloader-modules): Use it instead of ‘all-modules’.
* gnu/system/image.scm (image-modules): Likewise.
(not-config?): Rename to…
(neither-config-nor-git?): … this, and add (guix git). Adjust users.
* guix/import/utils.scm (build-system-modules): Likewise.
* guix/platform.scm (platform-modules): Likewise.
* guix/upstream.scm (importer-modules): Likewise.
Change-Id: I8ac55a5bcdf54990665c70d0aa558b9b2c2548d4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4859
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
This distinguishes them from manually added ones. When committing changes,
these ‘TODO REVIEW’ comments should be addressed and removed first.
If you're working with Rust packaging, please update your local Guix to this
commit to apply the change.
* guix/import/crate.scm (cargo-lock->expressions): Generate comments with
‘TODO REVIEW:’ prefix.
* tests/import/crate.scm ("crate-lockfile-import"): Don't check the exact
comment string.
* doc/guix-cookbook.texi (Common Workflow for Rust Packaging),
* gnu/packages/rust-crates.scm: Adjust accordingly.
Change-Id: I76b914b49be46d04cc61b101b6bc9e31cadb7f07
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Merges: #4567
This distinguishes them from manually added ones. When committing changes,
these ‘TODO REVIEW’ comments should be addressed and removed first.
If you're working with Rust packaging, please update your local Guix to this
commit to apply the change.
* guix/import/crate.scm (cargo-lock->expressions): Generate comments with
‘TODO REVIEW:’ prefix.
* tests/import/crate.scm ("crate-lockfile-import"): Don't check the exact
comment string.
* doc/guix-cookbook.texi (Common Workflow for Rust Packaging),
* gnu/packages/rust-crates.scm: Adjust accordingly.
Change-Id: I76b914b49be46d04cc61b101b6bc9e31cadb7f07
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Merges: #4567
* guix/import/elpa.scm (melpa-recipe->maybe-arguments)[glob->regexp]:
Treat '*' as zero or more characters.
Merges guix/guix!5408
Change-Id: I1630d17c7693a30110551e91405e1580d1e8a477
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
* guix/build-system/r.scm (bioconductor-uri): Update to 3.22.
* guix/import/cran.scm (%bioconductor-version): Set to 3.22.
Change-Id: I53c6b0d1ddc37faad90492103b7d02c210f945d7
A lot of python imports are generated with a #f home-page, despite the
license being visible on PyPi. Fix this.
* guix/import/pypi.scm
(<project-info>): Add fields project-info-project-home-page and
project-info-project-source.
(make-pypi-sexp): Use them.
Change-Id: I661ffffc2aca37b4d42f7b7e3faa5537171523d4
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/import/pypi.scm (make-pypi-sexp): Improve home-page handling to
enforce an https:// prefix, even in the case where upstream uses http://.
Change-Id: Iff4164a5f1ddc96af67ca7b092d3b9bbd6e2a827
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
A lot of python packages are generated with an #f license, despite the
license being on pypi and in metadata. Fix this.
* gnu/import/pypi.scm (find-license): Add procedure.
(make-pypi-sexp): Use procedure find-license.
Change-Id: Ia8e476f85a4b9193a0634de7a9bd66e40dcf2d44
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
When using `guix import -i ... -f .../Cargo.lock`, lookup-cargo-inputs
generation fails if url has git.sr.ht source, since the url for username
contains ~
Ex. https://git.sr.ht/~hitwright/scheduler_common
* guix/import/crate/cargo-lock.scm: Add "~" to crate source pattern.
Change-Id: I40f0bb747594f817f3d26123328e8716e5bef5f4
Signed-off-by: Hilton Chain <hako@ultrarare.space>
This procedure tries to generate a <origin> sexp from a single url and
version.
* guix/import/utils.scm (generate-git-source): Add procedure.
* tests/import/utils.scm: Add tests for generate-git-source.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This function was missing one argument.
* guix/import/utils.scm (default-git-error): Add and document location
argument.
* tests/import/utils.scm: Add tests for default-git-error.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>