Commit Graph

694 Commits

Author SHA1 Message Date
Nicolas Goaziou
0224a8f400
guix: texlive importer: Fix build system and arguments for meta-packages.
* guix/import/texlive.scm (tlpdb->package): Meta packages should use trivial
build system and an appropriate builder.
* tests/texlive.scm ("texlive->guix-package, meta-package"):
("texlive->guix-package, translate dependencies"): Update tests.
2023-07-18 18:12:55 +02:00
Nicolas Goaziou
5f51601bd9
guix: texlive importer ignores dependencies unnecessary in Guix.
* guix/import/texlive.scm (translate-depends): New function.
(tlpdb->package): Use new function.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, translate dependencies"):
("texlive->guix-package, lonely `hyphen-base' dependency and ARCH"): New tests.
2023-07-18 18:12:55 +02:00
Nicolas Goaziou
47913ab452
guix: Let texlive importer suggest format creation.
* guix/import/texlive.scm (tlpdb): Store "execute" entries.
(tlpdb->package): Add #:CREATE-FORMATS argument when there is an AddFormat
execute action.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"): New tests.
2023-07-18 18:12:49 +02:00
Nicolas Goaziou
d62b35bbe9
guix: import: Improve importing texlive meta packages.
* guix/import/texlive.scm (tlpdb->package): Generate more appropriate source,
home page and license fields when importing meta packages, i.e., TeX Live
collections and schemes.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, meta-package"): New test.
2023-07-18 18:12:47 +02:00
Nicolas Goaziou
a91171ad63
guix: import: Fix Creative Common licenses in texlive importer.
* guix/import/texlive.scm (string->license): Fix symbol used for some CC-BY
licenses.  Add version 4.0 for CC-BY and CC-BY-SA.
2023-07-18 18:12:46 +02:00
Nicolas Goaziou
31cd9a5040
guix: import: Handle native inputs in texlive importer.
* guix/import/texlive.scm (tlpdb->package): Add TEXLIVE-METAFONT as a native
input whenever font metrics are to be generated.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with METAFONT files"): New test.
2023-07-18 18:12:39 +02:00
Nicolas Goaziou
3fc925aa84
guix: import: Fix multiple licenses output in texlive importer.
* guix/import/texlive.scm (string->license): Add missing case and try first to
split license strings before giving up.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, multiple licenses"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
308b3e83c3
guix: import: texlive use full file names for generic directories.
Generic directories, such as "doc/info/" or "doc/man" are shared by multiple
packages.  With this change, the texlive importer specifies the full file name
of package-specific files there, making sure only them are downloaded.

* guix/import/texlive.scm (texlive-generic-locations): New variable.
(files->locations): Renamed from files->directories.
Provide full file names when necessary.
(tlpdb->package): Apply renaming.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
7a6da1e22a
guix: import: Improve home-page generation in texlive importer.
* guix/import/texlive.scm (tlpdb): Also register `catalogue' key.
(tlpdb->package): First try to use catalogue for the home-page, then the
name.
* tests/texlive.scm (%fake-tlpdb): Add tests data.
("texlive->guix-package, with catalogue entry, no inputs"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
4a245129ff
guix: import: Update texlive importer according to new build system.
* guix/import/texlive.scm (tlpdb->package): Generate a package that doesn't
need SIMPLE-TEXLIVE-PACKAGE.
* guix/import/utils.scm (package->definition): Remove special case for
`simple-texlive-package'.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package"): Update test.
("texlive->guix-package, no docfiles"): New test.
2023-07-18 18:10:25 +02:00
Ricardo Wurmus
febe08ee8a
import/cran: Add one more package name transformation.
* guix/import/cran.scm (transform-sysname): Add entry for "zlib-devel".
2023-07-12 14:29:02 +02:00
Ricardo Wurmus
4699de59ff
import/cran: Add another clause for ASL 2.0.
* guix/import/cran.scm (string->license): Add clause for >= 2.0.
2023-06-14 14:09:35 +02:00
Ludovic Courtès
53bf9fba0c
tests: Ensure 'elpa' test does not access the network.
Previously it would try to access the real elpa.gnu.org.  This would
succeed when network is available because "taxy-magit-section" is an
existing package.

* guix/import/elpa.scm (elpa-repository)
(package-from-elpa-repository?): Recognize 'gnu/http.
* tests/elpa.scm ("package-latest-release"): Use 'http' instead of
'https'.  Change "taxy-magit-section" to "fake-taxy-magit-section".
2023-06-09 14:19:14 +02:00
Ludovic Courtès
df8b3821a8
import: stackage: Updater resolves inputs lazily.
Fixes the "haskell-stackage" test in 'tests/lint.scm', which started
failing with e6223017d9 because the extra
HTTP GETs induced by the 'haskell-fetch' calls would fail.

