Commit graph

26 commits

Author SHA1 Message Date
Nicolas Goaziou
4ab789d441
guix: import texlive: Add UPSTREAM-NAME property when necessary.
* guix/import/texlive.scm (tlpdb->package): Add UPSTREAM-NAME property when necessary.
* tests/texlive.scm ("texlive->guix-package, with upstream-name property"):
Add new test.

Change-Id: I134a065cbe0a7f0ff4d72b0929dba4e4d46cfaeb
2024-08-31 10:45:37 +02:00
Nicolas Goaziou
415ed34860
guix: import texlive: Adjust to generate new source format.
* guix/import/texlive.scm (tlpdb->package): Adjust source according to new format.
* tests/texlive.scm (%fake-tlpdb): Add database revision.
("texlive->guix-package, no docfiles"):
("texlive->guix-package"):
("texlive->guix-package, with catalogue entry, no inputs"):
("texlive->guix-package, multiple licenses"):
("texlive->guix-package, with TeX format"): Update checks.

Change-Id: I60d5fe0f5f8db194c679dcb262f64c824cd19909
2024-08-31 10:45:33 +02:00
Nicolas Goaziou
416b196d74
gnu: TeX Live packages built from TEXLIVE-SOURCE use same version.
* gnu/packages/tex.scm (%texlive-version): New variable.
(texlive-source):
(texlive-libkpathsea)[version]:
(texlive-libptexenc)[version]:
(texlive-bin)[version]:
(texlive-scheme-basic)[version]:
(texlive-scheme-bookpub)[version]:
(texlive-scheme-context)[version]:
(texlive-scheme-full)[version]:
(texlive-scheme-gust)[version]:
(texlive-scheme-medium)[version]:
(texlive-scheme-minimal)[version]:
(texlive-scheme-small)[version]:
(texlive-scheme-tetex)[version]:
(texlive-collection-basic)[version]:
(texlive-collection-bibtexextra)[version]:
(texlive-collection-binextra)[version]:
(texlive-collection-context)[version]:
(texlive-collection-fontsextra)[version]:
(texlive-collection-fontsrecommended)[version]:
(texlive-collection-fontutils)[version]:
(texlive-collection-formatsextra)[version]:
(texlive-collection-games)[version]:
(texlive-collection-humanities)[version]:
(texlive-collection-langarabic)[version]:
(texlive-collection-langchinese)[version]:
(texlive-collection-langcjk)[version]:
(texlive-collection-langcyrillic)[version]:
(texlive-collection-langczechslovak)[version]:
(texlive-collection-langenglish)[version]:
(texlive-collection-langeuropean)[version]:
(texlive-collection-langfrench)[version]:
(texlive-collection-langgerman)[version]:
(texlive-collection-langgreek)[version]:
(texlive-collection-langitalian)[version]:
(texlive-collection-langjapanese)[version]:
(texlive-collection-langkorean)[version]:
(texlive-collection-langother)[version]:
(texlive-collection-langpolish)[version]:
(texlive-collection-langportuguese)[version]:
(texlive-collection-langspanish)[version]:
(texlive-collection-latex)[version]:
(texlive-collection-latexextra)[version]:
(texlive-collection-latexrecommended)[version]:
(texlive-collection-luatex)[version]:
(texlive-collection-mathscience)[version]:
(texlive-collection-metapost)[version]:
(texlive-collection-music)[version]:
(texlive-collection-pictures)[version]:
(texlive-collection-plaingeneric)[version]:
(texlive-collection-pstricks)[version]:
(texlive-collection-publishers)[version]:
(texlive-collection-xetex)[version]: Use new variable.
* guix/import/texlive.scm (tlpdb->package): Always use version from
%TEXLIVE-VERSION.
* tests/texlive.scm ("texlive->guix-package, meta-package"): Test change to
importer.

Since meta-packages are empty, they are not going through an updater.  This
change makes sure they always refer to an up-to-date version when the rest of
TeX Live is updated.

Change-Id: I55445e3337c1dea22158103d9ed952f75c3c4964

texlive-source

