[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
81/137: guix: import texlive: Rename some functions.
From: |
guix-commits |
Subject: |
81/137: guix: import texlive: Rename some functions. |
Date: |
Mon, 24 Jun 2024 18:27:12 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit c1ec4c216165f03102c7df6f80901b00871ca5e9
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sat Jun 15 23:15:19 2024 +0200
guix: import texlive: Rename some functions.
* guix/import/texlive.scm (filter-depends): Rename from `translate-depends'.
Clarify docstring.
(list-formats): Renamed from `formats'.
(tlpdb->package): Apply renaming.
Change-Id: If573cb8bde8be3ac65186298cf439f71f733f8eb
---
guix/import/texlive.scm | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 20dedc9114..22e038f47f 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -152,12 +153,10 @@
(chr (char-downcase chr)))
name)))
-(define* (translate-depends depends #:optional texlive-only)
- "Translate TeX Live packages DEPENDS into their equivalent Guix names
-in `(gnu packages tex)' module, without \"texlive-\" prefix. The function
-also removes packages not necessary in Guix.
-
-When TEXLIVE-ONLY is true, only TeX Live packages are returned."
+(define* (filter-depends depends #:optional texlive-only)
+ "Filter upstream package names DEPENDS to include only their equivalent Guix
+package names, without \"texlive-\" prefix. When TEXLIVE-ONLY is true, ignore
+Guix-specific packages."
(delete-duplicates
(filter-map (match-lambda
;; Hyphenation. Every TeX Live package is replaced with
@@ -288,10 +287,10 @@ When TEXLIVE-ONLY is true, only TeX Live packages are
returned."
(list "latex-bin" "metafont" "modes" "tex"))
(deps '()))
(if (null? packages)
- ;; `translate-depends' will always translate "hyphen-base" into
+ ;; `filter-depends' will always translate "hyphen-base" into
;; "hyphen-complete". Make sure plain hyphen-base appears in the
;; dependency tree.
- (cons "hyphen-base" (translate-depends deps))
+ (cons "hyphen-base" (filter-depends deps))
(loop (append-map (lambda (name)
(let ((data (assoc-ref package-database name)))
(or (assoc-ref data 'depend)
@@ -299,7 +298,7 @@ When TEXLIVE-ONLY is true, only TeX Live packages are
returned."
packages)
(append packages deps)))))))
-(define (formats package-data)
+(define (list-formats package-data)
"Return a list of formats to build according to PACKAGE-DATA."
(and=> (assoc-ref package-data 'execute)
(lambda (actions)
@@ -443,9 +442,9 @@ of those files are returned that are unexpectedly
installed."
(list (string-append name "-bin"))
'())
;; Regular dependencies, as specified in database.
- (map guix-name (translate-depends depends)))
+ (map guix-name (filter-depends depends)))
string<?)))
- (tex-formats (formats data))
+ (tex-formats (list-formats data))
(meta-package? (null? locs))
(empty-package? (and meta-package? (not (pair? tex-formats)))))
(values
@@ -540,7 +539,7 @@ of those files are returned that are unexpectedly
installed."
((assoc-ref data 'catalogue-license) => string->license)
(else #f))))
;; List of pure TeX Live dependencies for recursive calls.
- (translate-depends depends #t)))))
+ (filter-depends depends #t)))))
(define texlive->guix-package
(memoize
- 105/137: gnu: texlive-texaccents: Add missing script., (continued)
- 105/137: gnu: texlive-texaccents: Add missing script., guix-commits, 2024/06/24
- 107/137: gnu: texlive-cluttex: Add "cllualatex" and "clxelatex" symlinks., guix-commits, 2024/06/24
- 59/137: gnu: Add texlive-ps2eps-bin., guix-commits, 2024/06/24
- 61/137: gnu: texlive-texdoctk: Fix runtime error., guix-commits, 2024/06/24
- 64/137: gnu: Add texlive-xml2pmx-bin., guix-commits, 2024/06/24
- 67/137: gnu: texlive-dviout-util: Build binaries separately., guix-commits, 2024/06/24
- 79/137: gnu: python-sphinx: Fix build., guix-commits, 2024/06/24
- 72/137: gnu: texlive-xindy: Build binary separately., guix-commits, 2024/06/24
- 76/137: gnu: texlive-xits: Fix typo in description., guix-commits, 2024/06/24
- 86/137: guix: import texlive: Handle versions., guix-commits, 2024/06/24
- 81/137: guix: import texlive: Rename some functions.,
guix-commits <=
- 84/137: guix: import texlive: Move a comment., guix-commits, 2024/06/24
- 65/137: gnu: Add texlive-luajittex-bin., guix-commits, 2024/06/24
- 71/137: gnu: texlive-axodraw2: Build binary separately., guix-commits, 2024/06/24
- 78/137: gnu: texlive-scripts: Add missing "mktexfmt" symlink., guix-commits, 2024/06/24
- 98/137: gnu: Do not create origins for "ctxdocstrip.tex"., guix-commits, 2024/06/24
- 99/137: gnu: texlive-metafont: Fix inputs., guix-commits, 2024/06/24
- 100/137: gnu: texlive-luatex: Remove unnecessary native input., guix-commits, 2024/06/24
- 102/137: gnu: texlive-makecmds: Remove unnecessary input., guix-commits, 2024/06/24
- 103/137: gnu: texlive-dotseqn: Remove native input., guix-commits, 2024/06/24
- 87/137: guix: import texlive: Implement auto-updates., guix-commits, 2024/06/24