* guix/import/stackage.scm (latest-lts-release): Call 'hackage-fetch'
and its continuation from within 'inputs', which is delayed.  Pass it
NAME-VERSION instead of HACKAGE-NAME-VERSION.
2023-06-09 14:19:14 +02:00
Ricardo Wurmus
a025d8fee6
import/cran: Ensure current package is not among inputs.
* guix/import/cran.scm (cran-package-inputs): Remove the current package from
the result.
2023-06-05 18:55:11 +02:00
Ricardo Wurmus
c2f0ce73a7
import/cran: string->license: Add another case for GPLv3+.
* guix/import/cran.scm (string->license): Translate "GPL (>=3)" to gpl3+.
2023-06-02 12:52:22 +02:00
Ricardo Wurmus
cbbb619ddb
import/cran: Libraries should not use CRAN-GUIX-NAME.
* guix/import/cran.scm (source-dir->dependencies): Do not use CRAN-GUIX-NAME
when processing result of NEEDED-LIBRARIES-IN-DIRECTORY.
2023-06-02 12:49:25 +02:00
Ricardo Wurmus
67183e25ad
import/cran: Also search Makevars file for libraries.
* guix/import/cran.scm (needed-libraries-in-directory): Look at Makevars in
addition to Makevars.in for libraries.
2023-06-02 12:48:42 +02:00
Ludovic Courtès
9e237fe0bd
import: gem: Updater provides input list.
* guix/import/gem.scm (import-release): Add 'inputs' field.
* tests/gem.scm ("package-latest-release"): New test.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
e6f82fcd5f
import: gem: Factorize "bundler" special case for name mapping.
* guix/import/gem.scm (ruby-package-name): Add "bundler" special case.
(gem->guix-package): Adjust accordingly.
* tests/gem.scm ("gem-recursive-import")
("gem-recursive-import with a specific version"): Remove "ruby-bundler"
from the expected packages.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
d46d1bee1e
import: elpa: Updater provides input list.
* guix/import/elpa.scm (elpa-dependency->upstream-input): New
procedure.
(latest-release): Add 'inputs' field.
* tests/elpa.scm ("package-latest-release"): New test.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
a738c1a0c7
import: cpan: Updater provides input list.
* guix/import/cpan.scm (latest-release): Add 'inputs' field.
* tests/cpan.scm ("package-latest-release"): New test.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
c4fe4e7eb8
import: cpan: Represent dependencies as <upstream-input> records.
* guix/import/cpan.scm (cpan-name->downstream-name)
(cran-dependency->upstream-input, cran-module-inputs): New procedures.
(cpan-module->sexp)[guix-name, convert-inputs]: Remove.
[maybe-inputs]: Adjust to deal with <upstream-input>.
Use 'cpan-name->downstream-name' instead of 'guix-name'.  Add call to
'cpan-module-inputs' and adjust calls to 'maybe-inputs'.  No longer emit
input labels.
* tests/cpan.scm ("cpan->guix-package"): Adjust test accordingly.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
f13e73df10
import: cpan: Remove unary 'string-append' call.
* guix/import/cpan.scm (package->upstream-name): Remove useless
'string-append'.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
ec0a2fc87b
upstream: 'update-package-source' edits input fields.
Previously, 'guix refresh r-ggplot2 -u' and similar commands would print
of list of input changes that would have to be made manually.  With this
change, 'guix refresh -u' takes care of updating input fields
automatically.

* guix/upstream.scm (update-package-inputs): New procedure.
(update-package-source): Call it when 'upstream-source-inputs' returns
true.
* guix/scripts/refresh.scm (update-package): Remove iteration over the
result of 'changed-inputs'.
* guix/import/test.scm (available-updates): Add support for input
lists.
* tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add input list for
"the-test-package".
Make sure 'guix refresh -u' updates 'inputs' accordingly.
* doc/guix.texi (Invoking guix refresh): Mention it.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
e6223017d9
upstream: Replace 'input-changes' field by 'inputs'.
Returning the expected list of inputs rather than changes relative to
the current package definition is less ambiguous and offers more
possibilities for further processing.

