Commit Graph

494 Commits

Author SHA1 Message Date
Ricardo Wurmus
18bd4d12d7
import: texlive: Remove more specific entries with the same prefix.
* guix/import/texlive.scm (files->directories): Ensure that any more specific
directory is removed if a parent directory is in the list of provided
locations.
2022-01-10 12:46:47 +01:00
Ludovic Courtès
c1db66fa0a
import: go: Correctly report diagnostics upon version mismatch.
* guix/import/go.scm (strip-v-prefix, ensure-v-prefix)
(validate-version): New procedures.
(go-module->guix-package): Use 'validate-version' when defining
'version*'.  Remove 'else' clause in SRFI-34 guard.
2022-01-09 23:17:17 +01:00
Sarah Morgensen
9f526f5dad
upstream: Support updating and fetching 'git-fetch' origins.
Updaters need to be modified to return 'git-reference' objects.
This patch modifies the 'generic-git' and 'minetest' updater,
but others might need to be modified as well.

* guix/git.scm (git-reference->git-checkout): New procedure.
* guix/upstream.scm (package-update/git-fetch): New procedure.
  (<upstream-source>)[urls]: Document it can be a 'git-reference'.
  (%method-updates): Add 'git-fetch' mapping.
  (update-package-source): Support 'git-reference' sources.
  (upstream-source-compiler/url-fetch): Split off from ...
  (upstream-source-compiler): ... this, and call ...
  (upstream-source-compiler/git-fetch): ... this new procedure if the URL
  field contains a 'git-reference'.
* guix/import/git.scm
  (latest-git-tag-version): Always return two values and document that the tag
  is returned as well.
  (latest-git-release)[urls]: Use the 'git-reference' instead of the
  repository URL.
* guix/import/minetest.scm (latest-minetest-release)[urls]: Don't wrap the
  'git-reference' in a list.
* tests/minetest.scm (upstream-source->sexp): Adjust to new convention.

Co-authored-by: Maxime Devos <maximedevos@telenet.be>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-06 16:27:30 +01:00
Sarah Morgensen
b4c677c2ed
import: Factorize file hashing.
* guix/import/cran.scm (vcs-file?, file-hash): Remove procedures.
  (description->package): Use 'file-hash*' instead.
* guix/import/elpa.scm (vcs-file?, file-hash): Remove procedures.
  (git-repository->origin, elpa-package->sexp): Use 'file-hash* instead'.
* guix/import/go.scm (vcs-file?, file-hash): Remove procedures.
  (git-checkout-hash): Use 'file-hash*' instead.
* guix/import/minetest.scm (file-hash): Remove procedure.
  (make-minetest-sexp): Use 'file-hash*' instead.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-06 16:27:30 +01:00
Xinglu Chen
82eb05c398
import: elpa: Also check NonGNU ELPA for updates.
* guix/import/elpa.scm (latest-release): Determine the repository based
on the URL of the source.
(package-from-gnu.org?): Rename to ...
(elpa-repository): ...this; memoize.
(package-from-elpa-repository?): New procedure.
(%elpa-updater): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-05 23:44:18 +01:00
Xinglu Chen
f21c70bc9a
import: elpa: Support ‘upstream-name’ property.
* guix/import/elpa.scm: (guix-package->elpa-name): New procedure.
  (latest-release): Use it.
