aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2023-05-18 10:54:09 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-07-18 18:12:27 +0200
commit6a09a6c5eb570eca34818d95b069c082dce5ee4f (patch)
treed0899d7164cde4fef8c3520d71c024d37bc0ca36 /gnu
parent8c0d071dfce6476f7db769be2c747813cca29d62 (diff)
downloadguix-6a09a6c5eb570eca34818d95b069c082dce5ee4f.tar.gz
guix-6a09a6c5eb570eca34818d95b069c082dce5ee4f.zip
gnu: texlive-hyphen-package: Remove SIMPLE-TEXLIVE-PACKAGE call.
* gnu/packages/tex.scm (texlive-hyphen-package): Remove SIMPLE-TEXLIVE-PACKAGE call.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/tex.scm133
1 files changed, 69 insertions, 64 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 412d46dd3f..50cde22825 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-2.7 ruby-hydra-minimal/pinned 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-2.7 ruby-hydra-minimal/pinned))
+ (home-page "https://ctan.org/pkg/hyph-utf8")
+ (synopsis #f)
+ (description #f)
+ (license #f)))
(define texlive-extra-src
(origin