* guix/upstream.scm (<upstream-source>)[input-changes]: Remove.
[inputs]: New field.
(<upstream-input>): New record type.
* guix/upstream.scm (upstream-input-type-predicate)
(input-type-filter, upstream-source-regular-inputs)
(upstream-source-native-inputs, upstream-source-propagated-inputs): New
procedures.
(changed-inputs): Expect an <upstream-source> as its second argument.
Adjust accordingly.
* guix/import/pypi.scm (distribution-sha256): New procedure.
(maybe-inputs): Expect a list of <upstream-input>.
(compute-inputs): Rewrite to return a list of <upstream-input>.
(pypi-package-inputs, pypi-package->upstream-source): New procedures.
(make-pypi-sexp): Use it.
* guix/import/stackage.scm (latest-lts-release): Define 'cabal'.
Replace 'input-changes' field by 'inputs'.
* guix/scripts/refresh.scm (update-package): Use 'changed-inputs'
instead of 'upstream-source-input-changes'.
* tests/cran.scm ("description->package"): Adjust order of inputs.
* tests/pypi.scm (default-sha256, default-sha256/base32): New variables.
(foo-json): Add 'digests' entry.
("pypi->guix-package, no wheel"): Check HASH against DEFAULT-SHA256/BASE32.
("pypi->guix-package, wheels"): Likewise.
("pypi->guix-package, no usable requirement file."): Likewise.
("pypi->guix-package, package name contains \"-\" followed by digits"):
Likewise.
("package-latest-release"): New test.
* tests/upstream.scm (test-package-sexp): Remove.
("changed-inputs returns no changes"): Rewrite to use <upstream-source>.
(test-new-package-sexp): Remove.
("changed-inputs returns changes to plain input list"): Rewrite.
("changed-inputs returns changes to all plain input lists"): Likewise.
("changed-inputs returns changes to labelled input list")
("changed-inputs returns changes to all labelled input lists"): Remove.
* guix/import/cran.scm (maybe-inputs): Expect PACKAGE-INPUTS to be a
list of <upstream-input>.
(source-dir->dependencies): Return a list of <upstream-input>.
(vignette-builders): Likewise.
(uri-helper, cran-package-source-url)
(cran-package-propagated-inputs, cran-package-inputs): New procedures.
(description->package): Use them instead of local definitions.
(latest-cran-release): Replace 'input-changes' field by 'inputs'.
(latest-bioconductor-release): Likewise.
(format-inputs): Remove.
* guix/import/hackage.scm (cabal-package-inputs): New procedure.
(hackage-module->sexp): Use it.
[maybe-inputs]: Expect a list of <upstream-input>.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
e7910f4882
import: json: Add #:timeout to 'json-fetch'.
* guix/import/json.scm (json-fetch): Add #:timeout and pass it to
'http-fetch'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
4663cfd381
import: utils: 'call-with-networking-exception-handler' doesn't unwind.
That way backtraces show where the error actually originates from.

* guix/import/utils.scm (call-with-networking-exception-handler):
Rewrite using 'with-exception-handler'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
d2f36abd02
tests: pypi: Rewrite tests using a local HTTP server.
* guix/import/pypi.scm (%pypi-base-url): New variable.
(pypi-fetch): Use it.
* tests/pypi.scm (foo-json): Compute URLs relative to '%local-url'.
(test-json-1, test-json-2, test-source-hash): Remove.
(file-dump): New procedure.
(with-pypi): New macro.
("pypi->guix-package, no wheel")
("pypi->guix-package, wheels")
("pypi->guix-package, no usable requirement file.")
("pypi->guix-package, package name contains \"-\" followed by digits"):
Rewrite using 'with-pypi'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
25f04945d9
import: elpa: Standardize warning message.
* guix/import/elpa.scm (melpa-recipe->origin): Standardize warning
message.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
124b921a5e
import: Cosmetic tweaks to 'recursive-import'.
* guix/import/utils.scm (recursive-import): Tweak docstring.  Simplify
'apply' call.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
39eb9b5a5c
import: elpa: Use the expected repo in recursive imports.
* guix/import/elpa.scm (elpa-recursive-import): Pass REPO in calls to
'elpa->guix-package'.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
8e065692c2
import: elpa: 'elpa->guix-package' accepts other keyword arguments.
This is a followup to 3c24da4260.