* tests/elpa.scm ("guix-package->elpa-name: without 'upstream-name' property")
  ("guix-package->elpa-name: with 'upstream-name' property"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-18 22:51:55 +01:00
Xinglu Chen
155fc235b5
import: Beautify descriptions when appropriate.
* guix/import/elpa.scm (elpa-package->sexp)
* guix/import/gnu.scm (gnu-package->sexp)
* guix/import/hackage.scm (hackage-module->sexp)
* guix/import/minetest.scm (make-minetest-sexp)
* guix/import/opam.scm (opam->guix-package)
* guix/import/pypi.scm (make-pypi-sexp): Beautify descriptions.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-17 17:29:34 +01:00
Xinglu Chen
5cd1019488
import: utils: Wrap lines in description.
* guix/import/utils.scm (beautify-description): Use ‘fill-paragraph’; add
  optional ‘length’ argument.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-17 17:29:34 +01:00
Ricardo Wurmus
9bc0f45df5
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-12-05 19:17:41 +01:00
Marius Bakke
f63fb61d0c
import: PyPI: Validate GPG signatures when applicable.
* guix/import/pypi.scm (<distribution>): Fix funny typo.
(latest-release): When the distribution has a cryptographic signature, pass it
along to UPSTREAM-SOURCE.
2021-12-05 14:40:08 +01:00
Xinglu Chen
39f4ef59ff
build-system: haskell: Add ‘hackage-uri’ procedure.
* guix/build-system/haskell (hackage-uri): New procedure.
* guix/import/hackage.scm (hackage-module->sexp, latest-release): Use it.
* tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision,
match-ghc-foo-import): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-01 17:53:25 +01:00
Ludovic Courtès
b15e543d30
Merge branch 'master' into core-updates-frozen 2021-11-23 11:29:38 +01:00
Julien Lepiller
24aa7b3c21
import: opam: Fix error on unknown field value.
* guix/import/opam.scm (metadata-ref): Return #f if field is present,
but its content is of unknown form.
2021-11-22 00:18:51 +01:00
zimoun
b5d51bb19e
import: opam: Warn instead of leave when fetching fails.
* guix/import/opam.scm (opam-featch): Warn instead of leave when fetching
fails.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2021-11-19 12:57:35 +01:00
Ricardo Wurmus
424f2c92b4
import: texlive: Take different package database as optional argument.
* guix/import/texlive.scm (tlpdb->package): Expect PACKAGE-DATABASE as
argument.
(texlive->guix-package): Accept PACKAGE-DATABASE keyword.
2021-11-18 13:17:57 +00:00
Ricardo Wurmus
a030511fd9
import: texlive: Print inputs with labels and guixified names.
* guix/import/texlive.scm (tlpdb->package): Improve handling of propagated-inputs.
2021-11-18 13:17:56 +00:00
Ludovic Courtès
3a317f7476
Merge branch 'master' into core-updates-frozen 2021-11-17 23:43:14 +01:00
Ludovic Courtès
71b24abeb2
import: texlive: Remove leftover 'pk'.
* guix/import/texlive.scm (files->directories): Remove leftover 'pk'
call.
2021-11-17 15:44:48 +01:00
Ludovic Courtès
21357224bc
import: texlive: Load (gnu packages tex) dynamically.
Fixes a bug whereby 'guix pull' would fail with this guix-extra.drv
build failure:

  ice-9/eval.scm:163:9: ERROR:
    1. &formatted-message:
	format: "~a: patch not found\n"
	arguments: ("nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch")

Reported by ekaitz on #guix.

Regression introduced in 3b1a12c5bff5a0c108284d19a6982bdf663bbceb.

* guix/import/texlive.scm: Autoload (gnu packages tex).

