1
0
forked from tribes/guix
Commit Graph

866 Commits

Author SHA1 Message Date
Nicolas Goaziou 8d3cb0bfa1 guix: texlive importer: Handle additional licenses.
* guix/import/texlive.scm (string->license): Handle additional licenses.

Change-Id: Idb89ef4b3f9ba52a404caa4cc7f4a61d4e1201e6
2026-04-12 23:15:27 +02:00
Nicolas Goaziou 33555b672b guix: texlive importer: Refresh texlive-source properly.
* guix/import/texlive.scm (texlive->svn-multi-reference): Rename to...
(texlive->svn-reference): ... this.
(tlpdb->package): Handle "texlive-source" specifically.
(package-from-texlive-repository?):
* guix/upstream.scm (package-update/svn-fetch): New variable.
(%method-updates): Extend with the previous function.
(update-package-source): Also update svn-reference objects.

Change-Id: Iaa988e5e3c401ea933720127bfc3046aa70935f4
2026-04-12 23:15:27 +02:00
jgart e61b99dfb1 import: gem: Warn when rubygems-fetch fails.
* guix/import/gem.scm: Use (guix diagnostics) and (guix i18n).
(gem->guix-package): Emit a warning when rubygems-fetch returns #f.

Change-Id: I838cb77470ebb35f2065be7772fcd87647153ea8
Signed-off-by: jgart <jgart@dismail.de>
2026-04-11 22:17:35 -04:00
Ricardo Wurmus 7a68ab3a73 import/cran: Use SPAWN instead of SYSTEM*.
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
2026-03-31 18:44:30 +02:00
Ludovic Courtès 365dbc5b1c import: elpa: Gracefully handle invalid ELPA version lists.
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
2026-03-29 22:32:28 +02:00
ROCKTAKEY 2d7c27d439 import: crate: Add "%" to crate source pattern.
* guix/import/crate/cargo-lock.scm (crate-source all): Add "%" to crate
source pattern.

Change-Id: I964c9c84ca65212c47c065ede140201f03b8bb24
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2026-03-23 10:48:27 +02:00
Yarl Baudig 80da50edf1 import/elpa: Fix some GNU-devel imports.
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>
2026-03-19 07:27:20 +01:00
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 d2c5f0fd59 import/cran: Uniquify inputs.
* guix/import/cran.scm (cran-package-inputs): Deduplicate inputs from
different sources.

Change-Id: I4547c9645f2722b451e003db2b87a77f6f4d304d
2026-03-07 11:57:24 +01:00
Ricardo Wurmus 647958d69a import/cran: Use sets instead of lset-union.
* 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
2026-03-07 11:57:24 +01: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
Efraim Flashner 83882c88b6 import: pypi: Don't rename maturin in package inputs.
* 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
2026-03-01 15:55:07 +02:00
Maxim Cournoyer 50a99b17ec utils/git-origin: Fix generated sexp when #:recursive? is #t.
* guix/import/utils.scm (git-origin): Wrap recursive? in extra list.

Change-Id: Id2a9d918fd67fe93bbc42bdbe2bc324b74ecc683
2026-02-11 17:40:23 +09:00
Maxim Cournoyer 8a744a0b0c import/elpa: Add GNU-devel repository.
* guix/import/elpa.scm (%elpa-archives): Register GNU-devel archive.
* doc/guix.texi (Invoking guix import): Document it.

Change-Id: If036334477be7537ff70a62d4900427d74bc05db
2026-02-08 08:23:19 +09: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 f64b2ac50c import: pypi: Correct name for ignored input.
* guix/import/pypi.scm (pypi-ignored-inputs): Rename
"import-metadata" to "importlib-metadata".

Change-Id: I5e934a85da65a9d8c7a4fa5af9c140f67302488b
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07 12:28:37 +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
John Dawson 7572a7b9bb import/cran: Prevent overwriting the definition of %standard-phases.
* guix/import/cran.scm (maybe-arguments): Do not overwrite %STANDARD-PHASES
with the definition from MINIFY-BUILD-SYSTEM.