* guix/import/elpa.scm (elpa->guix-package): Add #:allow-other-keys.
2023-05-04 13:09:00 +02:00
Simon Tournier
7304694f51
guix: import: crate: Fix incorrect returned values.
* guix/import/crate.scm (crate->guix-package): Return compatible values with
'recursive-import'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-30 23:07:58 +02:00
Ricardo Wurmus
90f67705f5
import/cran: Translate from xml2 to libxml2.
* guix/import/cran.scm (transform-sysname): Add translation from xml2 to
libxml2.
2023-04-29 20:09:30 +02:00
Ricardo Wurmus
2f53d9cce9
import/cran: Add "unix" to list of invalid packages.
* guix/import/cran.scm (invalid-packages): Add "unix".
2023-04-29 20:09:30 +02:00
Ricardo Wurmus
ec52655ce6
guix: Upgrade to Bioconductor 3.16.
* guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to
3.17.
* guix/import/cran.scm (%bioconductor-version): Same.
2023-04-29 20:09:30 +02:00
Ricardo Wurmus
cb8d080349
import/pypi: Generate packages using pyproject-build-system.
* guix/import/pypi.scm (make-pypi-sexp): Generate PACKAGE expression where the
value for the BUILD-SYSTEM field is PYPROJECT-BUILD-SYSTEM instead of
PYTHON-BUILD-SYSTEM.
2023-04-29 20:09:30 +02:00
Csepp
ba88f0414b
import: opam: opam->guix-package: Fix default repo argument.
* guix/import/opam.scm (opam->guix-package): Make default repo a list of
strings.  Update docstring.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-04-08 23:47:21 +02:00
Ludovic Courtès
adf95a810d
import: Properly report "no specific version" errors.
* guix/import/cpan.scm (latest-release): Use 'raise' instead of
'error'.
* guix/import/elpa.scm (latest-release): Likewise.
* guix/import/hackage.scm (latest-release): Likewise.
* guix/import/minetest.scm (latest-minetest-release): Likewise.
* guix/import/opam.scm (latest-release): Likewise.
* guix/import/stackage.scm (latest-lts-release): Likewise.
2023-04-08 22:54:53 +02:00
Nicolas Goaziou
1dcaa0fc30
guix: Shorten home page URL in texlive importer.
* guix/import/texlive.scm (tlpdb->package): Use short URL for home page.
2023-03-30 18:16:31 +02:00
Ricardo Wurmus
739c257378
import/texlive: tlpdb->package: Ignore files outside of texmf-dist.
* guix/import/texlive.scm (tlpdb->package): Ignore files outside of texmf-dist
because the code assumes that this is the prefix for all files.
2023-03-29 21:07:39 +02:00
Ricardo Wurmus
b849a47bdb
import/texlive: Process license field only when it exists.
* guix/import/texlive.scm (tlpdb->package): Check "catalogue-license" field
before using string->license.
2023-03-29 21:07:39 +02:00
Ricardo Wurmus
03a83c2906
import/texlive: Only process description if it exists.
* guix/import/texlive.scm (tlpdb->package): Run beautify-description only when
the "longdesc" field exists.
2023-03-29 21:07:39 +02:00
Ricardo Wurmus
36f78676e5
import/texlive: Ignore architecture-dependent packages.
* guix/import/texlive.scm (tlpdb->package): Filter "depend" field to exclude
package names ending on ".ARCH".
2023-03-29 21:07:39 +02:00
Ludovic Courtès
ae587c2ef0
guix: Strip #:use-module lists.
This was obtained by setting up this environment:

  guix shell -D guix --with-input=guile@3.0.9=guile-next \
    --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2
    -- make -j5

then adding 'unused-module' to (@@ (guix build compiler) %warnings),
building, and checking all the "unused module" warnings and removing
those that were definitely unused.
2023-03-13 15:08:33 +01:00
Antero Mejr
6529534587
import: Add EUPL 1.1 to the SPDX license name converter.
* guix/import/utils.scm (spdx-string->license): Add EUPL-1.1 identifier.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:58 +01:00
Antero Mejr
ea2ff18238
licenses: Add LPL 1.02 (Lucent Public Licence).
* guix/licenses.scm (lpl1.02): New variable.
* guix/import/utils.scm (spdx-string->license): Add LPL-1.02 identifier.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:58 +01:00
Lars-Dominik Braun
b0fc911b5b
import: haskell: Add new internal library for GHC 9.2.
* guix/import/hackage.scm (ghc-standard-libraries): Add ghc-bignum.
2023-02-26 10:20:14 +01:00
Lars-Dominik Braun
d06ae53013
import: hackage: Use upstream-name property.
* guix/import/hackage.scm (guix-package->hackage-name): Removed.
(latest-release): Use package-upstream-name* instead.
* guix/import/stackage.scm (latest-lts-release): Ditto.
(stackage-lts-package?): Ditto.
2023-02-26 10:20:14 +01:00
Lars-Dominik Braun
84549dcf38
import: hackage: Add upstream-name property.
* guix/import/hackage.scm (hackage-module->sexp): Add property
upstream-name to imported package.
* tests/hackage.scm (match-ghc-foo): Add upstream-name property.
(match-ghc-foo-6): Ditto.
(match-ghc-elif): Ditto.
(match-ghc-foo-revision): Ditto.
(match-ghc-foo-import): Ditto.
2023-02-26 10:19:36 +01:00
Lars-Dominik Braun
eb42d18180
import: stackage: Update to release 20.5.
* guix/import/stackage.scm (%default-lts-version): Update to 20.5.
2023-02-26 10:19:36 +01:00
Lars-Dominik Braun
3e3f888dd3
import: hackage: Allow version at the beginning of cabal file.
Fix a corner case, uncovered by the hedgehog package, which has the
version field at the beginning of its cabal file. This causes a pattern
match failure.