fixlet
2021-11-17 15:44:33 +01:00
Ricardo Wurmus
3b1a12c5bf
import: Replace texlive importer.
* guix/import/texlive.scm (fetch-sxml, sxml->package): Remove procedures.
(tlpdb-file, tlpdb, files->directories, tlpdb->package): New procedures.
(string->license): Add case for lpplgpl license combination.
(guix-name): Remove COMPONENT argument.
(texlive->guix-package): Use new procedures.
(texlive-recursive-import): New procedure.
* guix/scripts/import/texlive.scm (show-help, %options): Remove --archive
option.
(guix-import-texlive): Adjust call of texlive->guix-package.
* doc/guix.texi (Invoking guix import): Update documentation.
2021-11-17 11:00:01 +00:00
Attila Lendvai
0c21ec1c79
import: utils: Add more licenses and extend their detection.
* guix/import/utils.scm (spdx-string->license): Identify more
licenses (CC-BY-4.0, Freetype, HPND).
* guix/licenses.scm: Add a comment that mentions "MIT" so that people
who grep for MIT end up there.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-12 23:34:18 +01:00
Ludovic Courtès
3756ce3267
import: print: Replace packages and origins in 'arguments'.
* guix/import/print.scm (package->code)[variable-reference]
[object->code]: New procedures.
[package-lists->code]: Rewrite in terms of 'object->code'.
Pass the 'arguments' field through 'object->code'.
* tests/print.scm (pkg-with-arguments, pkg-with-arguments-source): New
variables.
("package with arguments"): New test.
2021-11-11 00:14:31 +01:00
Ludovic Courtès
b2ed40c29f
import: print: Handle patches that are origins.
* guix/import/print.scm (package->code)[source->code]: Handle patches
that are origins.
* tests/print.scm (pkg-with-origin-input): Add 'patches' field.
(pkg-with-origin-patch, pkg-with-origin-patch-source): New variables.
("package with origin patch"): New test.
2021-11-11 00:14:31 +01:00
Ludovic Courtès
b3240ae846
import: print: Correctly handle URI lists.
* guix/import/print.scm (package->code)[factorized-uri-code]: New
procedure.
[source->code]: Use it, and factorize URI when it's a list.
* tests/print.scm (pkg-with-origin-input): Check origin URI to a list.
2021-11-11 00:14:31 +01:00
Ludovic Courtès
04d929570a
import: print: Properly render packages with origins as inputs.
* guix/import/print.scm (package->code)[source->code]: Check whether
VERSION is true before calling 'factorize-uri'.
[package-lists->code]: Add clause for inputs that are origins.
* tests/print.scm (pkg-with-origin-input, pkg-with-origin-input-source):
New variables.
("package with origin input"): New test.
2021-11-11 00:14:31 +01:00
Ludovic Courtès
450e1dd52e
import: cran: Allow imports of a specific version.
* guix/import/cran.scm (download): Handle the case where URL is a list.
(fetch-description-from-tarball): New procedure.
(fetch-description): Add #:version parameter.  Honor it when REPOSITORY
is 'cran.  Use 'fetch-description-from-tarball' when REPOSITORY is
'bioconductor.
(description->package): SOURCE-URL may now be a list.
(cran->guix-package): Pass VERSION to 'fetch-description'.
(cran-recursive-import): Add #:version parameter.
* guix/scripts/import/cran.scm (guix-import-cran): Expect a spec rather
than a mere package name.
* doc/guix.texi (Invoking guix import): Document it.
2021-11-11 00:14:30 +01:00
Ludovic Courtès
b20cd80ff1
import: pypi: Allow imports of a specific version.
* guix/import/pypi.scm (latest-version): New procedure.
(latest-source-release): Rename to...
(source-release): ... this.  Add 'version' parameter.
(latest-wheel-release): Rename to...
(wheel-release): ... this.  Add 'version' parameter.
(pypi->guix-package): Honor 'version' parameter.
(pypi-recursive-import): Add 'version' parameter and honor it.
* guix/scripts/import/pypi.scm (guix-import-pypi): Expect a spec.  Pass
it to 'package-name->name+version'.  Pass the 'version' parameter.
* tests/pypi.scm ("pypi->guix-package, no wheel"): Exercise
the #:version parameter.
* doc/guix.texi (Invoking guix import): Document it.
2021-11-11 00:14:30 +01:00
Efraim Flashner
1c94392a13
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-11-08 09:06:14 +02:00
Ricardo Wurmus
22b568de43
guix: Upgrade to Bioconductor 3.14.
* guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to
3.14.
* guix/import/cran.scm (%bioconductor-version): Same.
2021-11-07 22:34:34 +00:00
Xinglu Chen
b999c80c2e
import: egg: Allow imports of a specific version.
* guix/import/egg.scm (eggs-repository): Change URL.
(egg-metadata): Accept optional #:version keyword argument.
(egg->guix-package): Accept ‘version’ argument.
(egg-recursive-import): Add ‘version’ argument and honor it.
* guix/scripts/import/egg.scm (guix-import-egg): Parse a specification instead
of just a package name.
* doc/guix.texi (Invoking guix import): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-07 23:10:41 +01:00
Ludovic Courtès
d21353adea
import: elpa: Work around Guile 3.0.[5-7] compiler bug.
Fixes <https://issues.guix.gnu.org/49006>.
Reported by Xinglu Chen <public@yoctocell.xyz>.

* guix/import/elpa.scm (elpa-package->sexp)[melpa-recipe]: Add call to
'identity'.
2021-11-06 23:01:21 +01:00
Efraim Flashner
075df3d3e2
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-11-03 14:27:51 +02:00
Lars-Dominik Braun
5a9e7cdd32
import: stackage: Update to release 18.14.
* guix/import/stackage.scm (%default-lts-version): Update to 18.14.
2021-11-02 09:32:45 +01:00
Efraim Flashner
bc5155b952
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-10-31 14:49:47 +02:00
Ludovic Courtès
219cf5093e
import: cran: Use the standard diagnostic procedures.
* guix/import/cran.scm (bioconductor-packages-list)
(fetch-description): Use 'warning' instead of 'format'.
2021-10-28 21:30:23 +02:00
Mathieu Othacehe
e486b2b674
Merge remote-tracking branch 'signed/master' into core-updates 2021-10-18 14:37:26 +00:00
Ludovic Courtès
7770016402
import: pypi: Remove leftover 'pk' call.
This is a followup to 7b75f90c5b0da896c486cae23d19d43e2a03bb56.

