[shepherd] 01/05: service: Update internal uses of deprecated GOOPS methods.

2024-05-18 Thread Ludovic Courtès
civodul pushed a commit to branch devel
in repository shepherd.

commit 61718984504611902f383b77b014225e3f9bd802
Author: Ludovic Courtès 
AuthorDate: Sat May 18 11:43:34 2024 +0200

service: Update internal uses of deprecated GOOPS methods.

* modules/shepherd/service.scm (display-service-documentation): Use
‘service-action-list’.
(root-service): Use ‘stop-service’.
---
 modules/shepherd/service.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 20c6df9..a504b3f 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1151,7 +1151,7 @@ the action."
   ((list-actions)
(local-output "~a ~a"
 (service-canonical-name service)
-(action-list service)))
+(service-action-list service)))
   (else
;; FIXME: Implement doc-help.
(local-output (l10n "Unknown keyword.  Try 'herd help'."))
@@ -2815,7 +2815,7 @@ Clients such as 'herd' can read it and format it in a 
human-readable way."
   "Halt the system."
   (lambda (running)
 (catch 'quit
-  (cut stop root-service)
+  (cut stop-service root-service)
   (lambda (key)
 (local-output (l10n "Halting..."))
 (halt)
@@ -2824,7 +2824,7 @@ Clients such as 'herd' can read it and format it in a 
human-readable way."
   "Halt the system and turn it off."
   (lambda (running)
 (catch 'quit
-  (cut stop root-service)
+  (cut stop-service root-service)
   (lambda (key)
 (local-output (l10n "Shutting down..."))
 (power-off)



[shepherd] branch devel updated (10e106e -> 0484726)

2024-05-18 Thread Ludovic Courtès
civodul pushed a change to branch devel
in repository shepherd.

from 10e106e  logger: Factorize ‘open-log-file’ procedure.
 new 6171898  service: Update internal uses of deprecated GOOPS methods.
 new fbf66b8  service: Remove exports for now nonexistent GOOPS methods.
 new 5bedf6d  doc: Document #:log-file for ‘make-systemd-constructor’.
 new d759b79  logger: Add support for race-free log rotation.
 new 0484726  Add log rotation service.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .guix/modules/shepherd-package.scm|  13 +-
 Makefile.am   |   5 +-
 configure.ac  |  21 +++
 doc/shepherd.texi |  80 +++
 modules/shepherd/logger.scm   |  60 +++--
 modules/shepherd/service.scm  |  28 +---
 modules/shepherd/service/log-rotation.scm | 211 ++
 modules/shepherd/system.scm.in|  12 +-
 po/POTFILES.in|   1 +
 tests/services/log-rotation-internal.scm  |  74 +++
 tests/services/log-rotation.sh| 100 ++
 11 files changed, 567 insertions(+), 38 deletions(-)
 create mode 100644 modules/shepherd/service/log-rotation.scm
 create mode 100644 tests/services/log-rotation-internal.scm
 create mode 100644 tests/services/log-rotation.sh



[shepherd] 03/05: doc: Document #:log-file for ‘make-systemd-constructor’.

2024-05-18 Thread Ludovic Courtès
civodul pushed a commit to branch devel
in repository shepherd.

commit 5bedf6d8d9ae2c7b9489b77846144909636a2f20
Author: Ludovic Courtès 
AuthorDate: Sat May 18 22:46:20 2024 +0200

doc: Document #:log-file for ‘make-systemd-constructor’.

* doc/shepherd.texi (Service De- and Constructors): Add #:log-file to
‘make-systemd-constructor’.
---
 doc/shepherd.texi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index aa8b4d6..d7268c4 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -1366,6 +1366,7 @@ below.
   [#:user #f] @
   [#:group #f] @
   [#:supplementary-groups '()] @
+  [#:log-file #f] @
   [#:directory (default-service-directory)] @
   [#:file-creation-mask #f] [#:create-session? #t] @
   [#:resource-limits '()] @



[shepherd] 04/05: logger: Add support for race-free log rotation.

2024-05-18 Thread Ludovic Courtès
civodul pushed a commit to branch devel
in repository shepherd.

commit d759b794f759ed19f16080762e54a25c5b81ed76
Author: Ludovic Courtès 
AuthorDate: Sat May 18 11:44:23 2024 +0200

logger: Add support for race-free log rotation.

* modules/shepherd/logger.scm (%service-file-logger)[log-line]: New
procedure.
Add clause for 'rotate messages.  Use ‘log-line’ when receiving a line.
(service-builtin-logger): Add clause for 'rotate messages.
(rotate-log-file): New procedure.
---
 modules/shepherd/logger.scm | 60 +
 1 file changed, 50 insertions(+), 10 deletions(-)

diff --git a/modules/shepherd/logger.scm b/modules/shepherd/logger.scm
index 6c3b35f..ba09926 100644
--- a/modules/shepherd/logger.scm
+++ b/modules/shepherd/logger.scm
@@ -37,7 +37,8 @@
 spawn-service-builtin-logger
 
 logger-recent-messages
-logger-file))
+logger-file
+rotate-log-file))
 
 (define default-log-history-size
   ;; Number of lines of service log kept in memory by default.
@@ -112,6 +113,17 @@ not exist."
   (define lines
 (make-channel))
 
+  (define (log-line line output)
+;; Write LINE to OUTPUT and return its timestamp.
+(let* ((now (current-time))
+   (prefix (strftime default-logfile-date-format
+ (localtime now
+  ;; Avoid (ice-9 format) to reduce heap allocations.
+  (put-string output prefix)
+  (put-string output line)
+  (newline output)
+  now))
+
   (lambda ()
 (spawn-fiber (line-reader input lines))
 
@@ -119,10 +131,12 @@ not exist."
   ;; Associate this logger with SERVICE.
   (register-service-logger service channel))
 
-(let log ((output (open-log-file file)))
+(let log ((output (open-log-file file))
+  (messages (ring-buffer history-size))
+  (service service))
   (call-with-port output
 (lambda (output)
-  (let loop ((messages (ring-buffer history-size))
+  (let loop ((messages messages)
  (service service))
 (match (get-message/choice lines channel)
   ((? eof-object?)
@@ -143,14 +157,29 @@ not exist."
   (('file reply)
(put-message reply file)
(loop messages service))
+  (('rotate rotated-file reply)
+   (local-output (l10n "Rotating '~a' to '~a'.")
+ file rotated-file)
+   (newline output)
+   (log-line (l10n "Rotating log.") output)
+   (close-port output)
+   (let ((output (catch 'system-error
+   (lambda ()
+ (rename-file file rotated-file)
+ (open-log-file file))
+   (lambda args
+ args
+ (put-message reply (port? output))
+ (if (port? output)
+ (log output messages service)
+ (begin
+   (local-output
+(l10n "Failed to rotate '~a' to '~a': ~a.")
+file rotated-file
+(strerror (system-error-errno output)))
+   (loop messages service)
   (line
-   (let* ((now (current-time))
-  (prefix (strftime default-logfile-date-format
-(localtime now
- ;; Avoid (ice-9 format) to reduce heap allocations.
- (put-string output prefix)
- (put-string output line)
- (newline output)
+   (let ((now (log-line line output)))
  (loop (ring-buffer-insert (cons now line)
messages)
service))
@@ -225,6 +254,9 @@ to @var{history-size} lines in memory."
 (('file reply)
  (put-message reply #f)   ;not logged to a file
  (loop pid messages service))
+(('rotate _ reply);nothing to rotate
+ (put-message reply #f)
+ (loop pid messages service))
 (line
  (let* ((pid (or pid
  (and service
@@ -278,3 +310,11 @@ reply."
 (define logger-file
   ;; Return the file name the log is written to or #f if there is none.
   (logger-control-message 'file))
+
+(define (rotate-log-file logger rotated-file)
+  "Ask @var{logger} to atomically rename its log file to @var{rotated-file}
+and re-open its log file with the same name as before.  Return @code{#f} on
+failure--e.g., ENOSPC or @var{logger} is not file-backed."
+  (let ((reply (make-channel)))
+(put-message logger `(rotate ,rotated-file ,reply))
+(get-message reply)))



[shepherd] 05/05: Add log rotation service.

2024-05-18 Thread Ludovic Courtès
civodul pushed a commit to branch devel
in repository shepherd.

commit 0484726801c2b5c1b7deecb9a96054c2c510ac71
Author: Ludovic Courtès 
AuthorDate: Sat May 18 11:41:53 2024 +0200

Add log rotation service.

* modules/shepherd/service/log-rotation.scm,
tests/services/log-rotation-internal.scm,
tests/services/log-rotation.sh: New files.
* Makefile.am (dist_servicesub_DATA): Add the module.
(TESTS): Add the tests.
* configure.ac: Add ‘--with-gzip’ and ‘--with-zstd’.  Substitute ‘GZIP’
and ‘ZSTD’.
* modules/shepherd/system.scm.in (%gzip-program, %zstd-program): New
variables.
* po/POTFILES.in: Add log-rotation.scm.
* .guix/modules/shepherd-package.scm (shepherd)[arguments]: Pass
‘--with-gzip’ and ‘--with-zstd’.
[inputs]: Add GZIP and ZSTD.
---
 .guix/modules/shepherd-package.scm|  13 +-
 Makefile.am   |   5 +-
 configure.ac  |  21 +++
 doc/shepherd.texi |  79 +++
 modules/shepherd/service/log-rotation.scm | 211 ++
 modules/shepherd/system.scm.in|  12 +-
 po/POTFILES.in|   1 +
 tests/services/log-rotation-internal.scm  |  74 +++
 tests/services/log-rotation.sh| 100 ++
 9 files changed, 512 insertions(+), 4 deletions(-)

diff --git a/.guix/modules/shepherd-package.scm 
b/.guix/modules/shepherd-package.scm
index 57b77ca..86f5f36 100644
--- a/.guix/modules/shepherd-package.scm
+++ b/.guix/modules/shepherd-package.scm
@@ -44,6 +44,7 @@
   #:use-module (guix modules)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
@@ -86,7 +87,15 @@
 (source source-checkout)
 (build-system gnu-build-system)
 (arguments
- (list #:configure-flags #~'("--localstatedir=/var")
+ (list #:configure-flags
+   #~(list "--localstatedir=/var"
+   (string-append "--with-gzip="
+  #$(this-package-input "gzip")
+  "/bin/gzip")
+   (string-append "--with-zstd="
+  #$(this-package-input "zstd")
+  "/bin/zstd"))
+
#:modules '((guix build gnu-build-system)
((guix build guile-build-system)
 #:select (target-guile-effective-version))
@@ -127,7 +136,7 @@
  (append (map specification->package development-packages)
  (list pkg-config guile-3.0-latest
guile-fibers-1.3)));for cross-compilation
-(inputs (list guile-3.0-latest guile-fibers-1.3))
+(inputs (list guile-3.0-latest guile-fibers-1.3 gzip zstd))
 (synopsis "System service manager")
 (description
  "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
diff --git a/Makefile.am b/Makefile.am
index 19cbf7a..17c79c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,7 @@ nodist_shepherdsub_DATA = \
   modules/shepherd/config.scm  \
   modules/shepherd/system.scm
 dist_servicesub_DATA = \
+  modules/shepherd/service/log-rotation.scm\
   modules/shepherd/service/monitoring.scm  \
   modules/shepherd/service/repl.scm\
   modules/shepherd/service/timer.scm
@@ -282,7 +283,9 @@ TESTS = \
   tests/services/monitoring.sh \
   tests/services/repl.sh   \
   tests/services/timer.sh  \
-  tests/services/timer-events.scm
+  tests/services/timer-events.scm  \
+  tests/services/log-rotation.sh   \
+  tests/services/log-rotation-internal.scm
 
 TEST_EXTENSIONS = .sh .scm
 EXTRA_DIST += $(TESTS)
diff --git a/configure.ac b/configure.ac
index 4c9a6ae..c992e92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,27 @@ AC_CANONICAL_HOST
 AC_PROG_MKDIR_P
 AC_PROG_SED
 
+dnl Compression programs.
+AC_ARG_WITH([gzip],
+  AS_HELP_STRING([--with-gzip=PROGRAM],
+[gzip program to use for log file compression]),
+  [GZIP="$withval"],
+  [GZIP="$(type -P gzip || echo gzip)"])
+
+AC_MSG_CHECKING([for gzip])
+AC_MSG_RESULT([$GZIP])
+AC_SUBST([GZIP])
+
+AC_ARG_WITH([zstd],
+  AS_HELP_STRING([--with-zstd=PROGRAM],
+[zstd program to use for log file compression]),
+  [ZSTD="$withval"],
+  [ZSTD="$(type -P zstd || echo zstd)"])
+
+AC_MSG_CHECKING([for zstd])
+AC_MSG_RESULT([$ZSTD])
+AC_SUBST([ZSTD])
+
 dnl The 'timeout' program, introduced in GNU Coreutils 7.0 (2008).
 AC_PATH_PROG([TIMEOUT], [timeout], [not-found])
 AM_CONDITIONAL([HAVE_TIMEOUT], [test "x$TIMEOUT" != "xnot-found"])
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index d7268c4..fa6c88f 

[shepherd] 02/05: service: Remove exports for now nonexistent GOOPS methods.

2024-05-18 Thread Ludovic Courtès
civodul pushed a commit to branch devel
in repository shepherd.

commit fbf66b8f9f77e75c3ca35af1699a1808aaea8fdf
Author: Ludovic Courtès 
AuthorDate: Fri May 17 22:16:48 2024 +0200

service: Remove exports for now nonexistent GOOPS methods.

This is a followup to e6e9fdfe33576d95ac40d38e2f3075578e8e4cf9.

* modules/shepherd/service.scm: Remove exports of deprecated bindings
that have been removed.
---
 modules/shepherd/service.scm | 22 +-
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index a504b3f..a92c0c3 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -171,27 +171,7 @@
 condition->sexp
 
 get-message*  ;XXX: for lack of a better place
-essential-task-thunk
-
-;; Deprecated bindings.
-provided-by
-required-by
-one-shot?
-transient?
-respawn?
-canonical-name
-running?
-stopped?
-enabled?
-enable
-disable
-start
-stop
-action-list
-make-actions
-lookup-action
-defines-action?
-lookup-services))
+essential-task-thunk))
 
 
 (define sleep (@ (fibers) sleep))



49/55: gnu: texlive-detex: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 794353cab900b1ce4fef6a9501a522b96ca33abb
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 19:21:47 2024 +0200

gnu: texlive-detex: Build executable.

* gnu/packages/tex.scm (texlive-detex): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `detex' as a single package.

Change-Id: I167228ce2984d65c17f47ac86951d2bde60e26af
---
 gnu/packages/tex.scm | 47 ++-
 1 file changed, 38 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 601d1d0626..0adca1ef95 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34211,16 +34211,45 @@ within the document, or in the document's private 
package file.")
 
 (define-public texlive-detex
   (package
+(inherit texlive-bin)
 (name "texlive-detex")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/detex.1"
-   "doc/man/man1/detex.man1.pdf")
- (base32
-  "08d017wn7a67pmp9b5yhnfg1x2q6f48qaa5ma4bplz9a782icwjy")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("detex"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-detex"
+ (delete "--disable-detex" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/detex"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/detex"
+  (invoke "make" "install"
+(inputs '())
 (home-page "https://ctan.org/pkg/detex;)
 (synopsis "Strip TeX from a source file")
 (description



43/55: gnu: texlive-dvipos: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit d034480c7ba8f955f9e4a5fb4a7158c9b1d2606c
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 18:28:32 2024 +0200

gnu: texlive-dvipos: Build executables.

* gnu/packages/tex.scm (texlive-dvipos): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dvipos' as a single package.

Change-Id: I797fb886c9ebf78d141040da7949914bf3a2bb54
---
 gnu/packages/tex.scm | 46 +-
 1 file changed, 37 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3c20071f8f..d647f2c006 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34606,16 +34606,44 @@ not read the postamble, so it can be started before 
TeX finishes.")
 
 (define-public texlive-dvipos
   (package
+(inherit texlive-bin)
 (name "texlive-dvipos")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dvipos.1"
-   "doc/man/man1/dvipos.man1.pdf")
- (base32
-  "0dmaas4m9y4px53vlg0jr73xviki338fm2n176l8ldwqj0vvq1b8")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvipos"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvipos"
+ (delete "--disable-dvipos" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvipos"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvipos"
+  (invoke "make" "install"
 (home-page "https://www.tug.org/texlive/;)
 (synopsis "Support DVI @samp{pos:} specials used by ConTeXt DVI output")
 (description



51/55: gnu: texlive-bibtex8: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 32a1c6adef23447363146827721c656f85ea9361
Author: Nicolas Goaziou 
AuthorDate: Mon May 13 09:30:16 2024 +0200

gnu: texlive-bibtex8: Build executable.

* gnu/packages/tex.scm (texlive-bibtex8-bin): New variable.
(texlive-bibtex8)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-BIBTEX8-BIN.

Change-Id: Ibf5ea7150d9bb6a8979a22f736886ebded2427a5
---
 gnu/packages/tex.scm | 76 
 1 file changed, 76 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ce3853de17..41d94f9964 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -33610,6 +33610,71 @@ Japanese, for XeLaTeX.")
 (description "This package provides a BibLaTeX and Biber cheat sheet.")
 (license license:lppl1.3+)))
 
+(define texlive-bibtex8-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-bibtex8-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs with-files?)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") dirs)))
+  (or with-files?
+  (eq? 'directory (stat:type (stat 
file
+(delete-other-directories "libs" '() #f)
+(delete-other-directories "utils" '() #f)
+;; Tests require "texmf.cnf" to be present in the tree.  Also test
+;; data is spread across multiple directories, which need to be
+;; preserved.
+(delete-other-directories "texk" '("bibtex-x" "kpathsea" "tests" 
"web2c") #f)
+(delete-other-directories "texk/web2c" '("tests") #t)
+(with-directory-excursion "texk/kpathsea"
+  (for-each
+   delete-file-recursively
+   (scandir "." (lambda (f)
+  (not (member f '("." ".." "texmf.cnf")))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-bibtex-x"
+ "--enable-bibtex8"
+ "--disable-bibtexu"
+ (delete "--enable-web2c" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(add-after 'unpack 'locate-libkpathsea
+  (lambda _
+(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
+  (substitute* "texk/bibtex-x/Makefile.in"
+(("(KPATHSEA_LIBS =).*" _ lead)
+ (format #f "~a \"-L~a/lib -lkpathsea\"\n" lead 
kpathsea))
+(add-after 'unpack 'skip-bibtexu-test
+  ;; This package does not build "bibtexu" binary; the test below
+  ;; is therefore bound to fail.  Skip that part.
+  (lambda _
+(substitute* "texk/bibtex-x/tests/bibtex8u-mem.test"
+  (("\\./bibtexu .*") "exit 0\n"
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/bibtex-x"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/bibtex-x"
+  (invoke "make" "install"
+(inputs '(
+
 (define-public texlive-bibtex8
   (package
 (name "texlive-bibtex8")
@@ -33623,6 +33688,17 @@ Japanese, for XeLaTeX.")
   "1ywv5rdk08dnrqr09pnjzff37x2c9m5i1wjzfsjnvm068is58c7s")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-bibtex8-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+
+(native-inputs (list texlive-bibtex8-bin))
 (home-page "https://ctan.org/pkg/bibtex8;)
 (synopsis "BibTeX variant supporting 8-bit encodings")
 (description



44/55: gnu: texlive-dvipdfmx: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8c71c04c3f4a9304ab43154c980666a645b95994
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 18:43:11 2024 +0200

gnu: texlive-dvipdfmx: Build executables.

* gnu/packages/tex.scm (texlive-dvipdfmx-bin): New variable.
(texlive-dvipdfmx)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-DVIPDFMX-BIN.

Change-Id: Ic10c4f74505689c1e1ba59103c7811de922362dc
---
 gnu/packages/tex.scm | 50 +-
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d647f2c006..b4bcce3b8e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -38856,6 +38856,47 @@ running the script, you should have a working font 
installation in your local
 TeX tree.")
 (license license:lppl)))
 
+(define texlive-dvipdfmx-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dvipdfmx-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvipdfm-x"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvipdfm-x"
+ (delete "--disable-dvipdfm-x" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvipdfm-x"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvipdfm-x"
+  (invoke "make" "install"
+(inputs (list libpaper libpng
+
 (define-public texlive-dvipdfmx
   (package
 (name "texlive-dvipdfmx")
@@ -38890,7 +38931,14 @@ TeX tree.")
   (add-after 'unpack 'delete-map-file
 ;; This map file is supposed to be generated in a profile hook.
 (lambda _
-  (delete-file "fonts/map/dvipdfmx/updmap/kanjix.map"))
+  (delete-file "fonts/map/dvipdfmx/updmap/kanjix.map")))
+  (add-after 'install 'install-bin
+(lambda _
+  (let ((source
+ #$(this-package-native-input "texlive-dvipdfmx-bin")))
+(copy-recursively (string-append source "/bin")
+  (string-append #$output "/bin"
+(native-inputs (list texlive-dvipdfmx-bin))
 (propagated-inputs (list texlive-glyphlist))
 (home-page "https://ctan.org/pkg/dvipdfmx;)
 (synopsis "Extended version of dvipdfm")



50/55: gnu: texlive-bin: Only build "web2c" package.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit e90983bb9ca7bc475ae0da87d48c4fd2c59a90d8
Author: Nicolas Goaziou 
AuthorDate: Mon May 13 09:25:02 2024 +0200

gnu: texlive-bin: Only build "web2c" package.

* gnu/packages/tex.scm (texlive-bin)[arguments]<#:parallel-tests?>: Ignore,
since it doesn't apply anymore.
<#:configure-flags>:  Remove all "--with-system-*" flags, which are implied.
Besides, all referenced libraries are already removed from the source.
Prevent building any package but "web2c".
<#:phases>: Add phase to cope with XeTeX requirements about xdvipdfmx
availability.
[native-inputs]: Remove GROFF-MINIMAL.
[inputs]: Remove CONFIG, FONTFORGE, GD, GHOSTSCRIPT, LIBPAPER, LIBPNG, 
LIBXAW,
TCSH and ZLIB.
* gnu/packages/tex.scm (texlive-afm2pl-bin):
(texlive-autosp-bin):
(texlive-cjkutils):
(texlive-gregoriotex-bin):
(texlive-m-tx-bin):
(texlive-pmx-bin):
(texlive-velthuis-bin):
(texlive-vlna-bin):
(texlive-chktex):
(texlive-detex):
(texlive-dtl):
(texlive-dvi2tty):
(texlive-dvidvi):
(texlive-dviljk):
(texlive-dviout-util):
(texlive-dvipng):
(texlive-dvipos):
(texlive-dvisvgm):
(texlive-ptex-bin):
(texlive-lcdftypetools):
(texlive-dvipdfmx-bin):
(texlive-dvips-bin):
(texlive-lacheck):
(texlive-seetexk):
(texlive-ps2eps):
(texlive-ps2pk):
(texlive-psutils-bin):
(texlive-t1utils):
(texlive-tex4ht-bin):
(texlive-tpic2pdftex-bin):
(texlive-ttfutils-bin):
(texlive-upmendex-bin):
(texlive-xpdfopen):
(texlive-gsftopk-bin):
(texlive-xml2pmx):
(texlive-makeindex-bin):
(texlive-xindy):
(texlive-xdvi-bin): Adapt to configure flags changes in TEXLIVE-BIN.

Change-Id: I9140d0616b690505cb08d82a24b6b3094e53e5af

bin

Change-Id: I035b4470d7897ea9daceccdf7dcbc6cfb1dbbaeb
---
 gnu/packages/tex.scm | 250 ++-
 1 file changed, 66 insertions(+), 184 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0adca1ef95..ce3853de17 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -715,9 +715,17 @@ and should be preferred to it whenever a package would 
otherwise depend on
 ;; as an external dependency, pplib and xpdf which aren't
 ;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
 (delete-other-directories "libs" '("lua53" "luajit" "pplib" 
"xpdf"))
-;; Ignore all "utils": all of them are installed through their
+;; Remove all packages: they are installed through their
 ;; respective regular TeX Live package.
-(delete-other-directories "utils" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("kpathsea" "tests" "web2c"))
+;; Tests require the "texmf.cnf" file to still be present in the
+;; tree.
+(with-directory-excursion "texk/kpathsea"
+  (for-each
+   delete-file-recursively
+   (scandir "." (lambda (f)
+  (not (member f '("." ".." "texmf.cnf")))
 (build-system gnu-build-system)
 (arguments
  (list
@@ -727,7 +735,6 @@ and should be preferred to it whenever a package would 
otherwise depend on
   (srfi srfi-1)
   (srfi srfi-26))
   #:out-of-source? #t
-  #:parallel-tests? #f  ;bibtex8.test fails otherwise
   #:configure-flags
   #~(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
   (list "--with-banner-add=/GNU Guix"
@@ -735,22 +742,8 @@ and should be preferred to it whenever a package would 
otherwise depend on
 "--disable-native-texlive-build"
 "--disable-static"
 "--disable-linked-scripts"
-"--with-system-cairo"
-"--with-system-freetype2"
-"--with-system-gd"
-"--with-system-gmp"
-"--with-system-graphite2"
-"--with-system-harfbuzz"
-"--with-system-icu"
-"--with-system-libgs"
-"--with-system-libpaper"
-"--with-system-libpng"
-"--with-system-mpfr"
-"--with-system-pixman"
-"--with-system-potrace"
-"--with-system-teckit"
-"--with-system-zlib"
-"--with-system-zziplib"
+"--disable-all-pkgs"
+"--enable-web2c"
 ;; Help locating external kpathsea.  For some reason
 ;; PKG-CONFIG is unable to find it.
 "--with-system-kpathsea"
@@ -762,36 +755,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
'("--disable-luajittex"

40/55: gnu: texlive-gsftopk: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 126d6383276c5e259e1057e187c4c5cb1152883e
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 17:43:39 2024 +0200

gnu: texlive-gsftopk: Build executables.

* gnu/packages/tex.scm (texlive-gsftopk-bin): New variable.
(texlive-gsftopk)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-GSFTOPK-BIN.

Change-Id: Ie3b16ec84558cda3a3851598ac99d9d4c6a09659
---
 gnu/packages/tex.scm | 51 +++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 644ef64cb6..f96be0c63a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -47570,6 +47570,47 @@ documents.  It comprises the packages @code{color}, 
@code{graphics},
 definition files for Greek text font encodings for use with @code{fontenc}.")
 (license license:lppl1.3+)))
 
+(define texlive-gsftopk-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-gsftopk-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("gsftopk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-gsftopk"
+ (delete "--disable-gsftopk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/gsftopk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/gsftopk"
+  (invoke "make" "install"
+(inputs '(
+
 (define-public texlive-gsftopk
   (package
 (name "texlive-gsftopk")
@@ -47583,6 +47624,16 @@ definition files for Greek text font encodings for use 
with @code{fontenc}.")
   "1qlac704qbm7kq762z0b887wfncprpcm8zj2lb4nag0wzdrrjdq5")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-gsftopk-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-gsftopk-bin))
 (home-page "https://ctan.org/pkg/gsftopk;)
 (synopsis "Convert Ghostscript fonts to PK files")
 (description



27/55: gnu: texlive-xml2pmx: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2320e0f06f8aae6e003dd84e123c39ad3191b5ed
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 18:01:15 2024 +0200

gnu: texlive-xml2pmx: Build executable.

* gnu/packages/tex.scm (texlive-xml2pmx): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `xml2pmx' as a single package.

* gnu/packages/tex.scm (texlive-bin): Do not build xml2pmx.

Change-Id: I4dc626a4f03266750cbe1a55a6197695ff8512bd
---
 gnu/packages/tex.scm | 46 +-
 1 file changed, 37 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 826fbebdbb..ce858c27c2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -776,6 +776,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "texdoctk"
   "upmendex"
   "xindy"
+  "xml2pmx"
   "xpdfopen"
   #:phases
   #~(modify-phases %standard-phases
@@ -47270,16 +47271,43 @@ correctly; and define two extra commands: 
@code{\\vfrac} and
 
 (define-public texlive-xml2pmx
   (package
+(inherit texlive-bin)
 (name "texlive-xml2pmx")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/xml2pmx.1"
-   "doc/man/man1/xml2pmx.man1.pdf")
- (base32
-  "1d3ralqh0b71scd59b4hmm707yfrz1rj28ni2lzkhbb1ql73bvah")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("xml2pmx"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-xml2pmx"
+ (delete "--disable-xml2pmx" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/xml2pmx"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/xml2pmx"
+  (invoke "make" "install"
 (home-page "https://ctan.org/pkg/xml2pmx;)
 (synopsis "Convert MusicXML to PMX and MusiXTeX")
 (description



42/55: gnu: texlive-dvips: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 064fd1f511148e033dfafce55689465331e2f3ae
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 18:22:55 2024 +0200

gnu: texlive-dvips: Build executables.

* gnu/packages/tex.scm (texlive-dvips-bin): New variable.
(texlive-dvips)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-DVIPS-BIN.

Change-Id: I897c222feca6ae864ef815f026a0318a4c150593
---
 gnu/packages/tex.scm | 57 
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2acf2e605e..3c20071f8f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -38875,6 +38875,53 @@ executable.  A secondary design goal is to support as 
many PDF features as
 does pdfTeX.")
 (license license:gpl3+)))
 
+(define texlive-dvips-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-dvips-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+;; XXX: One test needs "texmf.cnf" file to be present in the tree.
+(delete-other-directories "texk" '("dvipsk" "kpathsea" "tests"))
+(with-directory-excursion "texk/kpathsea"
+  (for-each
+   delete-file-recursively
+   (scandir "." (lambda (f)
+  (not (member f '("." ".." "texmf.cnf")))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvipsk"
+ (delete "--disable-dvipsk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvipsk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvipsk"
+  (invoke "make" "install"
+(inputs '(
+
 (define-public texlive-dvips
   (package
 (name "texlive-dvips")
@@ -38895,6 +38942,16 @@ does pdfTeX.")
   "0x11wx9p16z4nxhlbfqlgi5svnr96j1hnvdl9fpv1sr3n1j8m79g")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-dvips-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-dvips-bin))
 (home-page "https://ctan.org/pkg/dvips;)
 (synopsis "DVI to PostScript drivers")
 (description



39/55: gnu: texlive-makeindex: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit f4d1f94e71849318c01d5a6b51814aa9ae7f
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 17:39:28 2024 +0200

gnu: texlive-makeindex: Build executables.

* gnu/packages/tex.scm (texlive-makeindex-bin): New variable.
(texlive-makeindex)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-MAKEINDEX-BIN.

Change-Id: I60ab3dd2ab1acff58f6d8b9018d74ef0af0454f4
---
 gnu/packages/tex.scm | 51 +++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 178f39ca59..644ef64cb6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -54489,6 +54489,47 @@ always (re)defines a command.  There is also 
@code{\\makeenvironment} and
 @code{\\provideenvironment} for environments.")
 (license license:lppl1.3c+)))
 
+(define texlive-makeindex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-makeindex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "texk" '("makeindexk" "tests"))
+(delete-other-directories "utils" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-makeindexk"
+ (delete "--disable-makeindexk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/makeindexk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/makeindexk"
+  (invoke "make" "install"
+(inputs '(
+
 (define-public texlive-makeindex
   (package
 (name "texlive-makeindex")
@@ -54506,6 +54547,16 @@ always (re)defines a command.  There is also 
@code{\\makeenvironment} and
   "0m01m0x1kf10yvzxgrkvpic0amsr0g6q2r2wsg5f4ngybq4y9gyi")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input 
"texlive-makeindex-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-makeindex-bin))
 (home-page "https://ctan.org/pkg/makeindexk;)
 (synopsis "Makeindex development sources")
 (description



45/55: gnu: texlive-dviout-util: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit eba279b321fe3380864c2e4bdef2881e789b012d
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 19:06:03 2024 +0200

gnu: texlive-dviout-util: Build executables.

* gnu/packages/tex.scm (texlive-dviout-util): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dviout-util' as a single package.

Change-Id: I2bd9c9ee0c159eb7fdda390307ebeb79878a5aca
---
 gnu/packages/tex.scm | 49 ++---
 1 file changed, 38 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b4bcce3b8e..b20edf8c02 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34530,18 +34530,45 @@ file.  It also supports XeTeX XDV format.")
 
 (define-public texlive-dviout-util
   (package
+(inherit texlive-bin)
 (name "texlive-dviout-util")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/chkdvifont.1"
-   "doc/man/man1/chkdvifont.man1.pdf"
-   "doc/man/man1/dvispc.1"
-   "doc/man/man1/dvispc.man1.pdf")
- (base32
-  "098pksgf2iamq96rmzg5fw7i9dlpvdksficsz1bf8k8z4djnbk8n")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dviout-util" "tests"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dviout-util"
+ (delete "--disable-dviout-util" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dviout-util"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dviout-util"
+  (invoke "make" "install"
+(inputs (list texlive-libptexenc))
 (home-page "https://www.tug.org/texlive/;)
 (synopsis "Utilities from the @code{dviout} package")
 (description



24/55: gnu: texlive-xpdfopen: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit e5ae1639178c6d9b1884179ea57d6b7ab0b39a3a
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 17:01:21 2024 +0200

gnu: texlive-xpdfopen: Build executables.

* gnu/packages/tex.scm (texlive-xpdfopen): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `xpdfopen' as a single package.
[native-inputs]: Add PKG-CONFIG.
[inputs]: Add LIBXT.

* gnu/packages/tex.scm (texlive-bin): Do not build xpdfopen.

Change-Id: Iffcdbec4cd1ed720b9557acabe9276fb7e95e90b
---
 gnu/packages/tex.scm | 52 
 1 file changed, 40 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c6dae667f0..f044a867fa 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -778,7 +778,8 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "psutils"
   "t1utils"
   "upmendex"
-  "xindy"
+  "xindy"
+  "xpdfopen"
   #:phases
   #~(modify-phases %standard-phases
   (add-after 'unpack 'locate-external-kpathsea
@@ -45820,18 +45821,45 @@ integer (given as a string) as a Cistercian numeral.")
 
 (define-public texlive-xpdfopen
   (package
+(inherit texlive-bin)
 (name "texlive-xpdfopen")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/pdfclose.1"
-   "doc/man/man1/pdfclose.man1.pdf"
-   "doc/man/man1/pdfopen.1"
-   "doc/man/man1/pdfopen.man1.pdf")
- (base32
-  "130wvaypfrg9sav0pdcdy1g10fll8pqcsqsy70fxlzzr937glsh1")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("xpdfopen"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-xpdfopen"
+ (delete "--disable-xpdfopen" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/xpdfopen"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/xpdfopen"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list libxt))
 (home-page "https://ctan.org/pkg/xpdfopen;)
 (synopsis "Commands to control PDF readers, under X11")
 (description



26/55: gnu: texlive-texdoctk: Fix runtime error.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 5c37ce53bd91b57767e6a3ff75f0f5d9d8a03b2b
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 17:56:15 2024 +0200

gnu: texlive-texdoctk: Fix runtime error.

* gnu/packages/tex.scm (texlive-texdoctk)[arguments]: Wrap Per script so 
Perl
library is found at runtime.
[inputs]: Add PERL-TK.

* gnu/packages/tex.scm (texlive-bin): Do not build texdoctk.

Change-Id: Ibf867bbf5fd5f241878d7832f40536eec0d0d13c
---
 gnu/packages/tex.scm | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 06ca76016f..826fbebdbb 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -773,6 +773,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "ps2eps"
   "psutils"
   "t1utils"
+  "texdoctk"
   "upmendex"
   "xindy"
   "xpdfopen"
@@ -43505,8 +43506,16 @@ other configuration can be extensively customized.")
   "18xxivpgjdh8v6kg0b45zjv18sm9a4ljpwk6a4cghg5l5yggrjcx")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "texdoctk.pl")))
-(inputs (list perl))
+(arguments
+ (list
+  #:link-scripts #~(list "texdoctk.pl")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'link-scripts 'wrap-perl-script
+(lambda _
+  (wrap-program (string-append #$output "/bin/texdoctk")
+`("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")
+(inputs (list perl perl-tk))
 (propagated-inputs (list texlive-kpathsea))
 (home-page "https://ctan.org/pkg/texdoctk;)
 (synopsis "Easy access to package documentation")



29/55: gnu: texlive-vlna: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b69d0d9e9ca80aaa9f3d7e7a3026dca99ad3c810
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 12:18:01 2024 +0200

gnu: texlive-vlna: Build executable.

* gnu/packages/tex.scm (texlive-vlna-bin): New variable.
(texlive-vlna)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-VLNA-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build vlna.

Change-Id: I5ac958d7a0d62fc3b94c6b63137482e56b14b8ae
---
 gnu/packages/tex.scm | 53 
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4d0e3c1652..c755f3fec9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -776,6 +776,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "texdoctk"
   "tpic2pdftex"
   "upmendex"
+  "vlna"
   "xindy"
   "xml2pmx"
   "xpdfopen"
@@ -32428,6 +32429,48 @@ strong on layout, from simple alternate-line 
indentation to the @code{Mouse's
 tale} from @emph{Alice in Wonderland}.")
 (license license:lppl)))
 
+(define texlive-vlna-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-vlna-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("vlna"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-vlna"
+ (delete "--disable-vlna" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/vlna"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/vlna"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '(
+
 (define-public texlive-vlna
   (package
 (name "texlive-vlna")
@@ -32440,6 +32483,16 @@ tale} from @emph{Alice in Wonderland}.")
   "0nfb7mj6y9d4n89z59ppi96grfylwky97mxcv9rjflr5kpqlpga2")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-vlna-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-vlna-bin))
 (home-page "https://ctan.org/pkg/vlna;)
 (synopsis "Add @samp{~} after non-syllabic preposition, for Czech/Slovak")
 (description



54/55: gnu: texlive-libkpathsea: Allow LuaLaTeX finding fonts on the system.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 4dbc4e7370b9f06a3598316f5ad8f8932f139ba5
Author: Nicolas Goaziou 
AuthorDate: Tue May 14 19:45:24 2024 +0200

gnu: texlive-libkpathsea: Allow LuaLaTeX finding fonts on the system.

* gnu/packages/tex.scm (texlive-libkpathsea)[arguments]<#:phases>: Set
OSFONTDIR appropriately.

Change-Id: I70386c177ce3a22061fab0b0b3b7634731a1bbda
---
 gnu/packages/tex.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7ad68d91ec..c02fcf65e0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -263,6 +263,8 @@
 (("^TEXMFCNF = " lead)
  (string-append
   "TEXMFCNF = " #$output "/share/texmf-dist/web2c\n" lead))
+;; Help TeX finding fonts installed on the system.
+(("^OSFONTDIR = .*") "OSFONTDIR = {$XDG_DATA_DIRS}\n")
 ;; Don't truncate lines.
 (("^error_line = .*$") "error_line = 254\n")
 (("^half_error_line = .*$") "half_error_line = 238\n")



35/55: gnu: texlive-tex4ht: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 84b29aa0b91a2c55db8b608581d66c852d546a6b
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 15:11:29 2024 +0200

gnu: texlive-tex4ht: Build executables.

* gnu/packages/tex.scm (texlive-tex4ht-bin): New variable.
(texlive-tex4ht)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-TEX4HT-BIN.

Change-Id: I9f991d081a0580bc2fa45c5be49d1ae9801d356f
---
 gnu/packages/tex.scm | 77 
 1 file changed, 65 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 291fe88f38..72186ccf71 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -43426,6 +43426,47 @@ package written by Bill Mitchell, which is intended to 
print a term calendar
 for use in planning a class.")
 (license license:lppl1.3c)))
 
+(define texlive-tex4ht-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-tex4ht-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("tex4htk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-tex4htk"
+ (delete "--disable-tex4htk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/tex4htk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/tex4htk"
+  (invoke "make" "install"
+(inputs '(
+
 (define-public texlive-tex4ht
   (package
 (name "texlive-tex4ht")
@@ -43442,18 +43483,30 @@ for use in planning a class.")
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
 (arguments
- (list #:link-scripts
-   #~(list "ht.sh"
-   "htcontext.sh"
-   "htlatex.sh"
-   "htmex.sh"
-   "httex.sh"
-   "httexi.sh"
-   "htxelatex.sh"
-   "htxetex.sh"
-   "mk4ht.pl"
-   "xhlatex.sh")))
-(inputs (list perl))
+ (list
+  #:link-scripts #~(list "ht.sh"
+ "htcontext.sh"
+ "htlatex.sh"
+ "htmex.sh"
+ "httex.sh"
+ "httexi.sh"
+ "htxelatex.sh"
+ "htxetex.sh"
+ "mk4ht.pl"
+ "xhlatex.sh")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'link-scripts 'install-bin
+(lambda* (#:key inputs native-inputs #:allow-other-keys)
+  (let ((source #$(this-package-native-input 
"texlive-tex4ht-bin")))
+(with-directory-excursion (string-append #$output "/bin")
+  ;; Install non-scripts, already taken care of with
+  ;; `link-scripts' phase.
+  (for-each (lambda (f) (install-file f "."))
+(find-files (string-append source "/bin")
+(lambda (_ s)
+  (eq? 'regular (stat:type 
s
+(native-inputs (list texlive-tex4ht-bin))
 (home-page "https://ctan.org/pkg/tex4ht;)
 (synopsis "Convert (La)TeX to HTML/XML")
 (description



04/55: gnu: texlive-bin, texlive-kpathsea: Refer to TEXLIVE-SOURCE.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit c29fcc46a2ed1bdc0579e12e23bdcd2a99413039
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 18:19:52 2024 +0200

gnu: texlive-bin, texlive-kpathsea: Refer to TEXLIVE-SOURCE.

* gnu/packages/tex.scm (texlive-libkpathsea)[version]: Use regular version.
[source]: Inherit from TEXLIVE-SOURCE.
* gnu/packages/tex.scm (texlive-bin)[version]: Use regular version.
[source]: Inherit from TEXLIVE-SOURCE.
[arguments]<#:configure-flags>: Do not build executables already built in
other packages.
<#:phases>: Remove phases handled in their specific packages.
[native-inputs]: Add PERL.
[inputs]: Remove PERL, PYTHON, and RUBY-2.7.

Change-Id: Id9578a9b09a875e8de875f70c9c0f152be50433d
---
 gnu/packages/tex.scm | 82 
 1 file changed, 31 insertions(+), 51 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b529e2ec4f..0ec3b52d3a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -176,27 +176,14 @@
 (define-public texlive-libkpathsea
   (package
 (name "texlive-libkpathsea")
-(version "20230313")
+(version (number->string %texlive-revision))
 (source
  (origin
-   (method url-fetch)
-   (uri (string-append "ftp://tug.org/historic/systems/texlive/;
-   (string-take version 4)
-   "/texlive-" version "-source.tar.xz"))
-   (sha256
-(base32
- "1fbrkv7g9j6ipmwjx27l8l9l974rmply8bhf7c2iqc6h3q7aly1q"))
+   (inherit texlive-source)
(modules '((guix build utils)
   (ice-9 ftw)))
(snippet
 #~(begin
-(with-directory-excursion "libs"
-  (for-each
-   delete-file-recursively
-   (scandir "."
-(lambda (file)
-  (and (not (member file '("." "..")))
-   (eq? 'directory (stat:type (stat file
 (with-directory-excursion "texk"
   (let ((preserved-directories '("." ".." "kpathsea")))
 (for-each
@@ -204,7 +191,14 @@
  (scandir "."
   (lambda (file)
 (and (not (member file preserved-directories))
- (eq? 'directory (stat:type (stat 
file)
+ (eq? 'directory (stat:type (stat file)
+(with-directory-excursion "libs"
+  (for-each
+   delete-file-recursively
+   (scandir "."
+(lambda (file)
+  (and (not (member file '("." "..")))
+   (eq? 'directory (stat:type (stat 
file
 (build-system gnu-build-system)
 (arguments
  (list
@@ -633,11 +627,14 @@ and should be preferred to it whenever a package would 
otherwise depend on
 (define-deprecated-package texlive-ukrhyph texlive-hyphen-complete)
 
 (define-public texlive-bin
-  (package/inherit texlive-libkpathsea
+  (package
 (name "texlive-bin")
+(version (number->string %texlive-revision))
 (source
  (origin
-   (inherit (package-source texlive-libkpathsea))
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
(snippet
 ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
 #~(with-directory-excursion "libs"
@@ -651,6 +648,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
(and (not (member file 
preserved-directories))
 (eq? 'directory
  (stat:type (stat file
+(build-system gnu-build-system)
 (arguments
  (list
   #:modules '((guix build gnu-build-system)
@@ -660,6 +658,15 @@ and should be preferred to it whenever a package would 
otherwise depend on
   (srfi srfi-26))
   #:out-of-source? #t
   #:parallel-tests? #f  ;bibtex8.test fails otherwise
+  ;; Disable tests on some architectures to cope with a failure of
+  ;; luajiterr.test.
+  ;;
+  ;; XXX FIXME fix luajit properly on these architectures.
+  #:tests? (let ((s (or (%current-target-system)
+(%current-system
+ (not (or (string-prefix? "aarch64" s)
+  (string-prefix? "mips64" s)
+  (string-prefix? "powerpc64le" s
   #:configure-flags
   #~(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
   (list "--with-banner-add=/GNU Guix"
@@ -667,7 +674,6 @@ and should be preferred to it whenever a package would 
otherwise depend on
 "--disable-native-texlive-build"
 

32/55: gnu: texlive-bin: Ignore "utils" directory.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2cb184bb57b6a7f5a531acef7090ddc87c05ed4b
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 12:32:35 2024 +0200

gnu: texlive-bin: Ignore "utils" directory.

* gnu/packages/tex.scm (texlive-bin)[origin]: Ignore "utils" 
executables.

Change-Id: I79e61e6ce94b4e28681a499c7e34a76cebe68725
---
 gnu/packages/tex.scm | 29 ++---
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index dd2a92324b..e312f4b9e0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -700,17 +700,24 @@ and should be preferred to it whenever a package would 
otherwise depend on
(modules '((guix build utils)
   (ice-9 ftw)))
(snippet
-#~(with-directory-excursion "libs"
-(let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" 
"xpdf")))
-  ;; Delete bundled software, except Lua which cannot easily be
-  ;; used as an external dependency, pplib and xpdf which aren't
-  ;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
-  (for-each delete-file-recursively
-(scandir "."
- (lambda (file)
-   (and (not (member file 
preserved-directories))
-(eq? 'directory
- (stat:type (stat file
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file
+   (append '("." "..") dirs)))
+  (eq? 'directory
+   (stat:type (stat file)))
+;; Delete bundled software, except Lua which cannot easily be used
+;; as an external dependency, pplib and xpdf which aren't
+;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
+(delete-other-directories "libs" '("lua53" "luajit" "pplib" 
"xpdf"))
+;; Ignore all "utils": all of them are installed through their
+;; respective regular TeX Live package.
+(delete-other-directories "utils" '())
 (build-system gnu-build-system)
 (arguments
  (list



47/55: gnu: texlive-dvidvi: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 1f5812b77bc083fc5bca7caae75c579abe4a7e5f
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 19:14:52 2024 +0200

gnu: texlive-dvidvi: Build executable.

* gnu/packages/tex.scm (texlive-dvidvi): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dvidvi' as a single package.

Change-Id: I97c0f19654b0ec281ce6b89bb065daf64a730cf9
---
 gnu/packages/tex.scm | 47 ++-
 1 file changed, 38 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 8b28f00484..95a47a934f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34458,16 +34458,45 @@ drivers (much like DVItype).")
 
 (define-public texlive-dvidvi
   (package
+(inherit texlive-bin)
 (name "texlive-dvidvi")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dvidvi.1"
-   "doc/man/man1/dvidvi.man1.pdf")
- (base32
-  "1w153rqm7nlmcf6162glxz282nbb6b6hjf5h0p7mbzr0j1357sxj")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvidvi"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvidvi"
+ (delete "--disable-dvidvi" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvidvi"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvidvi"
+  (invoke "make" "install"
+(inputs '())
 (home-page "https://ctan.org/pkg/dvidvi;)
 (synopsis "Convert one DVI file into another")
 (description



17/55: gnu: texlive-dvipng: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit f6a5d331a0b05381fb59fb5323c3b545b4a5f18d
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 13:59:37 2024 +0200

gnu: texlive-dvipng: Build executables.

* gnu/packages/tex.scm (texlive-dvipng): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dvipng' as a single package.

* gnu/packages/tex.scm (texlive-bin): Do not build dvipng.

Change-Id: I6806a962d9a9b9f7f7dfdc84e493356d99c9207c
---
 gnu/packages/tex.scm | 54 +++-
 1 file changed, 41 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ec8df9c65a..6d369228df 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -705,6 +705,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
 '("axodraw2"
   "chktex"
   "cjkutils"
+  "dvipng"
   "dvisvgm"
   "kpathsea"
   "lacheck"
@@ -34082,20 +34083,47 @@ transforms between a DVI file and a text file.")
 
 (define-public texlive-dvipng
   (package
+(inherit texlive-bin)
 (name "texlive-dvipng")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/dvipng/"
-   "doc/info/dvipng.info"
-   "doc/man/man1/dvigif.1"
-   "doc/man/man1/dvigif.man1.pdf"
-   "doc/man/man1/dvipng.1"
-   "doc/man/man1/dvipng.man1.pdf")
- (base32
-  "0r001q4p5569dagayds1c56y10ls6f6v7mmywiw81l995q16apxi")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvipng"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvipng"
+ "--with-system-freetype2"
+ "--with-system-gd"
+ "--with-system-libpng"
+ (delete "--disable-dvipng" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvipng"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvipng"
+  (invoke "make" "install"
+(inputs (list freetype gd libpng))
 (home-page "https://ctan.org/pkg/dvipng;)
 (synopsis "DVI to PNG/GIF converter")
 (description



03/55: gnu: texlive-psutils: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit ead7afd431d7537656b3aa4204fa78353f7bec5c
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 16:55:25 2024 +0200

gnu: texlive-psutils: Build executables.

* gnu/packages/tex.scm (texlive-psutils-bin): New variable.
(texlive-psutils)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-PSUTILS-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build psutils.

Change-Id: Ifa61a088a5b0fd846b91478bab03037d152bea7d
---
 gnu/packages/tex.scm | 79 +++-
 1 file changed, 78 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 295a4099c2..b529e2ec4f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -41795,6 +41795,69 @@ produce bounding box values for Rawppm or Rawpbm 
format files.")
 documents generated that use Type 1 fonts.")
 (license license:isc)))
 
+(define texlive-psutils-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-psutils-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("psutils"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-psutils"
+ "--with-system-libpaper"
+ (delete "--disable-psutils" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(add-after 'unpack 'patch-psutils-tests
+  (lambda _
+;; This test fails due to a rounding difference with libpaper
+;; 1.2: .
+;;
+;; Adjust the expected outcome to account for the minute
+;; difference.
+(substitute* "texk/psutils/tests/playres.ps"
+  (("844\\.647799") "844.647797"))
+;; Test suite also fails because it expects to find
+;; "texmf.cnf" in "../kpathsea/" directory, but we removed it
+;; in a snippet.  Point to the real "texmf.cnf".
+(let ((kpathsea
+   #$(this-package-native-input "texlive-libkpathsea")))
+  (substitute* "texk/psutils/psutils.test"
+(("(TEXMFCNF=).+?;" _ var)
+ (string-append var
+kpathsea
+"/share/texmf-dist/web2c;"))
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/psutils"
+(invoke "make" "check")
+(replace 'install
+  (lambda* (#:key inputs native-inputs #:allow-other-keys)
+(with-directory-excursion "texk/psutils"
+  (invoke "make" "install"
+(native-inputs (list libpaper pkg-config texlive-libkpathsea))
+(inputs '(
+
 (define-public texlive-psutils
   (package
 (name "texlive-psutils")
@@ -41829,7 +41892,21 @@ documents generated that use Type 1 fonts.")
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
 (arguments
- (list #:link-scripts #~(list "extractres.pl" "includeres.pl" 
"psjoin.pl")))
+ (list
+  #:link-scripts #~(list "extractres.pl" "includeres.pl" "psjoin.pl")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'link-scripts 'install-bin
+(lambda* (#:key inputs native-inputs #:allow-other-keys)
+  (let ((source #$(this-package-native-input 
"texlive-psutils-bin")))
+(with-directory-excursion (string-append #$output "/bin")
+  ;; Install non-scripts, already taken care of with
+  ;; `link-scripts' phase.
+  (for-each (lambda (f) (install-file f "."))
+(find-files (string-append source "/bin")
+(lambda (_ s)
+  (eq? 'regular (stat:type 
s
+(native-inputs (list texlive-psutils-bin))
 (inputs 

53/55: gnu: Update commentary in "tex.scm".

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 807d540f6e9f6d54b6446ecbc61b878875618398
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 18:38:42 2024 +0200

gnu: Update commentary in "tex.scm".

* gnu/packages/tex.scm: Remove part about monolithic TEXLIVE package.
Describe more accurately the bootstrap story of modular TeX Live.

Change-Id: I16adc06c808bef666cdd2393c046c6564481a22c
---
 gnu/packages/tex.scm | 68 
 1 file changed, 47 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e7f56e724f..7ad68d91ec 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -113,28 +113,54 @@
 
 ;;; Commentary:
 ;;;
-;;; This module aims at being as faithful as possible to TeX Live
-;;; distribution.  Yet, some of the packages in this module are Guix specific.
-;;; The following paragraphs describe them.
-;;;
 ;;; Guix provides two different TeX Live systems: one monolithic, the TEXLIVE
-;;; package, and the other modular.  Both are built from TEXLIVE-LIBKPATHSEA,
-;;; which is therefore the starting of any TeX Live update.  Both also rely on
-;;; TEXLIVE-SCRIPTS, which contains core scripts and related files---although
-;;; monolithic TeX Live only makes use of its source.  At that point, both
-;;; systems diverge.
+;;; package, and the other modular.  This module is about the latter.  It aims
+;;; at being as faithful as possible to TeX Live distribution.  Yet, some of
+;;; the packages defined here are Guix specific.  The following paragraphs
+;;; describe them.
+;;;
+;;; Modular TeX Live source is located in TEXLIVE-SOURCE, which is therefore
+;;; the starting of any TeX Live update.  This is first used to build
+;;; TEXLIVE-LIBKPATHSEA, TEXLIVE-LIBPTEXENC and TEXLIVE-DVIPDFMX-BIN.
+;;;
+;;; TEXLIVE-LIBKPATHSEA---which takes care of populating GUIX_TEXMF
+;;; environment variable---, TEXLIVE-LIBPTEXENC and TEXLIVE-DVIPDFMX-BIN are
+;;; used to compile TEXLIVE-BIN.  In turn, TEXLIVE-BIN propagates
+;;; TEXLIVE-SCRIPTS, which contains core scripts and related files (including
+;;; "texlive.tldb").  TEXLIVE-BIN is a mandatory native input in the `texlive'
+;;; build system.
+;;;
+;;; Then, the system builds its way towards regular TEXLIVE-LATEX-BIN package,
+;;; which is a convenient native input---that can be ignored or replaced using
+;;; `texlive-latex-bin?' keyword argument---for most TeX Live packages.
+;;; Packages used to build TEXLIVE-LATEX-BIN, however, may need the
+;;; TEXLIVE-DOCSTRIP package to be able to generate their runfiles.  Their
+;;; `texlive-latex-bin?' keyword argument must be set to #f, too.
+;;;
+;;; The following piece of art illustrates the bootstrap process of the
+;;; modular Guix TeX Live distribution.  All "texlive-" prefixes have been
+;;; dropped for brevity.
+;;;
+;;;
+;;;  source -- libkpathsea ---|
+;;; \ | |
+;;;  \ libptexenc |-- bin --|
+;;;   \   | |
+;;;\__ dvipdfmx-bin --| |-- ... docstrip ... -- latex-bin
+;;; |  +
+;;;  scripts ---|  latex-bin
+;;; | dependencies
+;;; \__/
+;;;|
+;;;|
+;;;(#:texlive-latex-bin? #f)
 ;;;
-;;; On the one hand, the monolithic TeX Live merges TEXLIVE-BIN-FULL and
-;;; TEXLIVE-TEXMF in order to create TEXLIVE.
 ;;;
-;;; On the other hand, modular TeX Live relies on TEXLIVE-BIN, which is
-;;; provided as a mandatory native input in the texlive build system.  Unlike
-;;; TEXLIVE-BIN-FULL, it doesn't provide any script (but still include all the
-;;; binaries; this might change in the future).  Then the system builds its
-;;; way towards regular `texlive-latex-bin' package, which is a convenient
-;;; native input (that can be ignored) for most TeX Live packages.  Those
-;;; earlier in the build chain need the TEXLIVE-DOCSTRIP package to still be
-;;; able to generate their runfiles.
+;;; Note that TEXLIVE-BIN includes only "web2c" binaries.  The other ones are
+;;; compiled directly from TEXLIVE-SOURCE, either as a regular TeX Live
+;;; package---if it only contains binaries and their man pages---or as
+;;; a private "texlive-NAME-bin" package used as a native input for public
+;;; "texlive-NAME" package.
 ;;;
 ;;; Default font map files are updated in a profile hook (see
 ;;; `texlive-font-maps' in "profiles.scm").  However, this option is not
@@ -153,8 +179,8 @@
 ;;; TEXLIVE-HYPHEN-COMPLETE, and all formats, being built with it, include all
 ;;; rules right from the start.
 ;;;
-;;; Any other "texlive-name" package matches the "name" TeX Live package, as
-;;; defined in the 

33/55: gnu: texlive-xdvi: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 47dc80f742cc1799e36daacd881eba98178e180c
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 13:16:09 2024 +0200

gnu: texlive-xdvi: Build executables.

* gnu/packages/tex.scm (texlive-xdvi-bin): New variable.
(texlive-xdvi)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-XDVI-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build "xdvik".

Change-Id: I455730bb3029b5b990479cfc9e7d77348230b3d7
---
 gnu/packages/tex.scm | 53 
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e312f4b9e0..f090fcd4a2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -786,6 +786,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "tpic2pdftex"
   "upmendex"
   "vlna"
+  "xdvik"
   "xindy"
   "xml2pmx"
   "xpdfopen"
@@ -74552,6 +74553,48 @@ reporting the number of the last page, as does 
@code{lastpage}).  The counter
 itself may be shipped out to the DVI file.")
 (license license:lppl)))
 
+(define texlive-xdvi-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-xdvi-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("xdvik"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-xdvik"
+ (delete "--disable-xdvik" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/xdvik"
+(invoke "make" "check")
+(replace 'install
+  (lambda* (#:key inputs native-inputs #:allow-other-keys)
+(mkdir-p (string-append #$output "/bin"))
+(with-directory-excursion "texk/xdvik"
+  (invoke "make" "install"
+(inputs (list freetype ghostscript libxaw
+
 (define-public texlive-xdvi
   (package
 (name "texlive-xdvi")
@@ -74565,6 +74608,16 @@ itself may be shipped out to the DVI file.")
   "1iidl3876vyi9k2dyfwd73q5kb53kwckivfyvvxh953n4axbqmi4")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-xdvi-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-xdvi-bin))
 (home-page "https://ctan.org/pkg/xdvi;)
 (synopsis "DVI previewer for the X Window System")
 (description



52/55: gnu: texlive-bibtexu: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit bc8ad5990affa46f1d1f5af20c01f31a955c2719
Author: Nicolas Goaziou 
AuthorDate: Mon May 13 09:59:17 2024 +0200

gnu: texlive-bibtexu: Build executable.

* gnu/packages/tex.scm (texlive-bibtexu-bin): New variable.
(texlive-bibtexu)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-BIBTEXU-BIN.

Change-Id: I618af3e0f6d647d000f00349def6ba6ca203c2e2
---
 gnu/packages/tex.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 41d94f9964..e7f56e724f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -33708,6 +33708,28 @@ capacity and 8-bit support extensions.  National 
character set and sorting
 order are controlled by an external configuration file.")
 (license license:gpl3+)))
 
+(define texlive-bibtexu-bin
+  (package
+(inherit texlive-bibtex8-bin)
+(name "texlive-bibtexu-bin")
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bibtex8-bin)
+   ((#:configure-flags flags)
+#~(cons* "--enable-bibtexu"
+ "--disable-bibtex8"
+ (delete "--enable-bibtex8"
+ (delete "--disable-bibtexu" #$flags
+   ((#:phases phases)
+#~(modify-phases #$phases
+(delete 'skip-bibtexu-test)
+(add-after 'unpack 'skip-bibtex8-test
+  ;; This package does not build "bibtex8" binary; the test below
+  ;; is therefore bound to fail.  Skip that part.
+  (lambda _
+(substitute* "texk/bibtex-x/tests/bibtex8u-mem.test"
+  (("\\./bibtex8 .*") "exit 0\n"
+(inputs (list icu4c
+
 (define-public texlive-bibtexu
   (package
 (name "texlive-bibtexu")
@@ -33720,6 +33742,16 @@ order are controlled by an external configuration 
file.")
   "19bp8wn0ssz7gczxp0imbpgi1zwz9x3ya67f072rjzg2zmfpphqg")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-bibtexu-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-bibtexu-bin))
 (home-page "https://ctan.org/pkg/bibtexu;)
 (synopsis "BibTeX variant supporting Unicode (UTF-8), via ICU")
 (description



14/55: gnu: texlive-lacheck: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit ac9213945a0ac92be74db7716b5789fadce7212f
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 13:06:50 2024 +0200

gnu: texlive-lacheck: Build executable.

* gnu/packages/tex.scm (texlive-lacheck): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `lacheck' as a single package.

* gnu/packages/tex.scm (texlive-bin): Do not build lacheck.

Change-Id: I0a693ca80a932735a7a203dd64d7f51727947daa
---
 gnu/packages/tex.scm | 48 +++-
 1 file changed, 39 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index da4cad7d25..b75a273e39 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -707,6 +707,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "cjkutils"
   "dvisvgm"
   "kpathsea"
+  "lacheck"
   "psutils"
   "upmendex"
   "xindy"
@@ -38356,16 +38357,45 @@ generated code can be included in any LaTeX 
document.")
 
 (define-public texlive-lacheck
   (package
+(inherit texlive-bin)
 (name "texlive-lacheck")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/lacheck.1"
-   "doc/man/man1/lacheck.man1.pdf")
- (base32
-  "1hhx65yd800bl3y2sq20lix60wd2b2j3k7n9s788mlsn8b0p7yq3")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("lacheck"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-lacheck"
+ (delete "--disable-lacheck" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/lacheck"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/lacheck"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
 (home-page "https://ctan.org/pkg/lacheck;)
 (synopsis "LaTeX checker")
 (description



31/55: gnu: texlive-m-tx: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit bc76ad5bed12e770da9b7828552f96f7dc5c2196
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 12:28:45 2024 +0200

gnu: texlive-m-tx: Build executable.

* gnu/packages/tex.scm (texlive-m-tx-bin): New variable.
(texlive-m-tx)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-M-TX-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build m-tx.

Change-Id: Ibc3689da654a752d68bf5f412f3bdba0d282baf1
---
 gnu/packages/tex.scm | 60 +++-
 1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 17f28ab9a4..dd2a92324b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -770,6 +770,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "kpathsea"
   "lacheck"
   "lcdf-typetools"
+  "m-tx"
   "pmx"
   "ps2eps"
   "psutils"
@@ -20981,6 +20982,48 @@ LuaLaTeX.  It calls LilyPond to compile scores, then 
includes the produced
 files.")
 (license license:expat)))
 
+(define texlive-m-tx-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-m-tx-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("m-tx"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-m-tx"
+ (delete "--disable-m-tx" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/m-tx"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/m-tx"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '(
+
 (define-public texlive-m-tx
   (package
 (name "texlive-m-tx")
@@ -20997,7 +21040,22 @@ files.")
   "1sakzv7r6mybx0k7k0fi1qb789nf7lvbl0ns8s0hhc9fz37b0br5")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "m-tx.lua")))
+(arguments
+ (list
+  #:link-scripts #~(list "m-tx.lua")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'link-scripts 'install-bin
+(lambda* (#:key inputs native-inputs #:allow-other-keys)
+  (let ((source #$(this-package-native-input "texlive-m-tx-bin")))
+(with-directory-excursion (string-append #$output "/bin")
+  ;; Install non-scripts, already taken care of with
+  ;; `link-scripts' phase.
+  (for-each (lambda (f) (install-file f "."))
+(find-files (string-append source "/bin")
+(lambda (_ s)
+  (eq? 'regular (stat:type 
s
+(native-inputs (list texlive-m-tx-bin))
 (home-page "https://ctan.org/pkg/m-tx;)
 (synopsis "Preprocessor for @command{pmx}")
 (description



48/55: gnu: texlive-dtl: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit e1ad5330353d9fee5b2e98f4c1ba3d7ef31f23bf
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 19:17:09 2024 +0200

gnu: texlive-dtl: Build executables.

* gnu/packages/tex.scm (texlive-dtl): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dtl' as a single package.

Change-Id: I2d7bfc97cd1ed29c04b72b6505b24a19be6fe26d
---
 gnu/packages/tex.scm | 49 ++---
 1 file changed, 38 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 95a47a934f..601d1d0626 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34303,18 +34303,45 @@ information on creating packages and documentation.")
 
 (define-public texlive-dtl
   (package
+(inherit texlive-bin)
 (name "texlive-dtl")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dt2dv.1"
-   "doc/man/man1/dt2dv.man1.pdf"
-   "doc/man/man1/dv2dt.1"
-   "doc/man/man1/dv2dt.man1.pdf")
- (base32
-  "0kvnsr8nxrys99rp74wlxnisfripx6jpjjkqy38d3d4gw13cvb5g")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dtl"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dtl"
+ (delete "--disable-dtl" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dtl"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dtl"
+  (invoke "make" "install"
+(inputs '())
 (home-page "https://ctan.org/pkg/dtl;)
 (synopsis "Tools to dis-assemble and re-assemble DVI files")
 (description



55/55: gnu: texlive: Fix ConTeXt.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit cb357c703e07beab24e830f7c56b3c53f5bae24d
Author: Nicolas Goaziou 
AuthorDate: Sat May 18 16:18:06 2024 +0200

gnu: texlive: Fix ConTeXt.

* gnu/packages/tex.scm (texlive-luatex)[arguments]<#:phases>: Add a phase to
tweak "texmfcnf.lua".
* gnu/packages/tex.scm (texlive-context)[arguments]<#:link-scripts>: Do not
consider "context.lua" as a script to link.
<#:phases>: Add a phase to point to the "texmfcnf.lua" location and another
one to create a "context" wrapper.

Change-Id: Iba52184aa244266209de86c1d90c8c9476d864e3
---
 gnu/packages/tex.scm | 40 +++-
 1 file changed, 31 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c02fcf65e0..40be7c352c 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -49450,8 +49450,17 @@ in the same way as BSD/GNU @code{getopt_long(3)} 
functions do.")
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
 (arguments
- (list #:texlive-latex-bin? #f
-   #:create-formats #~(list "dviluatex" "luatex")))
+ (list
+  #:texlive-latex-bin? #f
+  #:create-formats #~(list "dviluatex" "luatex")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'unpack 'customize-texmfcnf.lua
+(lambda _
+  (substitute* "web2c/texmfcnf.lua"
+(("TEXMFDIST *=.*") "TEXMFDIST = os.getenv(\"GUIX_TEXMF\"),\n")
+(("TEXMF *=.*")
+ "TEXMF = 
\"{$TEXMFCONFIG;$TEXMFVAR;$TEXMFHOME;$TEXMFLOCAL;$TEXMFDIST}\",\n")))
 (propagated-inputs
  (list texlive-cm
texlive-etex
@@ -60199,17 +60208,30 @@ a counter to be reset when another is incremented) and
 (build-system texlive-build-system)
 (arguments
  (list
-  #:link-scripts #~(list "context.lua" "mtxrun.lua")
+  #:link-scripts #~(list "mtxrun.lua")
   #:phases
   #~(modify-phases %standard-phases
-  (add-after 'link-scripts 'add-symlinks
+  (add-after 'unpack 'locate-texmfcnf.lua
+;; Out of the box, "mtxrun" first looks for "texmfcnf.lua" in
+;; "~/texmf", then in TEXMFCNF.  The latter is set within
+;; TEXLIVE-LIBKPATHSEA; it cannot contain the configuration file
+;; provided by TEXLIVE-LUATEX.  Point to the right file instead.
+(lambda* (#:key inputs #:allow-other-keys)
+  (let ((texmfcnf.lua
+ (search-input-file inputs
+
"share/texmf-dist/web2c/texmfcnf.lua")))
+(substitute* (find-files "." "\\.lua$")
+  (("kpse\\.default_texmfcnf\\(\\)")
+   (format #f "\"~a\"" (dirname texmfcnf.lua)))
+  (add-after 'unpack 'create-context-wrapper
+;; Create a "context" script for convenience.
 (lambda _
+  (mkdir-p (string-append #$output "/bin"))
   (with-directory-excursion (string-append #$output "/bin")
-(symlink "../share/texmf-dist/scripts/context/lua/context.lua"
- "context.lua")
-(symlink "../share/texmf-dist/scripts/context/lua/mtxrun.lua"
- "mtxrun.lua")
-(symlink "mtxrun" "luametatex")))
+(call-with-output-file "context"
+  (lambda (port)
+(format port "#!/bin/sh~%mtxrun --script context \"$@\"")))
+(chmod "context" #o755)))
 (propagated-inputs
  (list texlive-amsfonts
texlive-lm



38/55: gnu: texlive-ptex: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 0ae29ab9b8ce1b0f6cdb8ece080b5b98d6100ffe
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 17:03:34 2024 +0200

gnu: texlive-ptex: Build executables.

* gnu/packages/tex.scm (texlive-ptex-bin): New variable.
(texlive-ptex)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-PTEX-BIN.

Change-Id: I1148ddf3752800c64384250df5142136af440161
---
 gnu/packages/tex.scm | 63 +++-
 1 file changed, 62 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index caab4b1974..178f39ca59 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -36771,6 +36771,54 @@ not overly complex, so that users should find it easy 
to adapt the macros to
 their specific needs.")
 (license license:lppl)))
 
+(define texlive-ptex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-ptex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("makejvf" "mendexk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-makejvf"
+ "--enable-mendexk"
+ (delete "--disable-makejvf"
+ (delete "--disable-mendexk" #$flags
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/makejvf"
+(invoke "make" "check"))
+  (with-directory-excursion "texk/mendexk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/makejvf"
+  (invoke "make" "install"))
+(with-directory-excursion "texk/mendexk"
+  (invoke "make" "install"
+(native-inputs (list pkg-config texlive-libkpathsea texlive-libptexenc))
+(inputs '(
+
 (define-public texlive-ptex
   (package
 (name "texlive-ptex")
@@ -36795,7 +36843,20 @@ their specific needs.")
   "1dk8rvadr1q00bjizj567lzjp5l47pr7miyk0ghkajbiiwbqi0kn")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(arguments (list #:create-formats #~(list "eptex" "ptex")))
+(arguments
+ (list #:create-formats #~(list "eptex" "ptex")
+   #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-ptex-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+;; XXX: TEXLIVE-PTEX-BIN only provides a subset of the expected binaries.
+;; Other ones are already obtained through the "web2c" module, when
+;; building TEXLIVE-BIN.
+(native-inputs (list texlive-ptex-bin))
 (propagated-inputs
  (list texlive-cm
texlive-etex



46/55: gnu: texlive-dviljk: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 207f5d510095d0f16d915160ad8c04b3927e58a6
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 19:10:38 2024 +0200

gnu: texlive-dviljk: Build executables.

* gnu/packages/tex.scm (texlive-dviljk): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dviljk' as a single package.

Change-Id: I6c046ce05ee87f1956f4d3c910c599b6c01389a6
---
 gnu/packages/tex.scm | 57 ++--
 1 file changed, 38 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b20edf8c02..8b28f00484 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34501,26 +34501,45 @@ file.  It also supports XeTeX XDV format.")
 
 (define-public texlive-dviljk
   (package
+(inherit texlive-bin)
 (name "texlive-dviljk")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dvihp.1"
-   "doc/man/man1/dvihp.man1.pdf"
-   "doc/man/man1/dvilj.1"
-   "doc/man/man1/dvilj.man1.pdf"
-   "doc/man/man1/dvilj2p.1"
-   "doc/man/man1/dvilj2p.man1.pdf"
-   "doc/man/man1/dvilj4.1"
-   "doc/man/man1/dvilj4.man1.pdf"
-   "doc/man/man1/dvilj4l.1"
-   "doc/man/man1/dvilj4l.man1.pdf"
-   "doc/man/man1/dvilj6.1"
-   "doc/man/man1/dvilj6.man1.pdf")
- (base32
-  "03pi78c8ghy2gghzk1ffrvf5x7h8c1r0pv5pcspwxz365x2rsbjw")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dviljk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dviljk"
+ (delete "--disable-dviljk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dviljk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dviljk"
+  (invoke "make" "install"
+(inputs '())
 (home-page "https://ctan.org/pkg/dviljk;)
 (synopsis "DVI to Laserjet output")
 (description



23/55: gnu: texlive-ps2eps: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 7c700843f5829fd676f41a1d0ed2dfc5c50425ed
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 16:44:53 2024 +0200

gnu: texlive-ps2eps: Build executables.

* gnu/packages/tex.scm (texlive-ps2eps): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `ps2eps' as a single package.

* gnu/packages/tex.scm (texlive-bin): Do not build ps2eps.

Change-Id: Iad2d34214a78e23f245679bfe6936e6bbbf8e325
---
 gnu/packages/tex.scm | 69 ++--
 1 file changed, 45 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 8e61bb22fe..c6dae667f0 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -774,6 +774,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "kpathsea"
   "lacheck"
   "lcdf-typetools"
+  "ps2eps"
   "psutils"
   "t1utils"
   "upmendex"
@@ -42052,32 +42053,52 @@ and glued together.  This will lead to a physical 
product box.")
 
 (define-public texlive-ps2eps
   (package
+(inherit texlive-bin)
 (name "texlive-ps2eps")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/bbox.1"
-   "doc/man/man1/bbox.man1.pdf"
-   "doc/man/man1/ps2eps.1"
-   "doc/man/man1/ps2eps.man1.pdf"
-   "scripts/ps2eps/")
- (base32
-  "1anrvgs0hd3790dwpxqal0c2drjmvh93vnyqap40rvp8axwi0a6n")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("ps2eps"))
+(delete-other-directories "texk" '())
 (arguments
- (list #:link-scripts #~(list "ps2eps.pl")
-   #:phases
-   #~(modify-phases %standard-phases
-   (add-after 'unpack 'configure-ghostscript-executable
- ;; ps2eps.pl uses the "gswin32c" ghostscript executable on
- ;; Windows, and the "gs" ghostscript executable on Unix.  It
- ;; detects Unix by checking for the existence of the
- ;; "/usr/bin" directory.  Since Guix System does not have
- ;; "/usr/bin", it is also detected as Windows.
- (lambda _
-   (substitute* "scripts/ps2eps/ps2eps.pl"
- (("gswin32c") "gs")))
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-ps2eps"
+ (delete "--disable-ps2eps" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(add-after 'unpack 'configure-ghostscript-executable
+  ;; ps2eps.pl uses the "gswin32c" ghostscript executable on
+  ;; Windows, and the "gs" ghostscript executable on Unix.  It
+  ;; detects Unix by checking for the existence of the "/usr/bin"
+  ;; directory.  Since Guix System does not have "/usr/bin", it is
+  ;; also detected as a Windows system :(.
+  (lambda _
+(substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
+  (("gswin32c") "gs"
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/ps2eps"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/ps2eps"
+  (invoke "make" "install"
 (inputs (list perl))
 (home-page "https://ctan.org/pkg/ps2eps;)
 (synopsis "Produce Encapsulated PostScript from PostScript")



21/55: gnu: texlive-autosp: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 7771dc3e68b9dc8e83440ffad46a24470cb40b12
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 15:55:39 2024 +0200

gnu: texlive-autosp: Build executable.

* gnu/packages/tex.scm (texlive-autosp-bin): New variable.
(texlive-autosp)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-AUTOSP-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build autosp.

Change-Id: I12a1336c473a267dba47200c4a066ff1841876a1
---
 gnu/packages/tex.scm | 71 +---
 1 file changed, 62 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index cf9c95b0d4..c0c0d4b7aa 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -763,6 +763,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
 ;; Disable tools built in other packages.
 #$@(map (lambda (p) (string-append "--disable-" p))
 '("afm2pl"
+  "autosp"
   "axodraw2"
   "chktex"
   "cjkutils"
@@ -4159,21 +4160,72 @@ package tries to put breaks at adequate places.  It is 
suitable for
 computer-generated long formulae with many terms.")
 (license license:lppl1.3+)))
 
+(define texlive-autosp-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-autosp-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("autosp"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-autosp"
+ (delete "--disable-autosp" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/autosp"
+(invoke "make" "check")
+(replace 'install
+  (lambda* (#:key inputs native-inputs #:allow-other-keys)
+(with-directory-excursion "utils/autosp"
+  (invoke "make" "install"
+(inputs '(
+
 (define-public texlive-autosp
   (package
 (name "texlive-autosp")
 (version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/generic/autosp/"
-   "doc/man/man1/autosp.1"
-   "doc/man/man1/autosp.man1.pdf"
-   "doc/man/man1/tex2aspc.1"
-   "doc/man/man1/tex2aspc.man1.pdf")
- (base32
-  "16szmbffp9pwzv7zq3l4yvnsfk4m7w57wib7pqpgv1v5fzhlaahs")))
+(source
+ (texlive-origin name version
+ (list "doc/generic/autosp/" "doc/man/man1/autosp.1"
+   "doc/man/man1/autosp.man1.pdf"
+   "doc/man/man1/tex2aspc.1"
+   "doc/man/man1/tex2aspc.man1.pdf")
+ (base32
+  "16szmbffp9pwzv7zq3l4yvnsfk4m7w57wib7pqpgv1v5fzhlaahs")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+   (let ((bin #$(this-package-native-input 
"texlive-autosp-bin"))
+ (target (string-append #$output "/bin")))
+ (mkdir-p target)
+ (copy-recursively (string-append bin "/bin")
+   target)))
+(native-inputs (list texlive-autosp-bin))
 (home-page "https://ctan.org/pkg/autosp;)
 (synopsis
  "Preprocessor generating note-spacing commands for MusiXTeX scores")
@@ -4187,6 +4239,7 @@ concern for note-spacing changes within the part or 
spacing requirements of
 other parts.")
 (license license:gpl2+)))
 
+
 (define-public texlive-axodraw2
   (package
 (name "texlive-axodraw2")



30/55: gnu: texlive-pmx: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2bb0bcb3cca659e5ffac24480cece87e238b8589
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 12:24:47 2024 +0200

gnu: texlive-pmx: Build executables.

* gnu/packages/tex.scm (texlive-pmx-bin): New variable.
(texlive-pmx)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-PMX-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build pmx.

Change-Id: I95f45fc58053b81f6b6935255fc90bcb18b74713
---
 gnu/packages/tex.scm | 53 
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c755f3fec9..17f28ab9a4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -770,6 +770,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "kpathsea"
   "lacheck"
   "lcdf-typetools"
+  "pmx"
   "ps2eps"
   "psutils"
   "t1utils"
@@ -25466,6 +25467,48 @@ to typeset Korean letters (Hangul) using the proper 
fonts. The use of XeLaTeX
 is recommended.")
 (license license:lppl1.3+)))
 
+(define texlive-pmx-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-pmx-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("pmx"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-pmx"
+ (delete "--disable-pmx" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/pmx"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/pmx"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '(
+
 (define-public texlive-pmx
   (package
 (name "texlive-pmx")
@@ -25482,6 +25525,16 @@ is recommended.")
   "1p9js9izv50vg7qqqmyg5jz4am4phhscqdfnn4nszlyfv3zkg7p3")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-pmx-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-pmx-bin))
 (home-page "https://ctan.org/pkg/pmx;)
 (synopsis "Preprocessor for MusiXTeX")
 (description



13/55: gnu: texlive-cjkutils: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8f4af0d2eaf755bf6c3485988d1c52488feaae94
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 12:53:56 2024 +0200

gnu: texlive-cjkutils: Build executables.

* gnu/packages/tex.scm (texlive-cjkutils): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `cjkutils' as a single package.
[description]: Add Texinfo markup.

* gnu/packages/tex.scm (texlive-bin): Do not build cjkutils.

Change-Id: I5a14c98715940d27efbc6c31131d71351921542b
---
 gnu/packages/tex.scm | 70 +---
 1 file changed, 45 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e86316b568..da4cad7d25 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -702,8 +702,14 @@ and should be preferred to it whenever a package would 
otherwise depend on
'())
 ;; Disable tools built in other packages.
 #$@(map (lambda (p) (string-append "--disable-" p))
-'("axodraw2" "chktex" "dvisvgm" "kpathsea" "psutils"
-  "upmendex" "xindy"
+'("axodraw2"
+  "chktex"
+  "cjkutils"
+  "dvisvgm"
+  "kpathsea"
+  "psutils"
+  "upmendex"
+  "xindy"
   #:phases
   #~(modify-phases %standard-phases
   (add-after 'unpack 'locate-external-kpathsea
@@ -9222,36 +9228,50 @@ adjust locations and kerning of CJK punctuation marks.")
 
 (define-public texlive-cjkutils
   (package
+(inherit texlive-bin)
 (name "texlive-cjkutils")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/bg5conv.1"
-   "doc/man/man1/bg5conv.man1.pdf"
-   "doc/man/man1/cef5conv.1"
-   "doc/man/man1/cef5conv.man1.pdf"
-   "doc/man/man1/cefconv.1"
-   "doc/man/man1/cefconv.man1.pdf"
-   "doc/man/man1/cefsconv.1"
-   "doc/man/man1/cefsconv.man1.pdf"
-   "doc/man/man1/extconv.1"
-   "doc/man/man1/extconv.man1.pdf"
-   "doc/man/man1/hbf2gf.1"
-   "doc/man/man1/hbf2gf.man1.pdf"
-   "doc/man/man1/sjisconv.1"
-   "doc/man/man1/sjisconv.man1.pdf"
-   "hbf2gf/")
- (base32
-  "0by2g05xv5dndnd78jz9y73fyswqhfvcbzcw8rzhvpvd6inrcdq8")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs/" '())
+(delete-other-directories "utils/" '())
+(delete-other-directories "texk/" '("cjkutils"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-cjkutils-x"
+ (delete "--disable-cjkutils" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/cjkutils"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/cjkutils"
+  (invoke "make" "install"
 (home-page "https://ctan.org/pkg/cjk;)
 (synopsis "CJK language support")
 (description
  "CJK is a macro package for LaTeX, providing simultaneous support for
 various Asian scripts in many encodings (including Unicode): Chinese (both
 traditional and simplified), Japanese, Korean and Thai.  A special add-on
-feature is an interface to the Emacs editor (cjk-enc.el) which gives
+feature is an interface to the Emacs editor (@file{cjk-enc.el}) which gives
 simultaneous, easy-to-use support to a bunch of other scripts in addition to
 the above --- Cyrillic, Greek, Latin-based scripts, Russian and Vietnamese are
 supported.")



28/55: gnu: texlive-tpic2pdftex: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 96f051fc3190004c8193ab3412284801d1874567
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 18:13:46 2024 +0200

gnu: texlive-tpic2pdftex: Build executable.

* gnu/packages/tex.scm (texlive-tpic2pdftex-bin): New variable.
(texlive-tpic2pdftex)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-TPIC2PDFTEX-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build tpic2pdftex.

Change-Id: I0a3555dbc88edb6fa862e96c379519251015c428
---
 gnu/packages/tex.scm | 53 
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ce858c27c2..4d0e3c1652 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -774,6 +774,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "psutils"
   "t1utils"
   "texdoctk"
+  "tpic2pdftex"
   "upmendex"
   "xindy"
   "xml2pmx"
@@ -45270,6 +45271,48 @@ tone values.  Currently, unt's model is implemented.  
Support for more models
 is planned.")
 (license license:asl2.0)))
 
+(define texlive-tpic2pdftex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-tpic2pdftex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("tpic2pdftex"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-tpic2pdftex"
+ (delete "--disable-tpic2pdftex" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/tpic2pdftex"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/tpic2pdftex"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '(
+
 (define-public texlive-tpic2pdftex
   (package
 (name "texlive-tpic2pdftex")
@@ -45283,6 +45326,16 @@ is planned.")
   "02nf2fg4xzh8lbbddvm44qyvcvfn5b7kzcyg729a58l29gd88pbs")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input 
"texlive-tpic2pdftex-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-tpic2pdftex-bin))
 (home-page "https://ctan.org/pkg/tpic2pdftex;)
 (synopsis "Use @code{tpic} commands in pdfTeX")
 (description



16/55: gnu: texlive-t1utils: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit dcbc1032cd4ad2dbea3aa222c5847f7786846bee
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 13:49:05 2024 +0200

gnu: texlive-t1utils: Build executables.

* gnu/packages/tex.scm (texlive-t1utils): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `t1utils' as a single package.

* gnu/packages/tex.scm (texlive-bin): Do not build t1utils.

Change-Id: I0f3feae24dc8499b25f8889a50ceb52fb60a3b33
---
 gnu/packages/tex.scm | 58 +++-
 1 file changed, 39 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index a6ba4dd40e..ec8df9c65a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -710,6 +710,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "lacheck"
   "lcdf-typetools"
   "psutils"
+  "t1utils"
   "upmendex"
   "xindy"
   #:phases
@@ -42806,26 +42807,45 @@ known as railroad diagrams.")
 
 (define-public texlive-t1utils
   (package
+(inherit texlive-bin)
 (name "texlive-t1utils")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/t1ascii.1"
-   "doc/man/man1/t1ascii.man1.pdf"
-   "doc/man/man1/t1asm.1"
-   "doc/man/man1/t1asm.man1.pdf"
-   "doc/man/man1/t1binary.1"
-   "doc/man/man1/t1binary.man1.pdf"
-   "doc/man/man1/t1disasm.1"
-   "doc/man/man1/t1disasm.man1.pdf"
-   "doc/man/man1/t1mac.1"
-   "doc/man/man1/t1mac.man1.pdf"
-   "doc/man/man1/t1unmac.1"
-   "doc/man/man1/t1unmac.man1.pdf")
- (base32
-  "0hdk57179nn57wnmvr3jasjavkvmrn6ryph6jvjhsfqprn7bhf1y")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "texk" '())
+(delete-other-directories "utils" '("t1utils"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-t1utils"
+ (delete "--disable-t1utils" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/t1utils"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/t1utils"
+  (invoke "make" "install"
+(native-inputs '())
+(inputs '())
 (home-page "https://ctan.org/pkg/t1utils;)
 (synopsis "Simple Type 1 font manipulation programs")
 (description



09/55: gnu: texlive-upmendex: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit e8eef67c11bf4316df74fd97be158cf0ed43efa0
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 10:13:34 2024 +0200

gnu: texlive-upmendex: Build executable.

* gnu/packages/tex.scm (texlive-upmendex-bin): New variable.
(texlive-upmendex)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-UPMENDEX-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build upmendex.
---
 gnu/packages/tex.scm | 74 ++--
 1 file changed, 66 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 631bd510d4..01c6c3f0da 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -704,7 +704,8 @@ and should be preferred to it whenever a package would 
otherwise depend on
 "--disable-chktex"
 "--disable-dvisvgm"
 "--disable-kpathsea"
-"--disable-psutils"))
+"--disable-psutils"
+"--disable-upmendex"))
   #:phases
   #~(modify-phases %standard-phases
   (add-after 'unpack 'locate-external-kpathsea
@@ -45068,19 +45069,76 @@ make drawing easier, especially when drawing 
repeatedly.  The macros were
 chosen and developed with an emphasis on drawing graphs in economics.")
 (license license:lppl1.3c)))
 
+(define texlive-upmendex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-upmendex")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs/" '())
+(delete-other-directories "utils/" '())
+(delete-other-directories "texk/" '("upmendex"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-upmendex"
+ "--with-system-icu"
+ (delete "--disable-upmendex" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/upmendex"
+(invoke "make" "check")
+(replace 'install
+  (lambda* (#:key inputs native-inputs #:allow-other-keys)
+(with-directory-excursion "texk/upmendex"
+  (invoke "make" "install"
+(native-inputs (list pkg-config))
+(inputs (list icu4c
+
 (define-public texlive-upmendex
   (package
 (name "texlive-upmendex")
 (version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/upmendex.1"
-   "doc/man/man1/upmendex.man1.pdf"
-   "doc/support/upmendex/")
- (base32
-  "0mj8nmqr3z7b802kvjmnkckq89l694an7s639yghf3b9b5v7xihx")))
+(source
+ (texlive-origin name version
+ (list "doc/man/man1/upmendex.1"
+   "doc/man/man1/upmendex.man1.pdf"
+   "doc/support/upmendex/")
+ (base32
+  "0mj8nmqr3z7b802kvjmnkckq89l694an7s639yghf3b9b5v7xihx")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'link-scripts 'install-bin
+(lambda* (#:key inputs native-inputs #:allow-other-keys)
+  (let ((source
+ #$(this-package-native-input "texlive-upmendex-bin")))
+(with-directory-excursion (string-append #$output "/bin")
+  (for-each (lambda (f) (install-file f "."))
+(find-files (string-append source "/bin")
+(lambda (_ s)
+  (eq? 'regular (stat:type 
s
+(native-inputs (list texlive-upmendex-bin))
 (home-page "https://ctan.org/pkg/upmendex;)
 (synopsis "Multilingual index processor")
 (description



41/55: gnu: texlive-gregoriotex: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit e455dacbb5d687196e336bbff5cebdcb79196237
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 17:48:05 2024 +0200

gnu: texlive-gregoriotex: Build executables.

* gnu/packages/tex.scm (texlive-gregoriotex-bin): New variable.
(texlive-gregoriotex)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-GREGORIOTEX-BIN.

Change-Id: Idc863a24aa9e096a8988516f696744ca4511bf6b
---
 gnu/packages/tex.scm | 51 +++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f96be0c63a..2acf2e605e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15683,6 +15683,46 @@ known as @emph{Der Grune Punkt} (``The Green Point''). 
 In Austria, it can be
 found on nearly every bottle.  It should not be confused with the Recycle
 logo.")
 (license license:gpl3+)))
+(define texlive-gregoriotex-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-gregoriotex-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("gregorio"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-gregorio"
+ (delete "--disable-gregorio" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/gregorio"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/gregorio"
+  (invoke "make" "install"
+(inputs '(
 
 (define-public texlive-gregoriotex
   (package
@@ -15701,6 +15741,17 @@ logo.")
   "0lnpq6rfdb6dg543cmbsm817ziim6arxnzxzbn0wn8i8aw681idr")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'install 'install-bin
+(lambda _
+  (let ((source
+ #$(this-package-native-input "texlive-gregoriotex-bin")))
+(copy-recursively (string-append source "/bin")
+  (string-append #$output "/bin"
+(native-inputs (list texlive-gregoriotex-bin))
 (home-page "https://ctan.org/pkg/gregoriotex;)
 (synopsis "Engraving gregorian chant scores")
 (description



15/55: gnu: texlive-lcdftypetools: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 6c6605635c304ad2645fd6ed4eb67c3ce44ba92d
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 13:11:16 2024 +0200

gnu: texlive-lcdftypetools: Build executables.

* gnu/packages/tex.scm (texlive-lcdftypetools): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `lcdf-typetools' as a single package.

* gnu/packages/tex.scm (texlive-bin): Do not build lcdf-typetools.

Change-Id: Ifc19df9e24a5eb07f5b9f26d77072fab3a78b21c
---
 gnu/packages/tex.scm | 68 ++--
 1 file changed, 39 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b75a273e39..a6ba4dd40e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -708,6 +708,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "dvisvgm"
   "kpathsea"
   "lacheck"
+  "lcdf-typetools"
   "psutils"
   "upmendex"
   "xindy"
@@ -37586,36 +37587,45 @@ TeX.")
 
 (define-public texlive-lcdftypetools
   (package
+(inherit texlive-bin)
 (name "texlive-lcdftypetools")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/cfftot1.1"
-   "doc/man/man1/cfftot1.man1.pdf"
-   "doc/man/man1/mmafm.1"
-   "doc/man/man1/mmafm.man1.pdf"
-   "doc/man/man1/mmpfb.1"
-   "doc/man/man1/mmpfb.man1.pdf"
-   "doc/man/man1/otfinfo.1"
-   "doc/man/man1/otfinfo.man1.pdf"
-   "doc/man/man1/otftotfm.1"
-   "doc/man/man1/otftotfm.man1.pdf"
-   "doc/man/man1/t1dotlessj.1"
-   "doc/man/man1/t1dotlessj.man1.pdf"
-   "doc/man/man1/t1lint.1"
-   "doc/man/man1/t1lint.man1.pdf"
-   "doc/man/man1/t1rawafm.1"
-   "doc/man/man1/t1rawafm.man1.pdf"
-   "doc/man/man1/t1reencode.1"
-   "doc/man/man1/t1reencode.man1.pdf"
-   "doc/man/man1/t1testpage.1"
-   "doc/man/man1/t1testpage.man1.pdf"
-   "doc/man/man1/ttftotype42.1"
-   "doc/man/man1/ttftotype42.man1.pdf")
- (base32
-  "0yjbc6rsf8c62qa1lyi9kjyjy2p0xlps19llnvly3xyhla08j76f")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("lcdf-typetools"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-lcdf-typetools"
+ (delete "--disable-lcdf-typetools" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/lcdf-typetools"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/lcdf-typetools"
+  (invoke "make" "install"
+(native-inputs (list pkg-config texlive-libkpathsea))
+(inputs '())
 (propagated-inputs (list texlive-glyphlist))
 (home-page "https://ctan.org/pkg/lcdf-typetools;)
 (synopsis "Bundle of outline font manipulation tools")



12/55: gnu: texlive-bin: Skip building axodraw2.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 3cfdcbff4ab14d63a66b982237184766680590ba
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 12:22:48 2024 +0200

gnu: texlive-bin: Skip building axodraw2.

* gnu/packages/tex.scm (texlive-bin)[arguments]<#:configure-flags>: Disable
axodraw2 build.
* gnu/packages/tex.scm (texlive-axodraw2): Remove now obsolete comment.

Change-Id: Ie5b55fcaeb7f53a02766f60d730d6314fc128f5f
---
 gnu/packages/tex.scm | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index bc9f5c32e4..e86316b568 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -701,12 +701,9 @@ and should be preferred to it whenever a package would 
otherwise depend on
  "--disable-mfluajit")
'())
 ;; Disable tools built in other packages.
-"--disable-chktex"
-"--disable-dvisvgm"
-"--disable-kpathsea"
-"--disable-psutils"
-"--disable-upmendex"
-"--disable-xindy"))
+#$@(map (lambda (p) (string-append "--disable-" p))
+'("axodraw2" "chktex" "dvisvgm" "kpathsea" "psutils"
+  "upmendex" "xindy"
   #:phases
   #~(modify-phases %standard-phases
   (add-after 'unpack 'locate-external-kpathsea
@@ -4086,8 +4083,6 @@ other parts.")
   #:tests? #true
   #:phases
   #~(modify-phases %standard-phases
-  ;; TODO: Since we're building "axohelp" from source here, it can be
-  ;; removed from `texlive-bin' (world rebuild).
   (add-after 'unpack 'build-axohelp
 (lambda* (#:key tests? #:allow-other-keys)
   (with-directory-excursion "source/latex/axodraw2"



37/55: gnu: texlive-ps2pk: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8808a92229fc4167724d1aa8ff2ff706278d4fe1
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 15:21:19 2024 +0200

gnu: texlive-ps2pk: Build executables.

* gnu/packages/tex.scm (texlive-ps2pk): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `ps2pk' as a single package.

Change-Id: I8ec9e6eb3a5fb194a533d89c4a1ab254d77a617e
---
 gnu/packages/tex.scm | 52 +---
 1 file changed, 37 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d105efc4ce..caab4b1974 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -42312,22 +42312,44 @@ produce bounding box values for Rawppm or Rawpbm 
format files.")
 
 (define-public texlive-ps2pk
   (package
+(inherit texlive-bin)
 (name "texlive-ps2pk")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/mag.1"
-   "doc/man/man1/mag.man1.pdf"
-   "doc/man/man1/pfb2pfa.1"
-   "doc/man/man1/pfb2pfa.man1.pdf"
-   "doc/man/man1/pk2bm.1"
-   "doc/man/man1/pk2bm.man1.pdf"
-   "doc/man/man1/ps2pk.1"
-   "doc/man/man1/ps2pk.man1.pdf")
- (base32
-  "14xq9x5rf15ibzr41cm5rm4v3rpmj50rfsqp4zzvyhmpmyw4dsx3")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("ps2pk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-ps2pk"
+ (delete "--disable-ps2pk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/ps2pk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/ps2pk"
+  (invoke "make" "install"
+(inputs '())
 (home-page "https://ctan.org/pkg/ps2pk;)
 (synopsis "Generate a PK font from an Adobe Type 1 font")
 (description



18/55: gnu: texlive-afm2pl: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 56832ae53f68ebb4fe1e7e857bf8470ffde3135d
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 15:26:11 2024 +0200

gnu: texlive-afm2pl: Build executable.

* gnu/packages/tex.scm (texlive-afm2pl-bin): New variable.
(texlive-afm2pl)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-AFM2PL-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build afm2pl.

Change-Id: I1cf4f5fc8a17a1eab634218040bbfc7394db337a
---
 gnu/packages/tex.scm | 55 +++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6d369228df..e5df27e048 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -702,7 +702,8 @@ and should be preferred to it whenever a package would 
otherwise depend on
'())
 ;; Disable tools built in other packages.
 #$@(map (lambda (p) (string-append "--disable-" p))
-'("axodraw2"
+'("afm2pl"
+  "axodraw2"
   "chktex"
   "cjkutils"
   "dvipng"
@@ -1806,6 +1807,48 @@ Gyre Pagella, and the Latin Modern fonts are supported.  
The other fonts in
 the TeX Gyre bundle do not need this support.")
 (license (list license:gfl1.0 license:gpl3+
 
+(define texlive-afm2pl-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-afm2pl-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("afm2pl"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-afm2pl"
+ (delete "--disable-afm2pl" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/afm2pl"
+(invoke "make" "check")
+(replace 'install
+  (lambda* (#:key inputs native-inputs #:allow-other-keys)
+(with-directory-excursion "texk/afm2pl"
+  (invoke "make" "install"
+(native-inputs (list pkg-config texlive-libkpathsea))
+(inputs '(
+
 (define-public texlive-afm2pl
   (package
 (name "texlive-afm2pl")
@@ -1820,6 +1863,16 @@ the TeX Gyre bundle do not need this support.")
   "19llzzr4kmmyf7l18ngx1rhaqaqvgm3md924m4dxcv7nmrvga2b2")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input "texlive-afm2pl-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-afm2pl-bin))
 (home-page "https://ctan.org/pkg/afm2pl;)
 (synopsis "Convert AFM to TeX property list (@file{.pl}) metrics")
 (description



25/55: gnu: texlive-libkpathsea: Tiny refactoring.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 8dcad64cff9ff46b66110ccb6b8da075168941ec
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 17:13:34 2024 +0200

gnu: texlive-libkpathsea: Tiny refactoring.

* gnu/packages/tex.scm (texlive-libkpathsea)[source]: Refactor
un-bundling.  Remove "utils" contents.

Change-Id: Ib1d5a00ea6493bf1488a69e72470dfc7cf613e78
---
 gnu/packages/tex.scm | 28 
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f044a867fa..06ca76016f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -184,22 +184,18 @@
(modules '((guix build utils)
   (ice-9 ftw)))
(snippet
-#~(begin
-(with-directory-excursion "texk"
-  (let ((preserved-directories '("." ".." "kpathsea")))
-(for-each
- delete-file-recursively
- (scandir "."
-  (lambda (file)
-(and (not (member file preserved-directories))
- (eq? 'directory (stat:type (stat file)
-(with-directory-excursion "libs"
-  (for-each
-   delete-file-recursively
-   (scandir "."
-(lambda (file)
-  (and (not (member file '("." "..")))
-   (eq? 'directory (stat:type (stat 
file
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("kpathsea"))
 (build-system gnu-build-system)
 (arguments
  (list



19/55: gnu: Add texlive-libptexenc.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b19e315e1f94011927436509010dc61b4ad7157f
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 15:44:52 2024 +0200

gnu: Add texlive-libptexenc.

* gnu/packages/tex.scm (texlive-libptexenc): New variable.

Change-Id: Id3b7060edae487850d1e2b520b9e0476555efe09
---
 gnu/packages/tex.scm | 60 
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e5df27e048..3e66128fe1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -269,6 +269,66 @@
 of user-specified directories similar to how shells look up executables.")
 (license license:lgpl2.1)))
 
+(define-public texlive-libptexenc
+  (package
+(name "texlive-libptexenc")
+(version (number->string %texlive-revision))
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("ptexenc"))
+(build-system gnu-build-system)
+(arguments
+ (list
+  #:out-of-source? #t
+  #:configure-flags
+  #~(list "--disable-static"
+  "--disable-native-texlive-build"
+  "--enable-shared"
+  "--with-banner-add=/GNU Guix"
+  "--disable-all-pkgs")
+  #:phases
+  #~(modify-phases %standard-phases
+  (add-after 'unpack 'install-missing-files
+;; These two files are not installed (on purpose, see ChangeLog),
+;; but are required nonetheless if this library is meant to be
+;; used externally.
+(lambda _
+  (with-directory-excursion "texk/ptexenc/ptexenc"
+(let ((inc (string-append #$output "/include/ptexenc")))
+  (for-each (lambda (f) (install-file f inc))
+'("kanjicnv.h" "unicode-jp.h"))
+  (replace 'check
+(lambda* (#:key tests? #:allow-other-keys)
+  (when tests?
+(with-directory-excursion "texk/ptexenc"
+  (invoke "make" "check")
+  (replace 'install
+(lambda* (#:key inputs #:allow-other-keys)
+  (with-directory-excursion "texk/ptexenc"
+(invoke "make" "install")))
+(native-inputs (list pkg-config texlive-libkpathsea))
+(inputs (list libiconv))
+(home-page "http://tutimura.ath.cx/ptexlive/?ptexenc%2FDetails;)
+(synopsis "Library for Japanese pTeX")
+(description
+ "This package provides a library for Japanese pTeX and its surrounding 
tools.")
+(license license:gpl2)))
+
 (define-public texlive-scripts
   (package
 (name "texlive-scripts")



07/55: gnu: texlive-libkpathsea: Set sane values in "texmf.cnf".

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 939d66266cec30df197822ec6a468db498c8ba03
Author: Nicolas Goaziou 
AuthorDate: Fri May 10 22:49:51 2024 +0200

gnu: texlive-libkpathsea: Set sane values in "texmf.cnf".

* gnu/packages/tex.scm (texlive-libkpathsea)[arguments]<#:phases>: Configure
environment variables relative to the TeX Live environment according to our
needs.  In particular, TEXMFDBS should point to the right places, and not
bogus ones, which impede document compilation speed.

Change-Id: Ia8c2c645dc0d0f0cc2b26dd1e9bad2ffdb4a56f9
---
 gnu/packages/tex.scm | 27 +--
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 5434f6b04b..bf187a547d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -218,21 +218,28 @@
 ;; environment variable defined via a search path below.
 ;;
 ;; This phase must happen before the `configure' phase, because
-;; the value of the TEXMFCNF variable (modified along with the
-;; SELFAUTOLOC reference below) is used at compile time to
+;; the value of the TEXMFCNF variable is used at compile time to
 ;; generate "paths.h" file.
 (lambda _
   (substitute* "texk/kpathsea/texmf.cnf"
-(("^TEXMFROOT = .*")
- "TEXMFROOT = {$GUIX_TEXMF}/..\n")
-(("^TEXMF = .*")
- "TEXMF = {$GUIX_TEXMF}\n")
-(("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix)
- (string-append #$output suffix))
+(("^TEXMFROOT = .*") "TEXMFROOT = {$GUIX_TEXMF}/..\n")
+(("^TEXMFDIST = .*") "TEXMFDIST = {$GUIX_TEXMF}\n")
+;; "ls-R" files are to be expected only in the TEXMFDIST
+;; directories.  However, those are not always present, e.g.,
+;; when building a package with `texlive-build-system' or when
+;; generating a profile.  Since both situations need to be
+;; handled, drop the "!!" prefix in front of TEXMFDIST.
+(("!!\\$TEXMFDIST") "$TEXMFDIST")
+(("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n")
 ;; Ignore system-wide cache.  Use local one, by default
 ;; "$HOME/.texlive/texmf-var/".
-(("^TEXMFCACHE = .*")
- "TEXMFCACHE = $TEXMFVAR\n")
+(("^TEXMFCACHE = .*") "TEXMFCACHE = $TEXMFVAR\n")
+;; Set TEXMFCNF.  Since earlier values of variables have
+;; precedence over later ones, instead the appropriate value
+;; above the lengthy one.
+(("^TEXMFCNF = " lead)
+ (string-append
+  "TEXMFCNF = " #$output "/share/texmf-dist/web2c\n" lead))
 ;; Don't truncate lines.
 (("^error_line = .*$") "error_line = 254\n")
 (("^half_error_line = .*$") "half_error_line = 238\n")



22/55: gnu: texlive-velthuis: Build executable.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit ae509b7c76899194f319710560bb9550dc9d8119
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 16:43:05 2024 +0200

gnu: texlive-velthuis: Build executable.

* gnu/packages/tex.scm (texlive-velthuis-bin): New variable.
(texlive-velthuis)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-VELTHUIS-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build devnag.

Change-Id: Ib101e7fd1f425d75c71e67f8a8ebbfb094161f90
---
 gnu/packages/tex.scm | 52 +++-
 1 file changed, 51 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c0c0d4b7aa..8e61bb22fe 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -767,6 +767,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "axodraw2"
   "chktex"
   "cjkutils"
+  "devnag"
   "dvi2tty"
   "dvipng"
   "dvisvgm"
@@ -32252,6 +32253,46 @@ Manuscripts Submitted to Biomedical Journals (also 
known as the Vancouver
 style).")
 (license license:lppl1.3+)))
 
+(define texlive-velthuis-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-velthuis-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '("devnag"))
+(delete-other-directories "texk" '())
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-devnag"
+ (delete "--disable-devnag" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "utils/devnag"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "utils/devnag"
+  (invoke "make" "install"))
+
 (define-public texlive-velthuis
   (package
 (name "texlive-velthuis")
@@ -32274,7 +32315,16 @@ style).")
   "0h9maci6b65x7zy13v5j4vlr07lnghiwckh7bn4ix7d1wmh74bij")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
-(native-inputs (list texlive-metafont))
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input 
"texlive-velthuis-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-metafont texlive-velthuis-bin))
 (propagated-inputs (list texlive-xetex-devanagari))
 (home-page "https://ctan.org/pkg/devanagari;)
 (synopsis "Typeset Devanagari")



20/55: gnu: texlive-dvi2tty: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 56433cbfead8101000ef504feffab421819aa046
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 15:45:50 2024 +0200

gnu: texlive-dvi2tty: Build executables.

* gnu/packages/tex.scm (texlive-dvi2tty): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dvi2tty' as a single package.
[native-inputs]: Add PKG-CONFIG and TEXLIVE-LIBKPATHSEA.
[inputs]: Add TEXLIVE-LIBPTEXENC.

* gnu/packages/tex.scm (texlive-bin): Do not build dvi2tty.

Change-Id: I75b309cbf67e0a0f2635c93fea65f103086ff5fe
---
 gnu/packages/tex.scm | 50 +++---
 1 file changed, 39 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3e66128fe1..cf9c95b0d4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -766,6 +766,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "axodraw2"
   "chktex"
   "cjkutils"
+  "dvi2tty"
   "dvipng"
   "dvisvgm"
   "kpathsea"
@@ -34035,18 +34036,45 @@ homebrewed classes and package files.")
 
 (define-public texlive-dvi2tty
   (package
+(inherit texlive-bin)
 (name "texlive-dvi2tty")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/disdvi.1"
-   "doc/man/man1/disdvi.man1.pdf"
-   "doc/man/man1/dvi2tty.1"
-   "doc/man/man1/dvi2tty.man1.pdf")
- (base32
-  "108y0qxh13x0iivgsvkk4370f471p03nyl4x9nn7lng1wrsafp6h")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("dvi2tty"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvi2tty"
+ (delete "--disable-dvi2tty" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvi2tty"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvi2tty"
+  (invoke "make" "install"
+(native-inputs (list pkg-config texlive-libkpathsea))
+(inputs (list texlive-libptexenc))
 (home-page "https://ctan.org/pkg/dvi2tty;)
 (synopsis "Produce ASCII from DVI")
 (description



05/55: gnu: texlive-bin: Remove unnecessary phases.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit facf2965c8ffd366e5d5f6b49104c6d791578c36
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 18:28:12 2024 +0200

gnu: texlive-bin: Remove unnecessary phases.

* gnu/packages/tex.scm (texlive-bin)[arguments]<#:phases>: These phases no
longer seem necessary, they are not needed in the monolithic TEXLIVE 
package.

Change-Id: I73b7bbec0252ab56980a82b5e11140e7b84f54ef
---
 gnu/packages/tex.scm | 35 ---
 1 file changed, 35 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0ec3b52d3a..e19b5d9180 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -716,41 +716,6 @@ and should be preferred to it whenever a package would 
otherwise depend on
 (("/usr/include /usr/local/include")
  (string-append #$(this-package-input "texlive-libkpathsea")
 "/include")
-  (add-after 'unpack 'patch-dvisvgm-build-files
-(lambda _
-  ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
-  ;; the appropriate linker flags are not added.
-  (substitute* "texk/dvisvgm/configure"
-(("^have_libgs=yes" all)
- (string-append all "\nHAVE_LIBGS=1")
-  (add-after 'unpack 'disable-failing-test
-(lambda _
-  ;; FIXME: This test fails on 32-bit architectures since Glibc
-  ;; 2.28: .
-  (substitute* "texk/web2c/omegafonts/check.test"
-(("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck 
\\|\\| exit 1")
- "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 
77"
-  #$@(if (or (target-ppc32?)
- (target-riscv64?))
- ;; Some mendex tests fail on some architectures.
- `((add-after 'unpack 'skip-mendex-tests
- (lambda _
-   (substitute* '("texk/mendexk/tests/mendex.test"
-  "texk/upmendex/tests/upmendex.test")
- (("srcdir/tests/pprecA-0.ind pprecA-0.ind1 \\|\\| 
exit 1")
-  "srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 
77")
- '())
-  #$@(if (or (target-arm32?)
- (target-ppc32?))
- `((add-after 'unpack 'skip-faulty-test
- (lambda _
-   ;; Skip this faulty test on armhf-linux:
-   ;;   https://issues.guix.gnu.org/54055
-   (substitute* '("texk/mendexk/tests/mendex.test"
-  "texk/upmendex/tests/upmendex.test")
- (("^TEXMFCNF=" all)
-  (string-append "exit 77 # skip\n" all))
- '())
   (add-after 'install 'post-install
 (lambda _
   ;; Create symbolic links for the latex variants.  We link



36/55: gnu: texlive-seetexk: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 83d49252ebe2d4ab37b1a47fdb3e277080fcc418
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 15:17:06 2024 +0200

gnu: texlive-seetexk: Build executables.

* gnu/packages/tex.scm (texlive-seetexk): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `seetexk' as a single package.

Change-Id: I86594d2421cdbb0599c2bb0f0fa009042ee7cd7e
---
 gnu/packages/tex.scm | 56 
 1 file changed, 39 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 72186ccf71..d105efc4ce 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -39699,22 +39699,44 @@ stylized format that Metapost outputs.")
 
 (define-public texlive-seetexk
   (package
+(inherit texlive-bin)
 (name "texlive-seetexk")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dvibook.1"
-   "doc/man/man1/dvibook.man1.pdf"
-   "doc/man/man1/dviconcat.1"
-   "doc/man/man1/dviconcat.man1.pdf"
-   "doc/man/man1/dviselect.1"
-   "doc/man/man1/dviselect.man1.pdf"
-   "doc/man/man1/dvitodvi.1"
-   "doc/man/man1/dvitodvi.man1.pdf")
- (base32
-  "1bhv5xgv8jpam5apdybd0cggnvcizk2r6zs7lim1hmhzafpqqlcx")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("seetexk"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-seetexk"
+ (delete "--disable-seetexk" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/seetexk"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/seetexk"
+  (invoke "make" "install"
+(inputs '())
 (home-page "https://ctan.org/pkg/dvibook;)
 (synopsis "Utilities for manipulating DVI files")
 (description
@@ -39734,8 +39756,8 @@ a new DVI file;
 @item @command{dvitodvi}, which will rearrange the pages of a DVI file to
 create a new file;
 
-@item @command{libtex}, a library for manipulating the files, from the old
-SeeTeX project.
+@item @code{libtex}, a library for manipulating the files, from the old SeeTeX
+project.
 
 @end itemize")
 (license license:expat)))



34/55: gnu: texlive-ttfutils: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 2c43ef554de9a40d61cc874d14ecfca13478fcf0
Author: Nicolas Goaziou 
AuthorDate: Sun May 12 13:23:33 2024 +0200

gnu: texlive-ttfutils: Build executables.

* gnu/packages/tex.scm (texlive-ttfutils-bin): New variable.
(texlive-ttfutils)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-TTFUTILS-BIN.

* gnu/packages/tex.scm (texlive-bin): Do not build "ttf2pk2" and "ttfdump".

Change-Id: I4bea827f14ea8298d825663699eb34ce9e916870
---
 gnu/packages/tex.scm | 60 
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f090fcd4a2..291fe88f38 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -784,6 +784,8 @@ and should be preferred to it whenever a package would 
otherwise depend on
   "t1utils"
   "texdoctk"
   "tpic2pdftex"
+  "ttf2pk2"
+  "ttfdump"
   "upmendex"
   "vlna"
   "xdvik"
@@ -45576,6 +45578,53 @@ which produced lines at an arbitrary orientation.  The 
present package
 emulates the macro, using TikZ.")
 (license license:public-domain)))
 
+(define texlive-ttfutils-bin
+  (package
+(inherit texlive-bin)
+(name "texlive-ttfutils-bin")
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("ttfdump" "ttf2pk2"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-ttfdump"
+ "--enable-ttf2pk2"
+ (delete "--disable-ttfdump"
+ (delete "--disable-ttf2pk2" #$flags
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/ttfdump"
+(invoke "make" "check"))
+  (with-directory-excursion "texk/ttf2pk2"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/ttfdump"
+  (invoke "make" "install"))
+(with-directory-excursion "texk/ttf2pk2"
+  (invoke "make" "install"
+(inputs (list freetype
+
 (define-public texlive-ttfutils
   (package
 (name "texlive-ttfutils")
@@ -45598,8 +45647,19 @@ emulates the macro, using TikZ.")
   "1yfr3yic0bx73imxhmxhnhjc1mpwy9f55sh3p430p2f2yvxwm0cs")))
 (outputs '("out" "doc"))
 (build-system texlive-build-system)
+(arguments
+ (list #:phases
+   #~(modify-phases %standard-phases
+   (add-after 'install 'install-bin
+ (lambda _
+   (let ((source
+  #$(this-package-native-input 
"texlive-ttfutils-bin")))
+ (copy-recursively (string-append source "/bin")
+   (string-append #$output "/bin"
+(native-inputs (list texlive-ttfutils-bin))
 (home-page "https://ctan.org/pkg/ttfutils;)
 (synopsis "Convert TrueType to TFM and PK fonts")
+;; XXX: "ttf2afm" is actually provided by PDFTeX, through "texlive-bin".
 (description
  "This package provides utilities to convert TrueType to TFM and PK fonts:
 @command{ttf2afm}, @command{ttf2pk}, @command{ttf2tfm}, and



11/55: gnu: texlive-bin: Do not build Xindy.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit c0a98fd3d167a692685c655a9305390a71021068
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 12:15:50 2024 +0200

gnu: texlive-bin: Do not build Xindy.

* gnu/packages/tex.scm (texlive-bin)[arguments]<#:configure-flags>: Do not
build Xindy.

Change-Id: I2b1c4e637fc93a5562c80b4037814044bf058982
---
 gnu/packages/tex.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 066f60f2a6..bc9f5c32e4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -705,7 +705,8 @@ and should be preferred to it whenever a package would 
otherwise depend on
 "--disable-dvisvgm"
 "--disable-kpathsea"
 "--disable-psutils"
-"--disable-upmendex"))
+"--disable-upmendex"
+"--disable-xindy"))
   #:phases
   #~(modify-phases %standard-phases
   (add-after 'unpack 'locate-external-kpathsea



01/55: gnu: texlive-libkpathsea: Fix TEXMFCACHE location.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 9a0af68767c298714d6c7642a76881403e935ab2
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 14:42:36 2024 +0200

gnu: texlive-libkpathsea: Fix TEXMFCACHE location.

* gnu/packages/tex.scm (texlive-libkpathsea)[arguments]<#:phases>: Set
TEXMFCACHE in "texmf.cnf" to "$HOME/.texlive/texmf-var/" instead of
"{$GUIX_TEXMF}", which creates a "{" directory in the current working
directory.
* guix/build/texlive-build-system.scm (build): Set TEXMFCACHE to a local
directory since $HOME is not available during build.

Change-Id: I4dfa8fd2151d0ca3db788633e70d8e26b9289d89
---
 gnu/packages/tex.scm| 6 +-
 guix/build/texlive-build-system.scm | 5 -
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4e46c1a898..91b0393641 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2020 Vincent Legoll 
 ;;; Copyright © 2020, 2021 Paul Garlick 
 ;;; Copyright © 2021, 2022 Maxim Cournoyer 
-;;; Copyright © 2021-2023 Nicolas Goaziou 
+;;; Copyright © 2021-2024 Nicolas Goaziou 
 ;;; Copyright © 2021 Leo Le Bouter 
 ;;; Copyright © 2021 Xinglu Chen 
 ;;; Copyright © 2021 Ivan Gankevich 
@@ -224,6 +224,10 @@
  "TEXMF = {$GUIX_TEXMF}\n")
 (("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix)
  (string-append #$output suffix))
+;; Ignore system-wide cache.  Use local one, by default
+;; "$HOME/.texlive/texmf-var/".
+(("^TEXMFCACHE = .*")
+ "TEXMFCACHE = $TEXMFVAR\n")
 ;; Don't truncate lines.
 (("^error_line = .*$") "error_line = 254\n")
 (("^half_error_line = .*$") "half_error_line = 238\n")
diff --git a/guix/build/texlive-build-system.scm 
b/guix/build/texlive-build-system.scm
index a9fe9c80cc..abfa1e3406 100644
--- a/guix/build/texlive-build-system.scm
+++ b/guix/build/texlive-build-system.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2017 Ricardo Wurmus 
 ;;; Copyright © 2021 Maxim Cournoyer 
 ;;; Copyright © 2021 Thiago Jung Bauermann 
-;;; Copyright © 2023 Nicolas Goaziou 
+;;; Copyright © 2023, 2024 Nicolas Goaziou 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -215,6 +215,9 @@ runfile to replace.  If a file has no matching runfile, it 
is ignored."
  (files files)))
   (else '()
 (unless (null? targets)
+  ;; Default cache is located in $HOME, which is not set during build.
+  ;; Use current working directory instead.
+  (setenv "TEXMFCACHE" "texmf-cache/")
   (let ((output (string-append (getcwd) "/build")))
 (mkdir-p output)
 (for-each (lambda (target)



branch tex-team created (now cb357c703e)

2024-05-18 Thread guix-commits
ngz pushed a change to branch tex-team
in repository guix.

  at cb357c703e gnu: texlive: Fix ConTeXt.

This branch includes the following new commits:

 new 9a0af68767 gnu: texlive-libkpathsea: Fix TEXMFCACHE location.
 new 4064850f59 gnu: texlive-chktex: Fix runtime error.
 new ead7afd431 gnu: texlive-psutils: Build executables.
 new c29fcc46a2 gnu: texlive-bin, texlive-kpathsea: Refer to TEXLIVE-SOURCE.
 new facf2965c8 gnu: texlive-bin: Remove unnecessary phases.
 new b91818f96e gnu: texlive-bin: Remove conditional tests on some 
architectures.
 new 939d66266c gnu: texlive-libkpathsea: Set sane values in "texmf.cnf".
 new 5d0ae3e575 gnu: texlive-dvisvgm: Build executables.
 new e8eef67c11 gnu: texlive-upmendex: Build executable.
 new 84125587a1 gnu: texlive-xindy: Refactor package.
 new c0a98fd3d1 gnu: texlive-bin: Do not build Xindy.
 new 3cfdcbff4a gnu: texlive-bin: Skip building axodraw2.
 new 8f4af0d2ea gnu: texlive-cjkutils: Build executables.
 new ac9213945a gnu: texlive-lacheck: Build executable.
 new 6c6605635c gnu: texlive-lcdftypetools: Build executables.
 new dcbc1032cd gnu: texlive-t1utils: Build executables.
 new f6a5d331a0 gnu: texlive-dvipng: Build executables.
 new 56832ae53f gnu: texlive-afm2pl: Build executable.
 new b19e315e1f gnu: Add texlive-libptexenc.
 new 56433cbfea gnu: texlive-dvi2tty: Build executables.
 new 7771dc3e68 gnu: texlive-autosp: Build executable.
 new ae509b7c76 gnu: texlive-velthuis: Build executable.
 new 7c700843f5 gnu: texlive-ps2eps: Build executables.
 new e5ae163917 gnu: texlive-xpdfopen: Build executables.
 new 8dcad64cff gnu: texlive-libkpathsea: Tiny refactoring.
 new 5c37ce53bd gnu: texlive-texdoctk: Fix runtime error.
 new 2320e0f06f gnu: texlive-xml2pmx: Build executable.
 new 96f051fc31 gnu: texlive-tpic2pdftex: Build executable.
 new b69d0d9e9c gnu: texlive-vlna: Build executable.
 new 2bb0bcb3cc gnu: texlive-pmx: Build executables.
 new bc76ad5bed gnu: texlive-m-tx: Build executable.
 new 2cb184bb57 gnu: texlive-bin: Ignore "utils" directory.
 new 47dc80f742 gnu: texlive-xdvi: Build executables.
 new 2c43ef554d gnu: texlive-ttfutils: Build executables.
 new 84b29aa0b9 gnu: texlive-tex4ht: Build executables.
 new 83d49252eb gnu: texlive-seetexk: Build executables.
 new 8808a92229 gnu: texlive-ps2pk: Build executables.
 new 0ae29ab9b8 gnu: texlive-ptex: Build executables.
 new f4d1f94e71 gnu: texlive-makeindex: Build executables.
 new 126d638327 gnu: texlive-gsftopk: Build executables.
 new e455dacbb5 gnu: texlive-gregoriotex: Build executables.
 new 064fd1f511 gnu: texlive-dvips: Build executables.
 new d034480c7b gnu: texlive-dvipos: Build executables.
 new 8c71c04c3f gnu: texlive-dvipdfmx: Build executables.
 new eba279b321 gnu: texlive-dviout-util: Build executables.
 new 207f5d5100 gnu: texlive-dviljk: Build executables.
 new 1f5812b77b gnu: texlive-dvidvi: Build executable.
 new e1ad533035 gnu: texlive-dtl: Build executables.
 new 794353cab9 gnu: texlive-detex: Build executable.
 new e90983bb9c gnu: texlive-bin: Only build "web2c" package.
 new 32a1c6adef gnu: texlive-bibtex8: Build executable.
 new bc8ad5990a gnu: texlive-bibtexu: Build executable.
 new 807d540f6e gnu: Update commentary in "tex.scm".
 new 4dbc4e7370 gnu: texlive-libkpathsea: Allow LuaLaTeX finding fonts on 
the system.
 new cb357c703e gnu: texlive: Fix ConTeXt.

The 55 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




10/55: gnu: texlive-xindy: Refactor package.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 84125587a1c4fab66cf09c4a929a10eb95248599
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 12:14:32 2024 +0200

gnu: texlive-xindy: Refactor package.

* gnu/packages/tex.scm (texlive-xindy): Inherit from TEXLIVE-BIN.
[source]: Use a trimmed TEXLIVE-SOURCE.
[outputs]: Keep a single output.
[arguments]: Inherit from TEXLIVE-BIN.

Change-Id: Ifdf1a4cc65d503d550faf94651e506538266f390
---
 gnu/packages/tex.scm | 52 +---
 1 file changed, 33 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 01c6c3f0da..066f60f2a6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -71085,31 +71085,45 @@ handle complex tests.")
 ;; Texmf tree in TeX Live is incomplete, as it doesn't include
 ;; "xindy.mem", so it is not possible to use `texlive-origin'.  This file
 ;; isn't build by default by `texlive-bin' either.  Build it specially
-;; from `texlive-bin' source instead.
-(inherit texlive-libkpathsea)
+;; from TEXLIVE-SOURCE instead.
+(inherit texlive-bin)
 (name "texlive-xindy")
-(version (number->string %texlive-revision))
-(outputs '("out" "doc"))
-(build-system gnu-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root dirs)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir "."
+   (lambda (file)
+ (and (not (member file (append '("." "..") 
dirs)))
+  (eq? 'directory (stat:type (stat 
file)))
+(delete-other-directories "libs/" '())
+(delete-other-directories "utils/" '("xindy"))
+(delete-other-directories "texk/" '())
 (arguments
- (substitute-keyword-arguments (package-arguments texlive-libkpathsea)
-   ((#:out-of-source? _ #t) #t)
+ (substitute-keyword-arguments (package-arguments texlive-bin)
((#:configure-flags flags)
-#~(cons "--enable-xindy" (delete "--enable-kpathsea" #$flags)))
+#~(cons* "--disable-all-pkgs"
+ "--enable-xindy"
+ (delete "--disable-xindy" #$flags)))
((#:phases _)
 #~(modify-phases %standard-phases
-(replace 'install
+;; Building documentation require to generate font metrics, but
+;; HOME and therefore TEXMFVAR are unavailable.  Use a local
+;; TEXMFVAR instead.
+(add-before 'build 'set-texmfvar
+  (lambda _
+(setenv "TEXMFVAR" (string-append (getcwd) "/texmf-var"
+;; XXX: Install process does not create this directory.
+(add-before 'install 'create-missing-directory
   (lambda _
-(with-directory-excursion "utils/xindy/"
-  (invoke "make")
-  (mkdir-p (string-append #$output "/bin"))
-  (invoke "make" "install")
-  (let ((out (string-append #$output "/share"))
-(doc (string-append #$output:doc "/share/texmf-dist")))
-(mkdir-p doc)
-(with-directory-excursion doc
-  (rename-file (string-append out "/texmf-dist/doc") "doc")
-  (rename-file (string-append out "/man") "doc/man"))
+(mkdir-p (string-append #$output "/bin"
 (add-after 'install 'patch-clisp-location
   (lambda* (#:key inputs #:allow-other-keys)
 ;; The scripts are encoded in ISO-8859-1 (or iso-latin-1).



08/55: gnu: texlive-dvisvgm: Build executables.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 5d0ae3e575ad55455af8d16252f2263618df89cf
Author: Nicolas Goaziou 
AuthorDate: Sat May 11 02:46:48 2024 +0200

gnu: texlive-dvisvgm: Build executables.

* gnu/packages/tex.scm (texlive-dvisvgm)[source]: Build from TEXLIVE-SOURCE.
[outputs]: Only provide "out".
[arguments]: Build `dvisvgm' as a single package.
[native-inputs]: Add PKG-CONFIG.
[inputs]: Add BROTLI, CLIPPER, FREETYPE, GHOSTSCRIPT, OPENSSL, POTRACE, 
WOFF2,
XXHASH and ZLIB.

* gnu/packages/tex.scm (texlive-bin): Do not provide related binaries.

Change-Id: Ifc19df9e24a5eb07f5b9f26d77072fab3a78b21c
---
 gnu/packages/tex.scm | 73 
 1 file changed, 62 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index bf187a547d..631bd510d4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -99,6 +99,7 @@
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages base)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages web)
@@ -643,7 +644,6 @@ and should be preferred to it whenever a package would 
otherwise depend on
(modules '((guix build utils)
   (ice-9 ftw)))
(snippet
-;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
 #~(with-directory-excursion "libs"
 (let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" 
"xpdf")))
   ;; Delete bundled software, except Lua which cannot easily be
@@ -701,8 +701,9 @@ and should be preferred to it whenever a package would 
otherwise depend on
  "--disable-mfluajit")
'())
 ;; Disable tools built in other packages.
-"--disable-kpathsea"
 "--disable-chktex"
+"--disable-dvisvgm"
+"--disable-kpathsea"
 "--disable-psutils"))
   #:phases
   #~(modify-phases %standard-phases
@@ -34130,16 +34131,66 @@ paper feed errors!")
 
 (define-public texlive-dvisvgm
   (package
+(inherit texlive-bin)
 (name "texlive-dvisvgm")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "doc/man/man1/dvisvgm.1"
-   "doc/man/man1/dvisvgm.man1.pdf")
- (base32
-  "1fz3sa7p9wk2g1v0bpy87vz7nxwrh5bsfl4m734n6lhsh1bkj6fb")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
+(delete-other-directories "texk" '("dvisvgm"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-dvisvgm"
+ "--with-system-freetype2"
+ "--with-system-libgs"
+ "--with-system-potrace"
+ "--with-system-zlib"
+ (delete "--disable-dvisvgm" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
+;; the appropriate linker flags are not added.
+(add-after 'unpack 'patch-dvisvgm-build-files
+  (lambda _
+(substitute* "texk/dvisvgm/configure"
+  (("^have_libgs=yes" all)
+   (string-append all "\nHAVE_LIBGS=1")
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/dvisvgm"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/dvisvgm"
+  (invoke "make" "install"
+(inputs
+ (list brotli
+   clipper
+   freetype
+   ghostscript
+   openssl
+   potrace
+   woff2
+   xxhash
+   

06/55: gnu: texlive-bin: Remove conditional tests on some architectures.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit b91818f96e4d0efa4fd2db77631b846ab186c0d2
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 18:30:03 2024 +0200

gnu: texlive-bin: Remove conditional tests on some architectures.

* gnu/packages/tex.scm (texlive-bin)[arguments]<#:tests>: Enable tests on 
all
supported architectures.

Change-Id: Id23b84218d20d16de23dbe7e45a34463539a690c
---
 gnu/packages/tex.scm | 9 -
 1 file changed, 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e19b5d9180..5434f6b04b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -658,15 +658,6 @@ and should be preferred to it whenever a package would 
otherwise depend on
   (srfi srfi-26))
   #:out-of-source? #t
   #:parallel-tests? #f  ;bibtex8.test fails otherwise
-  ;; Disable tests on some architectures to cope with a failure of
-  ;; luajiterr.test.
-  ;;
-  ;; XXX FIXME fix luajit properly on these architectures.
-  #:tests? (let ((s (or (%current-target-system)
-(%current-system
- (not (or (string-prefix? "aarch64" s)
-  (string-prefix? "mips64" s)
-  (string-prefix? "powerpc64le" s
   #:configure-flags
   #~(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
   (list "--with-banner-add=/GNU Guix"



02/55: gnu: texlive-chktex: Fix runtime error.

2024-05-18 Thread guix-commits
ngz pushed a commit to branch tex-team
in repository guix.

commit 4064850f59fef0db448d3dd39740e6cc72ecd95e
Author: Nicolas Goaziou 
AuthorDate: Wed May 8 16:41:02 2024 +0200

gnu: texlive-chktex: Fix runtime error.

This fixes .

* gnu/packages/tex.scm (texlive-source): New variable.
(texlive-chktex)[source]: Build binary from source.
[build-system]: Use GNU-BUILD-SYSTEM.
[arguments]<#:phases>: Make sure the `chktex' executable can locate a global
configuration file.
[native-inputs]: Add PKG-CONFIG and TEXLIVE-LIBKPATHSEA.

Change-Id: Icdf22635b304caa86757117a408da9fa1452cc10
---
 gnu/packages/tex.scm | 79 +---
 1 file changed, 62 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 91b0393641..295a4099c2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -162,6 +162,17 @@
   (define-deprecated/public old-name name
 (deprecated-package (symbol->string 'old-name) name)))
 
+(define texlive-source
+  (let ((version "20230313"))
+(origin
+  (method url-fetch)
+  (uri (string-append "ftp://tug.org/historic/systems/texlive/;
+  (string-take version 4) "/"
+  "texlive-" version "-source.tar.xz"))
+  (sha256
+   (base32
+"1fbrkv7g9j6ipmwjx27l8l9l974rmply8bhf7c2iqc6h3q7aly1q")
+
 (define-public texlive-libkpathsea
   (package
 (name "texlive-libkpathsea")
@@ -33369,24 +33380,58 @@ labels and advises the user to use a starred version 
instead.")
 
 (define-public texlive-chktex
   (package
+(inherit texlive-bin)
 (name "texlive-chktex")
-(version (number->string %texlive-revision))
-(source (texlive-origin
- name version
- (list "chktex/"
-   "doc/chktex/"
-   "doc/man/man1/chktex.1"
-   "doc/man/man1/chktex.man1.pdf"
-   "doc/man/man1/chkweb.1"
-   "doc/man/man1/chkweb.man1.pdf"
-   "doc/man/man1/deweb.1"
-   "doc/man/man1/deweb.man1.pdf"
-   "scripts/chktex/")
- (base32
-  "0qyrllxvcymmr1a4sq9c88fw5zchcx0n6yac69s61fg6xypk18bq")))
-(outputs '("out" "doc"))
-(build-system texlive-build-system)
-(arguments (list #:link-scripts #~(list "chkweb.sh" "deweb.pl")))
+(source
+ (origin
+   (inherit texlive-source)
+   (modules '((guix build utils)
+  (ice-9 ftw)))
+   (snippet
+#~(let ((delete-other-directories
+ (lambda (root keep)
+   (with-directory-excursion root
+ (for-each
+  delete-file-recursively
+  (scandir
+   "."
+   (lambda (file)
+ (and (not (member file (append keep '("." ".."
+  (eq? 'directory (stat:type (stat file)))
+(delete-other-directories "libs" '())
+(delete-other-directories "utils" '())
+(delete-other-directories "texk" '("chktex"))
+(arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+   ((#:configure-flags flags)
+#~(cons* "--disable-all-pkgs"
+ "--enable-chktex"
+ (delete "--disable-ckhtex" #$flags)))
+   ((#:phases _)
+#~(modify-phases %standard-phases
+(add-after 'unpack 'locate-global-configuration-file
+  ;; `chktex' needs to know where its global configuration file is.
+  ;; However, it cannot understand our convoluted TEXMFMAIN value.
+  ;; This phase forces configuration file name.
+  (lambda _
+(substitute* "texk/chktex/chktex-src/OpSys.c"
+  (("kpse_var_value\\(\"TEXMFMAIN\"\\)")
+   (string-append "strdup(\"" #$output 
"/share/texmf-dist\")")
+(replace 'check
+  (lambda* (#:key tests? #:allow-other-keys)
+(when tests?
+  (with-directory-excursion "texk/chktex"
+(invoke "make" "check")
+(replace 'install
+  (lambda _
+(with-directory-excursion "texk/chktex"
+  (invoke "make" "install"
+;; Compilation forces a "/usr/bin/env perl" shebang.  Change it.
+(add-after 'install 'patch-shebang
+  (lambda _
+(patch-shebang
+ (string-append #$output
+
"/share/texmf-dist/scripts/chktex/deweb.pl"
 (inputs (list perl))
 (home-page "https://ctan.org/pkg/chktex;)
 (synopsis "Check for errors in LaTeX documents")



branch tex-team deleted (was 97dcf2cef7)

2024-05-18 Thread guix-commits
ngz pushed a change to branch tex-team
in repository guix.

 was 97dcf2cef7 gnu: texlive-libkpathsea: Allow LuaLaTeX finding fonts on 
the system.

This change permanently discards the following revisions:

 discard 97dcf2cef7 gnu: texlive-libkpathsea: Allow LuaLaTeX finding fonts on 
the system.
 discard e9536aedd9 gnu: Update commentary in "tex.scm".
 discard 1d78bf6d77 gnu: texlive-bibtexu: Build executable.
 discard a88bb3c01d gnu: texlive-bibtex8: Build executable.
 discard 70db23947b gnu: texlive-bin: Only build "web2c" package.
 discard 7ab08ac1ed gnu: texlive-detex: Build executable.
 discard 5157979dfb gnu: texlive-dtl: Build executables.
 discard f24faedf1e gnu: texlive-dvidvi: Build executable.
 discard 57531eda47 gnu: texlive-dviljk: Build executables.
 discard bb5b6ccafc gnu: texlive-dviout-util: Build executables.
 discard 3abbb3be64 gnu: texlive-dvipdfmx: Build executables.
 discard c05d3908c9 gnu: texlive-dvipos: Build executables.
 discard d5277c2368 gnu: texlive-dvips: Build executables.
 discard 1fc2011899 gnu: texlive-gregoriotex: Build executables.
 discard 5f4377dbb3 gnu: texlive-gsftopk: Build executables.
 discard bcb65260c3 gnu: texlive-makeindex: Build executables.
 discard 6b9bea66e4 gnu: texlive-ptex: Build executables.
 discard d53d810766 gnu: texlive-ps2pk: Build executables.
 discard dff51e14b6 gnu: texlive-seetexk: Build executables.
 discard 0d09837c26 gnu: texlive-tex4ht: Build executables.
 discard 17a61f69b4 gnu: texlive-ttfutils: Build executables.
 discard bb83ce60e8 gnu: texlive-xdvi: Build executables.
 discard b73cebbae4 gnu: texlive-bin: Ignore "utils" directory.
 discard 29d4630ba8 gnu: texlive-m-tx: Build executable.
 discard 420aaca143 gnu: texlive-pmx: Build executables.
 discard 23721716b6 gnu: texlive-vlna: Build executable.
 discard 547cf65c54 gnu: texlive-tpic2pdftex: Build executable.
 discard a8287d2ac5 gnu: texlive-xml2pmx: Build executable.
 discard 886c51c391 gnu: texlive-texdoctk: Fix runtime error.
 discard 3f258dadb3 gnu: texlive-libkpathsea: Tiny refactoring.
 discard 6d87caf93f gnu: texlive-xpdfopen: Build executables.
 discard 8cbe730479 gnu: texlive-ps2eps: Build executables.
 discard 6effd45d6b gnu: texlive-velthuis: Build executable.
 discard fe07fe8224 gnu: texlive-autosp: Build executable.
 discard 08aaceadfc gnu: texlive-dvi2tty: Build executables.
 discard 40ff148e75 gnu: Add texlive-libptexenc.
 discard 430c5af8fe gnu: texlive-afm2pl: Build executable.
 discard 3577bdbfab gnu: texlive-dvipng: Build executables.
 discard 076060e255 gnu: texlive-t1utils: Build executables.
 discard 5bcdca4dfe gnu: texlive-lcdftypetools: Build executables.
 discard 4675c360c9 gnu: texlive-lacheck: Build executable.
 discard a85d71b3a4 gnu: texlive-cjkutils: Build executables.
 discard c2a3452d03 gnu: texlive-bin: Skip building axodraw2.
 discard 5dca821717 gnu: texlive-bin: Do not build Xindy.
 discard ca573d7fe2 gnu: texlive-xindy: Refactor package.
 discard e1e73e9cd8 gnu: texlive-upmendex: Build executable.
 discard 96a86191b9 gnu: texlive-dvisvgm: Build executables.
 discard 881136e8a6 gnu: texlive-libkpathsea: Set sane values in "texmf.cnf".
 discard 6680d8af5a gnu: texlive-bin: Remove conditional tests on some 
architectures.
 discard e2044297ce gnu: texlive-bin: Remove unnecessary phases.
 discard 9b6b61222b gnu: texlive-bin, texlive-kpathsea: Refer to TEXLIVE-SOURCE.
 discard faf828e9f3 gnu: texlive-psutils: Build executables.
 discard f710219e0a gnu: texlive-chktex: Fix runtime error.
 discard 3f160e9201 gnu: texlive-libkpathsea: Fix TEXMFCACHE location.



05/09: gnu: linux-libre 6.1: Update to 6.1.91.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 04d49bfebaf19d533955a8f7a7890df72916dc99
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:25 2024 +0200

gnu: linux-libre 6.1: Update to 6.1.91.

* gnu/packages/linux.scm (linux-libre-6.1-version): Update to 6.1.91.
(linux-libre-6.1-pristine-source, deblob-scripts-6.1): Update hashes.

Change-Id: Ibcd0827399b8d75d841426c20af8f2a6788d3c2c
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5b40ec66f5..1643da039c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -555,17 +555,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-6.6)))
 
-(define-public linux-libre-6.1-version "6.1.90")
+(define-public linux-libre-6.1-version "6.1.91")
 (define-public linux-libre-6.1-gnu-revision "gnu")
 (define deblob-scripts-6.1
   (linux-libre-deblob-scripts
linux-libre-6.1-version
linux-libre-6.1-gnu-revision
(base32 "1sf80f2i4vf888xjcn84ymn4w5ynn30ib9033zwmv7f09yvfhapy")
-   (base32 "0104m61mqhlmsjjprj51njwbffjcqgjln5bf1wknb6y3iiazl6ng")))
+   (base32 "0nq8b6rnn031wl0qz7ahyfs3hcb0qsr7hzdmxi2g33ycsm9955lk")))
 (define-public linux-libre-6.1-pristine-source
   (let ((version linux-libre-6.1-version)
-(hash (base32 "07cfg0chssvpc4mqls3aln6s4lqjp6k4x2n63wndmkjgfqpdg8w3")))
+(hash (base32 "1v2d5syxwwqlhvjzxk003qz9sr18r0n8dgg976vbi492r9iww2l8")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.1)))



02/09: gnu: linux-libre 6.9: Update to 6.9.1.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 6eadfb9efe0918ecb826daa05a1e4293dfff57f0
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:22 2024 +0200

gnu: linux-libre 6.9: Update to 6.9.1.

* gnu/packages/linux.scm (linux-libre-6.9-version): Update to 6.9.1.
(linux-libre-6.9-pristine-source): Update hash.

Change-Id: I9fc5ff4949e5676d8301df2363bf937b2e4767e5
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5758991136..142891c917 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -503,7 +503,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 
 ;; The current "mainline" kernel.
 
-(define-public linux-libre-6.9-version "6.9")
+(define-public linux-libre-6.9-version "6.9.1")
 (define-public linux-libre-6.9-gnu-revision "gnu")
 (define deblob-scripts-6.9
   (linux-libre-deblob-scripts
@@ -513,7 +513,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0a8ikg2b4q6xkd3pnzvd777ngrx74by7l13q7jg4n88myfxqk9xb")))
 (define-public linux-libre-6.9-pristine-source
   (let ((version linux-libre-6.9-version)
-(hash (base32 "0jc14s7z2581qgd82lww25p7c4w72scpf49z8ll3wylwk3xh3yi4")))
+(hash (base32 "0jn0qp22vx7xf2mgaj7cwf8agqhahvrwlda4ak6rw67xk2x19d01")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.9)))



03/09: gnu: linux-libre-6.8: Update to 6.8.10.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit e44ea569b84cc9f5ae6cbb820031aed9bfa25355
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:23 2024 +0200

gnu: linux-libre-6.8: Update to 6.8.10.

* gnu/packages/linux.scm (linux-libre-6.8-version): Update to 6.8.10.
(linux-libre-6.8-pristine-source, deblob-scripts-6.8): Update hashes.

Change-Id: I9f29850d6fcc2863daf3e901885383d484c5e1bb
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 142891c917..c71dd85e77 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -521,17 +521,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 ;; The current "stable" kernels. That is, the most recently released major
 ;; versions that are still supported upstream.
 
-(define-public linux-libre-6.8-version "6.8.9")
+(define-public linux-libre-6.8-version "6.8.10")
 (define-public linux-libre-6.8-gnu-revision "gnu")
 (define deblob-scripts-6.8
   (linux-libre-deblob-scripts
linux-libre-6.8-version
linux-libre-6.8-gnu-revision
-   (base32 "1kqwcm8baq3zx1z8jrgnvm9yps3y9jbf4pv1pbqqprpdscgl9089")
-   (base32 "1x7lmy8lff4g4hm67c97797ws594xv5c6l2v5mahj4xh4pb3b8d6")))
+   (base32 "0340z315zxz8wd2vlw5i5hgha10iy2yql1bglgl3dci7d2mvmihn")
+   (base32 "1lr4jgj7ii06fgkhnygvkvhz1sp898z801f7sc3zl70241ld06lb")))
 (define-public linux-libre-6.8-pristine-source
   (let ((version linux-libre-6.8-version)
-(hash (base32 "1dn9bgmf03bdfbmgq98d043702g808rjikxs2i9yia57iqiz21gr")))
+(hash (base32 "0xjirg2w5fc2w2q6wr702akszq32m31lk4q5nbjq10zqhbcr5fxh")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.8)))



07/09: gnu: linux-libre 5.10: Update to 5.10.217.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 9a8e59c50bd5c0c1b241cc0c4a20c99c166e8d04
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:27 2024 +0200

gnu: linux-libre 5.10: Update to 5.10.217.

* gnu/packages/linux.scm (linux-libre-5.10-version): Update to 5.10.217.
(linux-libre-5.10-pristine-source): Update hashes.

Change-Id: I3c9b72da4c45e5b4b91b532ad0db7de5a82a6973
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 6a90908112..f56947b287 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -585,7 +585,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-5.15)))
 
-(define-public linux-libre-5.10-version "5.10.216")
+(define-public linux-libre-5.10-version "5.10.217")
 (define-public linux-libre-5.10-gnu-revision "gnu1")
 (define deblob-scripts-5.10
   (linux-libre-deblob-scripts
@@ -595,7 +595,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "12csh2zyjrqzgqcv799gv8h4xaw1irxh2zqddn4jqp5p7psx4j5k")))
 (define-public linux-libre-5.10-pristine-source
   (let ((version linux-libre-5.10-version)
-(hash (base32 "0lg1zfb9y4ps86q85mlnyalb3s90zix003z62jb9bw139f65h473")))
+(hash (base32 "0qhzqrjci45vcbzjch7vq75i6hpyap6yb7jw6g71phcnqgzw2ay5")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-5.10)))



09/09: gnu: linux-libre 4.19: Update to 4.19.314.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit e4f23573fca567f1c7d5a082f496acc448495be6
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:29 2024 +0200

gnu: linux-libre 4.19: Update to 4.19.314.

* gnu/packages/linux.scm (linux-libre-4.19-version): Update to 4.19.314.
(linux-libre-4.19-pristine-source): Update hash.

Change-Id: I52815b6b79d6a9f0cfec531ffa9ba90d8189f426
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1d4ae3cf51..14ba70059e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -615,7 +615,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-5.4)))
 
-(define-public linux-libre-4.19-version "4.19.313")
+(define-public linux-libre-4.19-version "4.19.314")
 (define-public linux-libre-4.19-gnu-revision "gnu1")
 (define deblob-scripts-4.19
   (linux-libre-deblob-scripts
@@ -625,7 +625,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0fgkp3v7qgqpn7l1987xcwwlrmwsbscqnxfv06p8nkavrhymrv3c")))
 (define-public linux-libre-4.19-pristine-source
   (let ((version linux-libre-4.19-version)
-(hash (base32 "1j1r4mrdh1ray468jr5i8d2afiswb653bhq0ck8bcdw4rwp5w558")))
+(hash (base32 "0nvrpg5aj2q4h2drmczprqaprcc2zhcrijfri77b830ms8rg4y2a")))
 (make-linux-libre-source version
  (%upstream-linux-source version hash)
  deblob-scripts-4.19)))



08/09: gnu: linux-libre 5.4: Update to 5.4.276.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 6e29b2e6c23b632dfc1347bd21d94ae05f68e906
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:28 2024 +0200

gnu: linux-libre 5.4: Update to 5.4.276.

* gnu/packages/linux.scm (linux-libre-5.4-version): Update to 5.4.276.
(linux-libre-5.4-pristine-source): Update hash.

Change-Id: Ieea174e5ca46226f739cb9c092f7518bac44396f
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f56947b287..1d4ae3cf51 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -600,7 +600,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-5.10)))
 
-(define-public linux-libre-5.4-version "5.4.275")
+(define-public linux-libre-5.4-version "5.4.276")
 (define-public linux-libre-5.4-gnu-revision "gnu1")
 (define deblob-scripts-5.4
   (linux-libre-deblob-scripts
@@ -610,7 +610,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "0x0xg0fcykpd117x3q0gim8jilhx922ashhckjvafxv2gk2zzjhj")))
 (define-public linux-libre-5.4-pristine-source
   (let ((version linux-libre-5.4-version)
-(hash (base32 "0k1hyknx854k8z27j4rq1gcp8l0xc0bspmrhc41a033gjilb1lns")))
+(hash (base32 "01vfx19n8rv9fgjjzvi78125md71zgn5jrinbarabzr18jyjwwg2")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-5.4)))



04/09: gnu: linux-libre 6.6: Update to 6.6.31.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 73dff611acc239d2f9ef0ad64b17e2d4f659f1d5
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:24 2024 +0200

gnu: linux-libre 6.6: Update to 6.6.31.

* gnu/packages/linux.scm (linux-libre-6.6-version): Update to 6.6.31.
(linux-libre-6.6-pristine-source, deblob-scripts-6.6): Update hashes.

Change-Id: Ib0e70c94c47a2e1b89ec3901c7b721f523d76f15
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c71dd85e77..5b40ec66f5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -540,17 +540,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the 
given DEBLOB-SCRIPTS."
 ;; Here are the support timelines:
 ;; 
 
-(define-public linux-libre-6.6-version "6.6.30")
+(define-public linux-libre-6.6-version "6.6.31")
 (define-public linux-libre-6.6-gnu-revision "gnu")
 (define deblob-scripts-6.6
   (linux-libre-deblob-scripts
linux-libre-6.6-version
linux-libre-6.6-gnu-revision
-   (base32 "1qm8f3fq4yx59f7b6yky5ryyf229ypxnry922sr8cy0s7mp62cmv")
-   (base32 "0s8ys7nz4p50c766f3z9h68vxnrsrgps1i5zskk3cjwik3q60an8")))
+   (base32 "1a28pdl645bj4d8gac71dmwmll6a2kgd3k7gkpfvi94yqkzd9r2z")
+   (base32 "115kma7n9c1z9iqp8xnm4mvfz8cgqmc6jn6a7jg5vq0d4c7nr92w")))
 (define-public linux-libre-6.6-pristine-source
   (let ((version linux-libre-6.6-version)
-(hash (base32 "1ilwmgpgvddwkd9nx5999cb6z18scjyq7jklid26k1hg7f35nsmn")))
+(hash (base32 "080wwrc231fbf43hvvygddmdxdspyw23jc5vnd6fr5ccdybgzv6n")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-6.6)))



06/09: gnu: linux-libre 5.15: Update to 5.15.159.

2024-05-18 Thread guix-commits
lfam pushed a commit to branch kernel-updates
in repository guix.

commit 41a3578e0b5770619eb00e12f05ec0b78bbc292c
Author: Wilko Meyer 
AuthorDate: Fri May 17 14:38:26 2024 +0200

gnu: linux-libre 5.15: Update to 5.15.159.

* gnu/packages/linux.scm (linux-libre-5.15-version): Update to 5.15.159.
(linux-libre-5.15-pristine-source): Update hash.

Change-Id: I66130cd1513ef3c5869fab9873c24d36f6a716cd
Signed-off-by: Leo Famulari 
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1643da039c..6a90908112 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -570,7 +570,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
 (%upstream-linux-source version hash)
 deblob-scripts-6.1)))
 
-(define-public linux-libre-5.15-version "5.15.158")
+(define-public linux-libre-5.15-version "5.15.159")
 (define-public linux-libre-5.15-gnu-revision "gnu")
 (define deblob-scripts-5.15
   (linux-libre-deblob-scripts
@@ -580,7 +580,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given 
DEBLOB-SCRIPTS."
(base32 "121shkzgixmywa19xx5f2yxg1primarpg4bxin3jyw0214xbfh2n")))
 (define-public linux-libre-5.15-pristine-source
   (let ((version linux-libre-5.15-version)
-(hash (base32 "1inmdpif3qf1blmvjj4i7y42bylvhv0wyj3b0apq12zxlj1iq1zr")))
+(hash (base32 "1ia1nfci2wkx4nhnldfczpcq47mp7y7g657ikkh8i72y498gwy1l")))
(make-linux-libre-source version
 (%upstream-linux-source version hash)
 deblob-scripts-5.15)))



branch kernel-updates created (now e4f23573fc)

2024-05-18 Thread guix-commits
lfam pushed a change to branch kernel-updates
in repository guix.

  at e4f23573fc gnu: linux-libre 4.19: Update to 4.19.314.

This branch includes the following new commits:

 new 38622da35f gnu: Add linux-libre 6.9.
 new 6eadfb9efe gnu: linux-libre 6.9: Update to 6.9.1.
 new e44ea569b8 gnu: linux-libre-6.8: Update to 6.8.10.
 new 73dff611ac gnu: linux-libre 6.6: Update to 6.6.31.
 new 04d49bfeba gnu: linux-libre 6.1: Update to 6.1.91.
 new 41a3578e0b gnu: linux-libre 5.15: Update to 5.15.159.
 new 9a8e59c50b gnu: linux-libre 5.10: Update to 5.10.217.
 new 6e29b2e6c2 gnu: linux-libre 5.4: Update to 5.4.276.
 new e4f23573fc gnu: linux-libre 4.19: Update to 4.19.314.

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




branch kernel-updates deleted (was 9f54876f75)

2024-05-18 Thread guix-commits
lfam pushed a change to branch kernel-updates
in repository guix.

 was 9f54876f75 gnu: Add linux-libre 6.9.

This change permanently discards the following revisions:

 discard 9f54876f75 gnu: Add linux-libre 6.9.



branch core-updates updated (8814d74211 -> b4cdd046aa)

2024-05-18 Thread guix-commits
glv pushed a change to branch core-updates
in repository guix.

from 8814d74211 gnu: librewolf: Change nss/fixed to nss.
 new 57d0d5b6e5 gnu: stumpwm: Fix build.
 new 9ec9848e81 gnu: cl-cluffer: Fix build.
 new b4cdd046aa gnu: cl-moptilities: Fix build.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/lisp-xyz.scm | 4 ++--
 gnu/packages/wm.scm   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)



01/03: gnu: stumpwm: Fix build.

2024-05-18 Thread guix-commits
glv pushed a commit to branch core-updates
in repository guix.

commit 57d0d5b6e59b6e0ff3d11e3a2dc70605afd3b588
Author: Guillaume Le Vaillant 
AuthorDate: Fri May 3 13:41:01 2024 +0200

gnu: stumpwm: Fix build.

* gnu/packages/wm.scm (stumpwm)[arguments]: Don't refer to nonexistent
  'install' phase.

Change-Id: I6db6948750175de88f8e47eac10ceb76bff19640
---
 gnu/packages/wm.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 3bfa65e4ed..93aa7c8d77 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -2451,7 +2451,7 @@ wlr-output-management-unstable-v1 protocol.")
 Icon=~@
 Type=Application~%"
out))
-  (add-after 'install 'install-manual
+  (add-after 'create-desktop-file 'install-manual
 (lambda* (#:key (make-flags '()) outputs #:allow-other-keys)
   (let* ((out  (assoc-ref outputs "out"))
  (info (string-append out "/share/info")))



02/03: gnu: cl-cluffer: Fix build.

2024-05-18 Thread guix-commits
glv pushed a commit to branch core-updates
in repository guix.

commit 9ec9848e81e5b9617fa8eddc75430b2ffd5a50c1
Author: Guillaume Le Vaillant 
AuthorDate: Fri May 3 17:33:25 2024 +0200

gnu: cl-cluffer: Fix build.

* gnu/packages/lisp-xyz.scm (sbcl-cluffer)[arguments]: Don't refer to
  nonexistent 'install' phase.

Change-Id: Ic44a097dbe6d933fe86ce88fc0ca1a1ba7dc820d
---
 gnu/packages/lisp-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 3c9de7fc77..8a2aa85883 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -15138,7 +15138,7 @@ sequences of objects.")
   (arguments
`(#:phases
  (modify-phases %standard-phases
-   (add-after 'install 'unpatch-shebangs
+   (add-after 'strip 'unpatch-shebangs
  (lambda* (#:key outputs #:allow-other-keys)
;; The documentation Makefile rely on shell scripts.
;; TODO: Build it!



03/03: gnu: cl-moptilities: Fix build.

2024-05-18 Thread guix-commits
glv pushed a commit to branch core-updates
in repository guix.

commit b4cdd046aaafdceeceb0c975174248c01a47a287
Author: Guillaume Le Vaillant 
AuthorDate: Fri May 3 19:23:40 2024 +0200

gnu: cl-moptilities: Fix build.

* gnu/packages/lisp-xyz.scm (sbcl-moptilities)[arguments]: Don't refer to
  nonexistent 'install' phase.

Change-Id: I7c50877547cc5b5e357d7963aebc0915dd4ebf7a
---
 gnu/packages/lisp-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 8a2aa85883..06ebe816e7 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -14574,7 +14574,7 @@ compliance control.")
  ((":relative-to lift-test")
   ":relative-to moptilities-test"))
#t))
-   (add-after 'install 'remove-test-results
+   (add-after 'check 'remove-test-results
  ;; Otherwise the drag the SBCL package into the closure of the CL
  ;; package.
  (lambda* (#:key outputs #:allow-other-keys)