* guix/import/hackage.scm (latest-release): Match version at beginning
of expression too.
2023-02-26 10:19:35 +01:00
Ricardo Wurmus
8525c26499
import/cran: Remove directory-needs-zlib? in favor of needed-libraries-in-directory.
* guix/import/cran.scm (directory-needs-zlib?): Remove procedure.
(source-dir->dependencies): Use needed-libraries-in-directory instead of
directory-needs-zlib?.
2023-02-18 19:56:30 +01:00
Ricardo Wurmus
049cff91ac
import/cran: Add generic way to detect needed libraries.
* guix/import/cran.scm (needed-libraries-in-directory): New procedure.
(libraries-pattern, packages-for-matches): New variables.
2023-02-18 19:56:30 +01:00
Ricardo Wurmus
271c0bfcf2
import/cran: Process all vignette builders.
* guix/import/cran.scm (needs-knitr?): Remove procedure.
(vignette-builders): New procedure.
(description->package): Use vignette-builders instead of needs-knitr?.
2023-02-18 19:56:30 +01:00
Ricardo Wurmus
c0507e9f1e
import/cran: Add name mapping for libjpeg.
* guix/import/cran.scm (transform-sysname): Add mapping from libjpeg to
libjpeg-turbo.
2023-02-18 19:56:29 +01:00
Ricardo Wurmus
6ce68a7a83
import/cran: Add directory-needs-esbuild?.
* guix/import/cran.scm (directory-needs-esbuild?): New procedure.
(source-dir->dependencies): Use it.
2023-02-18 19:56:29 +01:00
Ludovic Courtès
a8792bc796
import: opam: Do not crash when description is missing.
Previous 'guix import opam coccinelle' would crash due to the lack of a
description.

* guix/import/opam.scm (opam->guix-package): Call 'beautify-description'
only when "description" metadata is available.
2023-01-23 23:23:07 +01:00
Ricardo Wurmus
6e75790fc0
import/cran: Fix Bioconductor updater.
* guix/import/cran.scm (latest-bioconductor-release): Use LATEST-VERSION
instead of VERSION, which is always #F.
2023-01-09 22:32:58 +01:00
Ludovic Courtès
04f247be81
refresh: Add CLI tests.
* guix/import/test.scm, tests/guix-refresh.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
2023-01-08 16:11:45 +01:00
Ludovic Courtès
2e9c0e1ff6
import: stackage: Catch networking errors in predicate.
* guix/import/stackage.scm (stackage-lts-package?): Wrap body in
'false-if-networking-error'.
2023-01-08 16:11:45 +01:00
Ludovic Courtès
f3edf29c67
gnu-maintenance: Factorize 'false-if-networking-failure'.
* guix/import/utils.scm (call-with-networking-exception-handler): New
procedure.
(false-if-networking-error): New macro.
* guix/gnu-maintenance.scm (import-html-updatable-release): Use it
instead of inline code.
2023-01-08 16:11:45 +01:00
Lars-Dominik Braun
c329eeb3a8
import/cran: Depend on gfortran if .f files are detected too.
There was an inconsistency between tarball-needs-fortran? and
directory-needs-fortran?.

* guix/import/cran.scm (directory-needs-fortran?): Match .f files too.
2022-12-31 19:41:53 +01:00
Ricardo Wurmus
d4ed8dc3c5
import/cran: Use multiple values instead of a list of lists.
* guix/import/cran.scm (source-dir->dependencies): Return multiple values.
(description->package): Bind two values.
2022-12-31 14:48:46 +01:00
Ricardo Wurmus
4d13926064
import/utils: recursive-import: Pass on lookup-node's version argument.
* guix/import/utils.scm (recursive-import)<lookup-node>: Replace the #:VERSION
keyword from RECURSIVE-IMPORT's arguments with the value of VERSION passed to
LOOKUP-NODE.
2022-12-31 14:48:46 +01:00
Lars-Dominik Braun
973496100d
import/cran: Always operate on source directory.
Extracting the source tarball multiple times is very slow and a
speedup of >2x (without network I/O) can be achieved by coalescing all
NEEDS-X? functions into a single one, which extracts a tarball only once.

* guix/import/cran.scm (tarball-needs-fortran?): Remove unused function.
(needs-fortran?): Ditto.
(tarball-files-match-pattern?): Ditto.
(tarball-needs-zlib?): Ditto.
(needs-zlib?): Ditto.
(tarball-needs-pkg-config?): Ditto.
(needs-pkg-config?): Ditto.
(source-dir->dependencies): New function.
(source->dependencies): New function.
(description->package): Use it.
2022-12-31 14:48:46 +01:00
Lars-Dominik Braun
952953be39
import/cran: Translate more package dependencies.
Assumes we use package variable names, not package specification names.