* guix/import/pypi.scm (make-pypi-sexp)[maybe-upstream-name]: Remove
leftover 'pk' call.
2021-10-15 23:16:28 +02:00
Xinglu Chen
50d2900e76
import: pypi: Support 'input-changes'.
* guix/import/pypi.scm (latest-release): Specify the ‘input-changes’ field.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2021-10-15 23:16:28 +02:00
Mathieu Othacehe
a1eca979fb
Merge remote-tracking branch 'origin/master' into core-updates-frozen. 2021-10-12 17:46:23 +00:00
Tobias Geerinckx-Rice
a1679b74c9
Revert the #51061 patch series for now.
This reverts commits f63c79bf7674df012517f8e9148f94c611e35f32
..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing.

See <https://issues.guix.gnu.org/51061#32>.
2021-10-08 23:31:34 +02:00
Lars-Dominik Braun
edd912a128
import: hackage: Support mirror:// URLs
* guix/import/hackage.scm (guix-package->hackage-name): Support
mirror://-style URI’s.
(hackage-package?): Ditto.
2021-10-08 09:13:52 +02:00
Lars-Dominik Braun
127828ddd7
import: stackage: Support input changes.
* guix/import/stackage.scm (latest-lts-release): Rename package to pkg
to avoid name conflict and add input-changes.
2021-10-08 09:13:51 +02:00
Lars-Dominik Braun
8b4d3a523f
import: hackage: Update GHC’s standard libraries.
* guix/import/hackage.scm (ghc-standard-libraries): Add exceptions
library.
2021-10-08 09:13:51 +02:00
Lars-Dominik Braun
75c91e6b43
import: stackage: Update %default-lts-version to 18.10.
* guix/import/stackage.scm (%default-lts-version): Update to 18.10.
2021-10-08 09:13:51 +02:00
Hartmut Goebel
d780d0a2bb
import: Add hex.pm importer.
hex.pm is a package repository for Erlang and Elixir.

* guix/scripts/import.scm (importers): Add "hexpm".
* guix/scripts/import/hexpm.scm, guix/import/hexpm.scm,
  guix/hexpm-download.scm: New files.
* guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of
  fetch methods.
* guix/upstream.scm (package-update/hexpm-fetch): New function.
  (%method-updates) Add it.
* Makefile.am: Add them.
2021-10-07 22:35:28 +02:00
Ludovic Courtès
1327ec822f
import: crate: Gracefully handle missing license info.
Fixes <https://issues.guix.gnu.org/51048>.
Reported by Michael Zappa <me@michzappa.com>.

* guix/import/crate.scm (<crate-version>)[license]: Translate 'null to #f.
(make-crate-sexp): Handle LICENSE = #f.
2021-10-07 10:47:44 +02:00
Sarah Morgensen
834ff65e85
import: go: Recognize major version suffixes.
Do not treat major version suffixes (such as "/v3") as repository
subdirectories.  See <https://golang.org/ref/mod#major-version-suffixes>.

* guix/import/go.scm (go-module->guix-package): When determining the
unpack path, compare 'root-module-path' to 'module-path-sans-suffix'
instead of 'module-path'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-04 16:36:59 +02:00
Sarah Morgensen
ac43ead774
import: go: Handle extra whitespace in "go-import" meta tags.
Some packages sites use extra whitespace in the content portion of <meta
name="go-import" ...> tags, so handle that.  Example:
<https://k8s.io/api?go-get=1>

* guix/import/go.scm (fetch-module-meta-data)[go-import->module-meta]:
Use 'string-tokenize' instead of 'string-split'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-04 16:36:59 +02:00
Maxime Devos
085a8a0cdf
import/minetest: Define an updater for mods on ContentDB.
Only detecting updates is currently supported.  To actually
perform the uppdates, a patch like
<https://issues.guix.gnu.org/50072#4> is required.

* guix/import/minetest.scm
  (version-style,minetest-package?,latest-minetest-release): New procedures.
  (%minetest-updater): New updater.
* tests/minetest.scm
  (upstream-source->sexp,expected-sexp,example-package): New procedure.
  (test-release,test-no-release): New macro's.
  ("same version","new version (dotted)","new version (date)")
  ("new version (git -> dotted)","dotted->date","date->dotted")
  ("no commit informaton, no new release")
  ("minetest is not a minetest mod")
  ("technic is a minetest mod")
  ("upstream-name is required"): New tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-02 17:16:43 +02:00
Ludovic Courtès
b7d8dc5841
import: stackage: Use the standard diagnostic procedures.
* guix/import/stackage.scm (leave-with-message): Remove.
(stackage-lts-info-fetch): Use 'raise' and 'formatted-message'.
(stackage->guix-package): Likewise.
(latest-lts-release): Use 'warning' instead of 'format'.
2021-10-02 17:04:54 +02:00