summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2023-08-22 16:31:50 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-08-24 11:11:00 +0200
commit20b2219c8113c5a6f50e8eec5e04819662602e82 (patch)
tree1e95131befc6fd0220c8bbdd61ecb7d937435d5b /gnu
parent24f45cec44cd24887a1def948b12937a04867e8e (diff)
downloadguix-20b2219c8113c5a6f50e8eec5e04819662602e82.tar.gz
gnu: Add texlive-revtex4-1.
* gnu/packages/tex.scm (texlive-revtex4-1): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/tex.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 8eadc73631..097fa850cf 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -26260,6 +26260,52 @@ known to be incompatible with @code{revtex4-1}.")
 users having difficulty with the incompatibility of that latest version.")
     (license license:lppl)))
 
+(define-public texlive-revtex4-1
+  (package
+    (name "texlive-revtex4-1")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/revtex4-1/"
+                   "doc/latex/revtex4-1/"
+                   "source/latex/revtex4-1/"
+                   "tex/latex/revtex4-1/")
+             (base32
+              "023pzbf8hgyk6038zz9g4g95pwqrsqy1ahzy6byxh28b2p8qyk9a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:modules '((ice-9 match)
+                  (ice-9 regex)
+                  (srfi srfi-1)
+                  (guix build texlive-build-system)
+                  (guix build utils))
+      #:build-targets #~(list "revtex4-1.dtx")
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; In order to build revtex4-1, we need files from revtex source.
+          ;; Add them to TEXINPUTS.
+          (add-before 'build 'extend-texinputs
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (let ((revtex-source
+                     (any (match-lambda
+                            ((_ . dir)
+                             (and (string-match "texlive-revtex-[0-9]+-checkout"
+                                                dir)
+                                  dir)))
+                          (or native-inputs inputs))))
+                (setenv "TEXINPUTS"
+                        (string-append revtex-source
+                                       "/source/latex/revtex/:"))))))))
+    (native-inputs (list (package-source texlive-revtex)))
+    (home-page "https://ctan.org/pkg/revtex4-1")
+    (synopsis "Styles for various physics journals")
+    (description
+     "This is an old version of @code{revtex}, and is kept as a courtesy to
+users having difficulty with the incompatibility of that latest version.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-ribbonproofs
   (package
     (name "texlive-ribbonproofs")