* guix/import/cran.scm (invalid-packages): Add more invalid names.
(transform-sysname): Transform more package names.
2022-12-31 14:48:46 +01:00
Lars-Dominik Braun
1176fccb83
import/cran: Allow overriding tarball download.
* guix/import/cran.scm (description->package): Accept new keyword argument
DOWNLOAD-SOURCE.
(cran->guix-package): Ditto.
2022-12-31 14:48:46 +01:00
Lars-Dominik Braun
08028c443e
import/cran: Allow overriding description fetch function.
* guix/import/cran.scm (cran->guix-package): New keyword argument
FETCH-DESCRIPTION.
2022-12-31 14:48:46 +01:00
Lars-Dominik Braun
d57dd25d38
import/cran: Allow custom license prefix.
* guix/import/cran.scm (string-licenses): Add license-prefix argument.
(string->license): Ditto.
(description->package): Ditto.
(cran->guix-package): Ditto.
(cran-recursive-import): Ditto.
* guix/scripts/import/cran.scm (%options): Add new option -p/--license-prefix.
(show-help): Document it.
(parse-options): Pass it to importer.
* doc/guix.texi (Invoking guix import): Document it.
2022-12-31 14:48:46 +01:00
Lars-Dominik Braun
3c24da4260
import/utils: Pass all arguments through to package builder.
Individual importer may have additional arguments.

* guix/import/utils.scm (recursive-import): Patch all keyword arguments
through to repo->guix-package.
* guix/import/cran.scm (cran->guix-package): Add #:allow-other-keys.
* guix/import/crate.scm (crate->guix-package): Ditto.
* guix/import/egg.scm (egg->guix-package): Ditto.
* guix/import/elm.scm (elm->guix-package): Ditto.
* guix/import/gem.scm (gem->guix-package): Ditto.
* guix/import/gnu.scm (gnu->guix-package): Ditto.
* guix/import/go.scm (go-module->guix-package): Ditto.
(go-module-recursive-import): Ditto.
* guix/import/hackage.scm (hackage->guix-package): Ditto.
(hackage-recursive-import): Ditto.
* guix/import/hexpm.scm (hexpm->guix-package): Ditto.
* guix/import/minetest.scm (minetest->guix-package): Ditto.
(minetest-recursive-import): Ditto.
* guix/import/opam.scm (opam->guix-package): Ditto.
* guix/import/pypi.scm (pypi->guix-package): Ditto.
* guix/import/stackage.scm (stackage->guix-package): Ditto.
(stackage-recursive-import): Ditto.
* guix/import/texlive.scm (texlive->guix-package): Ditto.
2022-12-31 14:48:46 +01:00
Hartmut Goebel
b82eb8d67a
import: pypi: Allow updating to a specific version.
* guix/import/pypi.scm (latest-release): Rename to 'import-release',
  add #:version argument and pass it on to called functions.
2022-12-26 17:38:06 +01:00
Hartmut Goebel
3986caacae
import: launchpad: Allow updating to a specific version.
* guix/import/launchpad.scm (latest-release): Rename to 'import-release',
  add #:version argument.
  If version is given, return an upstream-source for this version.
2022-12-26 17:38:06 +01:00
Hartmut Goebel
424a871f1f
import: kde: Allow updating to a specific version.
* guix/import/kde.scm (latest-kde-release): Rename to 'import-kde-release',
  add #:version argument.  Rework the code to not sort the relevant files,
  but just find the requested or latest version.
  [find-latest-archive-version]: New function.
2022-12-26 17:38:06 +01:00
Hartmut Goebel
e689f97033
import: hexpm: Allow updating to a specific version.
* guix/import/hexpm.scm (latest-release): Rename to 'import-release',
  add #:version argument.
  If version is given, return an upstream-source for this version.
2022-12-26 17:38:05 +01:00
Hartmut Goebel
c7faeae2b1
import: gnome: Allow updating to a specific version.
* guix/import/gnome.scm (latest-gnome-release): Rename
  to 'import-gnome-release', add #:version argument. If version is
  given, try to find the respective version
  [find-latest-release]: New function, based on former code.
  [find-version-release]: New function.
2022-12-26 17:38:05 +01:00
Hartmut Goebel
be3f48bff0
import: github: Allow updating to a specific version.
* guix/import/github.scm (latest-released-version): Add #:version argument.
  If version is given, try to find the respective release.
  (latest-releease) Rename to 'import-release', add #:version argument
  and pass it on to 'latest-released-version'.