Change-Id: I198a361fd6df3c5dd2b4fa376e1ad623937f08cc
2024-08-31 10:45:32 +02:00
Nicolas Goaziou
9dc279e2fd
guix: import texlive: Handle versions.
* guix/import/texlive.scm (texlive-repository):
(texlive-repository-location):
(svn-command):
(version->revision):
(current-day):
(latest-texlive-tag):
(texlive->svn-multi-reference): New variables.
(tlpdb-file) Remove function.
(tlpdb): Add VERSION argument.
* guix/import/texlive.scm (list-upstream-inputs): Add VERSION and DATABASE
arguments.
(tlpdb->package): Do not use fixed version.  Instead, make use of the version
provided as an argument.  Add DATABASE argument for testing.
(texlive->guix-package): Do not memoize.  Allow providing any TeX Live release
tag as version.  Default to latest tag.  Add DATABASE argument for testing.
Improve docstring.

* tests/texlive.scm ("texlive->guix-package, no docfiles"):
("texlive->guix-package"):
("texlive->guix-package, with METAFONT files"):
("texlive->guix-package, with catalogue entry, no inputs"):
("texlive->guix-package, multiple licenses"):
("texlive->guix-package, meta-package"):
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"):
("texlive->guix-package, translate dependencies"):
("texlive->guix-package, lonely `hyphen-base' dependency and ARCH"):
("texlive->guix-package, single script, no extension"):
("texlive->guix-package, multiple scripts, with extensions"):
("texlive->guix-package, script with associated input"):
("texlive->guix-package, propagated binaries, no script"):
("texlive->guix-package, propagated binaries and scripts"):
("texlive->guix-package, with skipped propagated binaries"): Update tests.

Change-Id: I7576b6e31e9ec3ff84258b71d0c4dd180d2b5c38
2024-08-31 10:45:32 +02:00
Nicolas Goaziou
b4ce7359fb
guix: import texlive: Propagate binaries when necessary.
* guix/import/texlive.scm (no-bin-propagation-packages): New variable.
(list-binfiles): New function.
(linked-scripts): Renamed to...
(list-linked-scripts): ... this.  Now always return a list.
(tlpdb->package): Handle binary propagation.
* tests/texlive.scm (%fake-tlpdb): Add data for new tests.
("texlive->guix-package, propagated binaries, no script"):
("texlive->guix-package, propagated binaries and scripts"):
("texlive->guix-package, with skipped propagated binaries"): New tests.

Change-Id: I707ba33a10aa98ad27151724d3ecc4158db6b7cc
2024-08-31 10:45:30 +02:00
Tobias Geerinckx-Rice
1def0b98eb
tests: Fix texlive->guix-package test.
This follows up on commit 985cf777b9.

* tests/texlive.scm ("texlive->guix-package"): Don't expect
a texlive-texworks propagated input.
2023-08-13 02:00:00 +02:00
Tobias Geerinckx-Rice
ce4c11f8f3
tests: Fix texlive->guix-package test.
This follows up on commit 1619f2c18c.

