1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

33 Commits

Author SHA1 Message Date
Ludovic Courtès
78ddf62bfe style: git-source: Handle more URLs.
* 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>
2026-03-10 22:53:54 +01:00
jgart
f2ead3989e guix: import: cpan: Fill in description field in template.
* 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>
2026-03-08 11:04:33 -04:00
Ricardo Wurmus
ee0a9f27b9 import/cran: Fix import of packages in single quotes.
* 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
2026-03-07 11:57:24 +01:00
Nicolas Graves
483ee41756 import: pypi: Fix tests.
* 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>
2026-02-07 12:28:41 +01:00
Nicolas Graves
5e22e9b3aa import: pypi: Ignore pypi-ignored-inputs.
* guix/import/pypi.scm (pypi-ignored-inputs): New variable.
  (compute-inputs): Use it.

* tests/pypi.scm (parse-requires.txt): Add ignored input to test the
  feature.

* guix/lint.scm (check-inputs-should-be-native): Adapt list.
  (check-inputs-should-not-be-an-input-at-all): Use pypi-ignored-list.

Change-Id: I297793b71f9ffdfbe7cc4e883777f8823941adf0
Modified-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07 12:28:37 +01:00
Danny Milosavljevic
811ee1ab9f import: nuget: Add tests and documentation.
* guix/import/nuget.scm: Prevent optimizing small functions away completely.
* tests/import/nuget.scm: New file.
* doc/guix.texi (nuget): Document it.
* Makefile.am (SCM_TESTS): Add reference to it.

Fixes: guix/guix#5483
Change-Id: Id58932fe404a11a03e61a91d3b6177b39548f1bc
2026-01-19 19:21:52 +01:00
Hilton Chain
01b97dff35 import: crate: Generate comments with ‘TODO REVIEW:’ prefix.
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
2026-01-18 10:13:38 +01:00
Ludovic Courtès
812fc780d4 tests: Use ‘https’ for ‘home-page’ in ‘guix import pypi’ tests.
Fixes a regression introduced in d66e9698a1.

* tests/import/pypi.scm ("pypi->guix-package, no wheel")
("pypi->guix-package, no wheel, no requires.txt, but pyproject.toml")
("pypi->guix-package, no wheel, but requires.txt and pyproject.toml")
("pypi->guix-package, no requires.txt, but wheel.")
("pypi->guix-package, no usable requirement file, no wheel.")
("pypi->guix-package, package name contains \"-\" followed by digits"): Change
‘home-page’ to ‘https://’.

Fixes: guix/guix#4646
Reported-by: Rutherther <rutherther@ditigal.xyz>
Change-Id: Id3ddac832d9688f2eb8a055c13f62a9642a20766
2025-12-13 23:14:27 +01:00
Ricardo Wurmus
b215cb2027 import/cran: Detect library references in "check_installed".
* guix/import/cran.scm (import-pattern): Add case for "check_installed".
* tests/import/cran.scm: Add test.

Change-Id: Id69371158eecaeb371056e6954a3109687346c22
2025-11-29 12:19:09 +01:00
Ricardo Wurmus
ad87b718ed import/cran: Reduce false positives in extracting imports.
* tests/import/cran.scm: Add tests for extract-imports.
* guix/import/cran.scm (extract-imports): New procedure, extracted from...
(needed-test-inputs-in-directory): ...this procedure, which now uses it.
(import-pattern): Update regex pattern.

Change-Id: I07ac3f685ff08a0fa7da3c25cf1f63fbca18b95f
2025-11-29 12:19:08 +01:00
Rutherther
d5b980cfa1 gnu: Remove store path occurrences.
When running `make dist`, it is checked that there are no store paths in
the resulting dist folder. Specifically through the
`assert-no-store-file-names` target.

I think that this target makes sense and this commit has workarounds for
currently embedded store paths. Two of those are comments. Maybe the
target could be changed to ignore those in the future. But the hash is
not important, so just replace it with <hash>.

