guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

359/452: gnu: texlive-hyphen-package: Remove SIMPLE-TEXLIVE-PACKAGE call


From: guix-commits
Subject: 359/452: gnu: texlive-hyphen-package: Remove SIMPLE-TEXLIVE-PACKAGE call.
Date: Fri, 9 Jun 2023 13:44:01 -0400 (EDT)

ngz pushed a commit to branch tex-team-next
in repository guix.

commit b2a29a6ee7c573714c74aebf346792d3bc1a2f2a
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Thu May 18 10:54:09 2023 +0200

    gnu: texlive-hyphen-package: Remove SIMPLE-TEXLIVE-PACKAGE call.
    
    * gnu/packages/tex.scm (texlive-hyphen-package): Remove 
SIMPLE-TEXLIVE-PACKAGE call.
---
 gnu/packages/tex.scm | 133 ++++++++++++++++++++++++++-------------------------
 1 file changed, 69 insertions(+), 64 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 492a27fb54..5b57d037ff 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -184,70 +184,75 @@ copied to their outputs; otherwise the 
TEXLIVE-BUILD-SYSTEM is used."
 
 (define (texlive-hyphen-package name code locations hash)
   "Return a TeX Live hyphenation package with the given NAME, using source
-files from LOCATIONS with expected checksum HASH.  CODE is not currently in 
use."
-  (let ((parent (simple-texlive-package
-                 name locations hash #:trivial? #t)))
-    (package
-      (inherit parent)
-      (arguments
-       (substitute-keyword-arguments (package-arguments parent)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (root (string-append out "/share/texmf-dist"))
-                        (patterns
-                         (string-append root 
"/tex/generic/hyph-utf8/patterns/txt/"))
-                        (loaders
-                         (string-append root 
"/tex/generic/hyph-utf8/loadhyph"))
-                        (ptex
-                         (string-append root 
"/tex/generic/hyph-utf8/patterns/ptex"))
-                        (quote
-                         (string-append root 
"/tex/generic/hyph-utf8/patterns/quote")))
-                   (mkdir "scripts")
-                   (copy-recursively
-                    (dirname (search-input-file inputs "hyph-utf8.rb"))
-                    "scripts")
-
-                   ;; Prepare target directories
-                   (mkdir-p patterns)
-                   (mkdir-p loaders)
-                   (mkdir-p ptex)
-                   (mkdir-p quote)
-
-                   ;; Generate plain patterns
-                   (with-directory-excursion "scripts"
-                     (substitute* "lib/tex/hyphen/path.rb"
-                       (("^([[:blank:]]+)TeXROOT = .*" _ indent)
-                        (string-append indent "TeXROOT = \""
-                                       (getcwd) "/..\"\n")))
-
-                     (substitute* "generate-plain-patterns.rb"
-                       ;; Ruby 2 does not need this.
-                       (("require 'unicode'") "")
-                       ;; Write directly to the output directory
-                       (("File\\.join\\(PATH::TXT")
-                        (string-append "File.join(\"" patterns "\""))
-                       (("File\\.join\\(PATH::QUOTE")
-                        (string-append "File.join(\"" quote "\"")))
-                     (invoke "ruby" "generate-plain-patterns.rb")
-
-                     ;; Build pattern loaders
-                     (substitute* "generate-pattern-loaders.rb"
-                       (("File\\.join\\(PATH::LOADER")
-                        (string-append "File.join(\"" loaders "\"")))
-
-                     (invoke "ruby" "generate-pattern-loaders.rb")
-
-                     ;; Build ptex patterns
-                     (substitute* "generate-ptex-patterns.rb"
-                       (("File\\.join\\(PATH::PTEX")
-                        (string-append "File.join(\"" ptex "\"")))
-                     (invoke "ruby" "generate-ptex-patterns.rb")))))))))
-      (native-inputs
-       (list ruby ruby-hydra-minimal hyph-utf8-scripts))
-      (home-page "https://ctan.org/pkg/hyph-utf8";))))
+files from LOCATIONS with expected checksum HASH.  CODE is not currently in
+use."
+  (package
+    (name name)
+    (version (number->string %texlive-revision))
+    (source (texlive-origin name version location hash))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-base #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let* ((root (string-append #$output "/share/texmf-dist"))
+                     (patterns
+                      (string-append root 
"/tex/generic/hyph-utf8/patterns/txt/"))
+                     (loaders
+                      (string-append root "/tex/generic/hyph-utf8/loadhyph"))
+                     (ptex
+                      (string-append root 
"/tex/generic/hyph-utf8/patterns/ptex"))
+                     (quote
+                      (string-append root 
"/tex/generic/hyph-utf8/patterns/quote")))
+                (mkdir "scripts")
+                (copy-recursively
+                 (dirname (search-input-file inputs "hyph-utf8.rb"))
+                 "scripts")
+
+                ;; Prepare target directories
+                (mkdir-p patterns)
+                (mkdir-p loaders)
+                (mkdir-p ptex)
+                (mkdir-p quote)
+
+                ;; Generate plain patterns
+                (with-directory-excursion "scripts"
+                  (substitute* "lib/tex/hyphen/path.rb"
+                    (("^([[:blank:]]+)TeXROOT = .*" _ indent)
+                     (string-append indent "TeXROOT = \""
+                                    (getcwd) "/..\"\n")))
+
+                  (substitute* "generate-plain-patterns.rb"
+                    ;; Ruby 2 does not need this.
+                    (("require 'unicode'") "")
+                    ;; Write directly to the output directory
+                    (("File\\.join\\(PATH::TXT")
+                     (string-append "File.join(\"" patterns "\""))
+                    (("File\\.join\\(PATH::QUOTE")
+                     (string-append "File.join(\"" quote "\"")))
+                  (invoke "ruby" "generate-plain-patterns.rb")
+
+                  ;; Build pattern loaders
+                  (substitute* "generate-pattern-loaders.rb"
+                    (("File\\.join\\(PATH::LOADER")
+                     (string-append "File.join(\"" loaders "\"")))
+
+                  (invoke "ruby" "generate-pattern-loaders.rb")
+
+                  ;; Build ptex patterns
+                  (substitute* "generate-ptex-patterns.rb"
+                    (("File\\.join\\(PATH::PTEX")
+                     (string-append "File.join(\"" ptex "\"")))
+                  (invoke "ruby" "generate-ptex-patterns.rb"))))))))
+    (native-inputs
+     (list hyph-utf8-scripts ruby ruby-hydra-minimal))
+    (home-page "https://ctan.org/pkg/hyph-utf8";)
+    (synopsis #f)
+    (description #f)
+    (license #f)))
 
 (define texlive-extra-src
   (origin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]