* tests/texlive.scm ("texlive->guix-package"): Don't expect
a ‘license:’ prefix to ‘fsf-free’.
2023-08-13 02:00:00 +02:00
Nicolas Goaziou
ec97cf1569
guix: Let texlive importer handle linked scripts.
* guix/import/texlive.scm (tlpdb): Also retrieve so-called binfiles.
(formats):
(linked-scripts): New functions.
(tlpdb->package): Use new functions to set #:LINK-SCRIPTS argument and
possibly INPUTS.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, single script, no extension"):
("texlive->guix-package, multiple scripts, with extensions"):
("texlive->guix-package, script with associated input"):  New tests.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
ecc1c3af11
guix: texlive importer: Set #:texlive-latex-bin? when appropriate.
* guix/import/texlive.scm (latex-bin-dependency-tree): New function.
(tlpdb->package): Set #:TEXLIVE-LATEX-BIN? when appropriate.
* tests/texlive.scm ("texlive->guix-package, lonely `hyphen-base' dependency
and ARCH"): Update test.
2023-07-18 18:15:03 +02:00
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
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
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
Ludovic Courtès
654fcf9971
tests: Use quasiquoted 'match' patterns for package sexps.
Turns out it's easier to read.

* tests/cpan.scm ("cpan->guix-package"): Use a quasiquoted pattern.
* tests/elpa.scm (eval-test-with-elpa): Likewise.
* tests/gem.scm ("gem->guix-package")
("gem->guix-package with a specific version")
("gem-recursive-import")
("gem-recursive-import with a specific version"): Likewise.
* tests/hexpm.scm ("hexpm-recursive-import"): Likewise.
* tests/opam.scm ("opam->guix-package"): Likewise.
* tests/pypi.scm ("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"):
Likewise.
* tests/texlive.scm ("texlive->guix-package"): Likewise.
2023-05-31 23:50:06 +02:00
Maxim Cournoyer
ed854ad8e6
tests: Fix texlive->guix-package test.
The home page for the package had changed.

* tests/texlive.scm ("texlive->guix-package"): Match the home-page and
synopsis inexactly to avoid future similar breakages.
2023-04-19 20:12:58 -04:00
Ricardo Wurmus
c9a37f57cb
tests: Adjust texlive importer tests.
This is a follow-up to commit be7b314f3f.

* tests/texlive.scm: Add version field to expected output.
2022-07-22 23:03:46 +02:00
Ludovic Courtès
641b599d0b
import: texlive: Remove labels from 'propagated-inputs' field.
* guix/import/texlive.scm (tlpdb->package): Remove labels from
'propagated-inputs' field.
* tests/texlive.scm ("texlive->guix-package"): Adjust accordingly.
2022-01-13 23:11:19 +01:00
Ricardo Wurmus
10b2ad7dbf
tests: Fix texlive test by sorting locations.
* tests/texlive.scm ("texlive->guix-package"): Correct order of locations.
2022-01-11 20:26:39 +01:00
Ricardo Wurmus
f66da037b4
tests: Replace texlive importer tests.
* tests/texlive.scm (xml, sxml): Remove variables.
("fetch-sxml: returns SXML for valid XML", "sxml->package"): Remove tests.
("texlive->guix-package"): Add new test.
2021-11-18 13:17:57 +00:00
Maxime Devos
c05ceaf2b6
tests: do not hard code HTTP ports
Previously, test cases could fail if some process was listening
at a hard-coded port.  This patch eliminates most of these potential
failures, by automatically assigning an unbound port.  This should
allow for building multiple guix trees in parallel outside a build
container, though this is currently untested.

The test "home-page: Connection refused" in tests/lint.scm still
hardcodes port 9999, however.

* guix/tests/http.scm
  (http-server-can-listen?): remove now unused procedure.
  (%http-server-port): default to port 0, meaning the OS
  will automatically choose a port.
  (open-http-server-socket): remove the false statement claiming
  this procedure is exported and also return the allocated port
  number.
  (%local-url): raise an error if the port is obviously unbound.
  (call-with-http-server): set %http-server-port to the allocated
  port while the thunk is called.
* tests/derivations.scm: adjust test cases to use automatically
  assign a port.  As there is no risk of a port conflict now,
  do not make any tests conditional upon 'http-server-can-listen?'
  anymore.
* tests/elpa.scm: likewise.
* tests/lint.scm: likewise, and add a TODO comment about a port
  that is still hard-coded.
* tests/texlive.scm: likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-06 11:41:48 +01:00
Ludovic Courtès
6f918d69b4
import: texlive: Avoid uses of '@@' in tests.
* guix/import/texlive.scm (fetch-sxml, sxml->package): Export.
* tests/texlive.scm <top level>: Call '%http-server-port'.
("fetch-sxml: returns SXML for valid XML"): Use 'with-http-server' and
set 'current-http-proxy' instead of using 'mock'.
("sxml->package"): Remove use of '@@'.
2020-01-17 14:22:08 +01:00
Ricardo Wurmus
afbc94194e
guix: Add texlive importer.
* guix/import/texlive.scm: New file.
* guix/scripts/import/texlive.scm: New file.
* Makefile.am (MODULES): Add them.
* tests/texlive.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/scripts/import.scm (importers): Add texlive importer.
* doc/guix.texi (Invoking guix import): Document it.
2017-06-15 17:03:19 +02:00