As for crate tests, I decided to split the string instead of removing
it, although it seems to me it might safely be removed, but I am not
completely sure about the intent here.

* gnu/packages/astronomy.scm (python-jplephem-2.22): Remove store hash
from comment.
* gnu/packages/golang-build.scm (golang-org-x-exp): Likewise.
* tests/import/crate.scm (temp-file): Split store path's hash.

Change-Id: I709f29a9dfab626d194c41d12e53e0380a148217
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-22 15:32:22 +00:00
Nicolas Graves
6aaed933bf import: utils: Add generate-git-source procedure.
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>
2025-10-24 16:42:53 +02:00
Nicolas Graves
438a003051 import: utils: Fix default-git-error.
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>
2025-10-24 16:42:53 +02:00
Nicolas Graves
3fa75fd152 import: gem: Move tests to tests/import/gem.scm.
Follow-up forgotten in 94df3e6f28.

* tests/gem.scm: Move to tests/import/gem.scm.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-08 10:57:00 +02:00
Nicolas Graves
1dab0f01bb import: utils: Move tests to tests/import/utils.scm.
* tests/utils.scm: Move to tests/import/utils.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:17 +02:00
Nicolas Graves
12e6d3b48f import: npm-binary: Move tests to tests/import/npm-binary.scm.
* tests/npm-binary.scm: Move to tests/import/npm-binary.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:17 +02:00
Nicolas Graves
a14df09097 import: composer: Move tests to tests/import/composer.scm.
* tests/composer.scm: Move to tests/import/composer.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:17 +02:00
Nicolas Graves
a34376aa71 import: texlive: Move tests to tests/import/texlive.scm.
* tests/texlive.scm: Move to tests/import/texlive.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
0dba512d86 import: luanti: Move tests to tests/import/luanti.scm.
* tests/luanti.scm: Move to tests/import/luanti.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
15b351691e import: github: Move tests to tests/import/github.scm.
* tests/import-github.scm: Move to tests/import/github.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
16c08ac5d8 import: print: Move tests to tests/import/print.scm.
* tests/print.scm: Move to tests/import/print.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
090d574dbf import: hexpm: Move tests to tests/import/hexpm.scm.
* tests/hexpm.scm: Move to tests/import/hexpm.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
5507b1bfc0 import: opam: Move tests to tests/import/opam.scm.
* tests/opam.scm: Move to tests/import/opam.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
fc905a5a69 import: elpa: Move tests to tests/import/elpa.scm.
* tests/elpa.scm: Move to tests/import/elpa.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
7a41349bed import: cran: Move tests to tests/import/cran.scm.
* tests/cran.scm: Move to tests/import/cran.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
02f1ff69c6 import: git: Move tests to tests/import/git.scm.
* tests/import-git.scm: Move to tests/import/git.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:15 +02:00
Nicolas Graves
9bf4e572df import: elm: Move tests to tests/import/elm.scm.
* tests/elm.scm: Move to tests/import/elm.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
bf468f4b70 import: egg: Move tests to tests/import/egg.scm.
* tests/egg.scm: Move to tests/import/egg.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
d4fda72d8f import: go: Move tests to tests/import/go.scm.
* tests/go.scm: Move to tests/import/go.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
fbc1da99ea import: crate: Move tests to tests/import/crate.scm.
* tests/crate.scm: Move to tests/import/crate.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
d950c929e9 import: cpan: Move tests to tests/import/cpan.scm.
* tests/cpan.scm: Move to tests/import/cpan.scm.
* gnu/packages/admin.scm (ansible): Update comment.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
5cf0daa657 import: hackage: Move tests to tests/import/hackage.scm.
* tests/hackage.scm: Move to tests/import/hackage.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00
Nicolas Graves
f1a3bf940c import: pypi: Move tests to tests/import/pypi.scm
* tests/pypi.scm: Move to tests/import/pypi.scm
* CODEOWNERS: Refresh it.
* Makefile.am: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00