2022-12-26 17:38:05 +01:00
Hartmut Goebel
6da60453e2
import: git: Allow updating to a specific version.
* guix/import/git.scm
  (latest-tag): Add #:version argument. If version is given, try to
  find the respective version tag.
  (latest-git-tag-version): Add #:version argument and pass it on to
  called functions.
  (latest-releease) Rename to 'import-release', add #:version argument
  and pass it on to called functions.
2022-12-26 17:38:05 +01:00
Hartmut Goebel
1e39f475a2
import: gem: Allow updating to a specific version.
* guix/import/gem.scm (latest-release): Rename to 'import-release',
  add #:version argument.
  If version is given, return an upstream-source for this version.
2022-12-26 17:38:03 +01:00
Hartmut Goebel
af44a8550c
import: egg: Allow updating to a specific version.
* guix/import/egg.scm (latest-release): Rename to 'import-release',
  add #:version argument.
  If version is given, return an upstream-source for this version.
2022-12-26 17:38:03 +01:00
Hartmut Goebel
7c4aab1f7d
import: crate: Allow updating to a specific version.
* guix/import/crate.scm (latest-release): Rename to 'import-release',
  add #:version argument.
  If version is given, return an upstream-source for this version.
2022-12-26 17:38:03 +01:00
Hartmut Goebel
53af560543
gnu-maintenance: Allow updating to a specific version.
* guix/gnu-maintenance.scm
  (latest-ftp-release): Rename to … (import-ftp-release) … this,
  add #:version argument.
  If version is given, try to find the respective version.
  (latest-html-release): Rename to … (import-html-release) … this,
  add #:version argument.
  If version is given, try to find the respective version.
  (latest-gnu-release): Rename to … (import-gnu-release) … this,
  add #:version argument. Refactor to first select archives for
  respective package, the find the requested or latest version, then create
  the upstream-source.
  (latest-release): Rename to … (import-release) … this,
  add #:version argument, pass on to … (import-ftp-release) … this.
  (import-release*): Rename to … (import-release*) … this,
  add #:version argument, pass on to … (latest-release) … this.
  (latest-savannah-release): Rename to … (import-savannah-release) … this,
  add keword-argument version, pass on to … (import-html-release) … this.
  (latest-xorg-release): Rename to … (import-xorg-release) … this,
  add keword-argument version, pass on to … (import-ftp-release) … this.
  (latest-kernel.org-release): Rename to … (import-kernel.org-release) … this,
  add #:version argument, pass on to … (import-html-release) … this.
  (latest-html-updatable-release): Rename to … (import-html-updatable-release)
  … this, add #:version argument, pass on to … (import-html-release) … this.
* guix/import/gnu.scm(gnu->guix-package): Adjust function call.
2022-12-26 17:38:03 +01:00
Hartmut Goebel
21703b5120
import: Issue error-message if version is given.
These importer don't support importing a specific version, thus the updater
does neither.  Issue an error message in case version is given.

* guix/import/cpan.scm (latest-release),
  guix/import/elpa.scm (latest-release),
  guix/import/hackage.scm (latest-release),
  guix/import/minetest.scm (latest-minetest-release),
  guix/import/opam.scm (latest-release): Add #:version argument,
  issue error if version is given.
* guix/import/cran.scm (latest-cran-release): Same.
  (latest-bioconductor-release) Same. <version>: rename to <latest-version>.
* guix/import/stackage.scm (latest-lts-release): For each generated updater,
  add #:version argument and issue error if version is given.