Change-Id: I6e4cd64575ea029665db0d3b3aecdea38c41fe9d
2026-01-29 20:03:18 +01:00
Maxim Cournoyer 830d58dac2 import/utils: Add #:recursive? to `git-origin'.
* guix/import/utils.scm (git-origin) [#:recursive?]: New key.

Change-Id: Ibae80e873a593f9e904b1c974dbeca18fa115074
2026-01-27 14:27:25 +09:00
Maxim Cournoyer d5cd7679d3 import/utils: Add #:recursive? argument to `download-git-repository'.
* guix/import/utils.scm (download-git-repository)
[#:recursive?]: New argument.

Change-Id: I35660284e8048714c53f0ce4c16714630fd89775
2026-01-27 14:27:25 +09:00
Ludovic Courtès 15f87a0f03 describe: Define and use ‘modules-from-current-profile’.
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>
2026-01-25 21:17:44 +01:00
Hartmut Goebel c5728c3ba0 import: Add 'apache' updater.
* guix/import/apache.scm: New file.
* Makefile.am: Add it.

Change-Id: I36c4b2ff4f466d64f6c7af010640a44a336799d5
2026-01-25 18:50:01 +01:00
Rutherther 7c0cd7e45b Merge branch 'version-1.5.0'
Change-Id: Id73c0c74600a3da3373b3a37236b505af65bfe31
2026-01-22 13:27:13 +01:00
Danny Milosavljevic 71e1787a35 import: nuget: Fix bug in version spec parsing.
* guix/import/nuget.scm (parse-nuget-range->primitives): Modify.

Change-Id: I38d45596f22aee9075aa60d714240aee0de4a24e
2026-01-19 19:21:53 +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
Sergey Trofimov 1fc556b686 import: elpa: Fix repo url for melpa git recipes.
* guix/import/elpa.scm (melpa-recipe->origin): Take repo location from
:url for `git' :fetcher.

Merges guix/guix!5631

Change-Id: I6a3a8cef52eda2e5c731b8ff7f38f17dc920e167
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
2026-01-19 08:24:39 +01:00
Hilton Chain 2ae3c69679 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 11:15:36 +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
Efraim Flashner 82e58c26db guix: Spelling corrections.
* guix/gnupg.scm,
guix/import/composer.scm,
guix/import/cpan.scm,
guix/import/crate/cargo-lock.scm,
guix/import/hackage.scm,
guix/import/json.scm,
guix/licenses.scm,
guix/packages.scm,
guix/scripts/import.scm,
guix/ui.scm: Fix misspellings in comments and doc strings.

Change-Id: I8e922f8e980214e345a42a995788a7c4adb9184d
2026-01-14 09:16:46 +01:00
Sergey Trofimov 47cdef9344 import: elpa: Fix glob->regexp conversion.
* 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>
2026-01-10 22:08:16 +01:00
Patrick Norton 63b71a5152 guix: import: go: Sort inputs alphabetically.
* guix/import/go.scm: (go-module->guix-package): Sort propagated-inputs
alphabetically.

Change-Id: Ie21e7a819ba706c63f16ebf407ae0461780fa2d1
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-12-27 12:07:45 +00:00
Giacomo Leidi c425bac93d Update Giacomo's email address.
The change was automated via:

git grep -l goodoldpaul@autistici.org |
    xargs sed -i 's/goodoldpaul@autistici.org/therewasa@fishinthecalculator.me/g'

* .mailmap: New entry.

Change-Id: I1629388334695d221647afe6a14faf61af5fe0d6
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-12-03 14:38:09 +09:00
Ricardo Wurmus 1a97739bda guix: Update Bioconductor version to 3.22.
* guix/build-system/r.scm (bioconductor-uri): Update to 3.22.
* guix/import/cran.scm (%bioconductor-version): Set to 3.22.

Change-Id: I53c6b0d1ddc37faad90492103b7d02c210f945d7
2025-11-29 12:20:15 +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
Nicolas Graves 4f3d9137a1 import: pypi: Improve home-page detection.
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>
2025-11-25 14:11:25 +00:00
Nicolas Graves 92c2333350 import: pypi: Use git-fetch when possible.
* guix/import/pypi.scm (make-pypi-source, make-source): New
procedures.
(make-pypi-sexp): Use them.

Change-Id: I6136f701c313b7f0356bb7fdb73140e97a3adabe
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-25 14:11:25 +00:00
Nicolas Graves d66e9698a1 import: pypi: Enforce home-page https prefix.
* 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>
2025-11-25 14:11:25 +00:00
Nicolas Graves 73fe38fd56 import: pypi: Improve license detection.
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>
2025-11-25 14:11:22 +00:00
Maxim Cournoyer e46b6027d0 import/gnu: Unquote the hash computation of the source.
* guix/import/gnu.scm (gnu-package->sexp): Unquote the hash computation of the
source.

Change-Id: I871fae5ab43ec571689083a6a563d9dc17a89b55
2025-11-23 11:43:47 +09:00
Ignas Lapėnas a677cc5447 import: crate: Allow "~" in source URL.
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>
2025-10-31 16:03:33 +08:00
Nicolas Graves 0533284354 import: utils: Add git-repository-url? procedure.
* guix/import/utils.scm (git-repository-url?): Add procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-24 16:42:53 +02: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
Hartmut Goebel ccb05fcf5e import: pypi: Fix refesh --target-version fetches wrong wheel.
* guix/import/pypi.scm(pypi-package->upstream-source): Pass version to
pypi-package-inputs.

Fixes: #3417
Change-Id: I0d56c362afcd3b15441530e57f015f1ceee14752
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-10-15 15:02:17 +09:00
Nicolas Graves 8bf8fed532 import: hackage: Use guix-hash-url.
* guix/import/hackage.scm (hackage-module->sexp): Use guix-hash-url.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00
Nicolas Graves dd720662e7 import: go: Remove uneeded autoloads.
* guix/import/go.scm: Remove uneeded autoloads.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00
Nicolas Graves d3b5b7c198 import: gnu: Use guix-hash-url.
* guix/import/gnu.scm (gnu-package->sexp): Use guix-hash-url.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00
Nicolas Graves 2c1e7f1cc4 import: elpa: Use guix-hash-url.
* guix/import/elpa.scm (elpa-package->sexp): Use guix-hash-url.

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