2022-12-26 17:15:07 +01:00
Hartmut Goebel
9500c11c8b
import: cpan: Remove unused exports.
* guix/import/cpan.scm (#:export): Remove unused exports.
2022-12-26 17:15:06 +01:00
Hartmut Goebel
a274a6a1ac
upstream-updater: Rename record field.
The next commits will make the functions, which are currently importing the
latest version of a package, change into importing the latest or a given
version of the package (for those updaters supporting specifying a version).
Thus the name ‘latest‘ is no longer appropriate.

* guix/upstream.scm (upstream-updater) Rename field [latest] to
  [import]. (lookup-updater, package-latest-release) Adjust fieldname
  accordingly.
* guix/gnu-maintenance.scm (%gnu-updater, %gnu-ftp-updater,
  %savannah-updater, %sourceforge-updater, %xorg-updater,
  %kernel.org-updater, %generic-html-updater),
  guix/import/cpan.scm (%cpan-updater),
  guix/import/cran.scm (%cran-updater, %bioconductor-updater),
  guix/import/crate.scm (%crate-updater),
  guix/import/egg.scm (%egg-updater),
  guix/import/elpa.scm (%elpa-updater),
  guix/import/gem.scm (%gem-updater),
  guix/import/git.scm (%generic-git-updater),
  guix/import/github.scm (%github-updater),
  guix/import/gnome.scm (%gnome-updater),
  guix/import/hackage.scm (%hackage-updater),
  guix/import/hexpm.scm (%hexpm-updater),
  guix/import/kde.scm (%kde-updater),
  guix/import/launchpad.scm (%launchpad-updater),
  guix/import/minetest.scm (%minetest-updater),
  guix/import/opam.scm (%opam-updater),
  guix/import/pypi.scm (%pypi-updater),
  guix/import/stackage.scm (%stackage-updater),
  tests/import-github.scm (found-sexp)
  tests/transformations.scm ("options->transformation, with-latest"):
  Adjust fieldname accordingly.
2022-12-26 17:15:06 +01:00
Ricardo Wurmus
5a1a5677cd
import/cran: Add more mappings from sysnames to Guix package names.
* guix/import/cran.scm (transform-sysname): Add more mappings.
2022-12-19 18:29:45 +01:00
Ricardo Wurmus
993ef4af7e
import/cran: Add package name mapping.
* guix/import/cran.scm (transform-sysname): Add mapping from sqlite3 to sqlite.
2022-11-29 15:27:20 +01:00
zimoun
f4a7ccc976
guix: Upgrade to Bioconductor 3.16.
* guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to
3.16.
* guix/import/cran.scm (%bioconductor-version): Same.
2022-11-24 12:31:11 +01:00
jgart
670d30972f
import: egg: Fix typo in docstring.
* gnu/import/egg.scm (Commentary): Fix typo in Commentary docstring.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-20 12:00:04 +00:00
Philip McGrath
fd5e642513
import/utils: spdx-string->license: Support '+' operator.
Previously, '+' was supported only via special cases for deprecated
GNU identifiers like 'GPL-N+'.  This commit adds support
for other uses of '+', such as 'AFL-2.0+' and 'LPPL-1.0+'.

Strictly speaking, '+' is an operator, not part of the SPDX license
identifier, but it is useful to handle it here.

* guix/import/utils.scm (spdx-string->license): Support '+' operator.
* tests/import-utils.scm ("spdx-string->license"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-11-18 15:44:38 +01:00
Philip McGrath
07482dc051
import/utils: spdx-string->license: Match case-insensitively.
SPDX specifies that license identifiers (unlike the 'AND', 'OR', and
'WITH' operators) are matched case-insensitively.

* guix/import/utils.scm (%spdx-license-identifiers): New variable.
(spdx-string->license): Search in '%spdx-license-identifiers' using
'string-ci=?'.
* tests/import-utils.scm ("spdx-string->license"): New test.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-11-18 15:44:38 +01:00
Philip McGrath
b253efef23
import/utils: spdx-string->license: Fix incorrect docstring.
The result of 'spdx-string->license' is a symbol, not a license object.

* guix/import/utils.scm (spdx-string->license): Fix docstring.
(license->symbol): Mention 'license:' prefix in docstring.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-11-18 15:44:38 +01:00
Ricardo Wurmus
4073f43cbc
import/cran: Add package mapping for freetype.
* guix/import/cran.scm (transform-sysname): Map "freetype2" to "freetype".
2022-11-16 15:43:04 +01:00
Ricardo Wurmus
d4ec49d1da
import/cran: Add package name mapping for "booktabs".
* guix/import/cran.scm (transform-sysname): Add mapping for "booktabs".
2022-11-11 15:10:21 +01:00
Ricardo Wurmus
7d6843b631
import/cran: Add more strings to the list of invalid packages.
* guix/import/cran.scm (invalid-packages): Add "c++", "c++17", and
"posix.1-2001" to list of invalid packages.
2022-11-11 15:10:21 +01:00
Ricardo Wurmus
7d04f3ad28
import/utils: beautify-description: Update to pass tests.
* guix/import/utils.scm (beautify-description): Remove single quote wrapping;
escape @; exclude common abbreviations and titles from double-spacing; detect
more sentence fragments.
2022-10-05 23:59:48 +02:00
itd
8b2119a5e4
import: print: Quasiquote properties
* guix/import/print.scm (package->code): Quasiquote properties.
* tests/print.scm (pkg-with-properties, pkg-with-properties-source):
New variables.
("package with properties"): New test

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-29 22:59:48 +02:00
itd
61bd7bf469
import/utils: alist->package: Include properties.
* guix/import/utils.scm (alist->package): Process properties field in input
data and include it in the generated package.
* tests/import-utils.scm ("alist->package with properties"): New test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-29 22:59:48 +02:00
Ricardo Wurmus
afcc6d636f
import/cran: Process more complex license strings.
* guix/import/cran.scm (string->license): Add more match clauses.
(string->licenses): Split license conjunctions at "|" and apply
string->license on each license.
(description->package): Use string->licenses.
2022-09-28 22:10:33 +02:00