summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2024-05-28 15:49:35 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:45:27 +0200
commit3a73a83a29cfa4854c2a6632c3b0c623eb54d7d3 (patch)
tree43454eeaf3bd4607764f761bf4f139172b7fa61d /gnu/packages
parent941cff8c506c124dc637016fb5e681067417c769 (diff)
downloadguix-3a73a83a29cfa4854c2a6632c3b0c623eb54d7d3.tar.gz
gnu: Add texlive-dvidvi-bin.
* gnu/packages/tex.scm (texlive-dvidvi-bin): New variable.
(texlive-dvidvi)[propagated-inputs]: Add TEXLIVE-DVIDVI-BIN.

Change-Id: I4327b4685048c6bb4833512a4ee80b87d72d6f8c
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/tex.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 78317648aa..9d16b2dffc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34823,6 +34823,7 @@ drivers (much like DVItype).")
               "1w153rqm7nlmcf6162glxz282nbb6b6hjf5h0p7mbzr0j1357sxj")))
     (outputs '("out" "doc"))
     (build-system texlive-build-system)
+    (propagated-inputs (list texlive-dvidvi-bin))
     (home-page "https://ctan.org/pkg/dvidvi")
     (synopsis "Convert one DVI file into another")
     (description
@@ -34834,6 +34835,53 @@ exclusions.")
     ;; <https://metadata.ftp-master.debian.org/changelogs//main/d/dvidvi/dvidvi_1.0-8.2_copyright>.
     (license license:gpl3)))
 
+(define-public texlive-dvidvi-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-dvidvi-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" '("dvidvi"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons "--enable-dvidvi" (delete "--enable-web2c" #$flags)))
+       ((#:phases phases)
+        #~(modify-phases #$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"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list texlive-libkpathsea))
+    (propagated-inputs '())
+    (home-page (package-home-page texlive-dvidvi))
+    (synopsis "Binary for @code{texlive-dvidvi}")
+    (description
+     "This package provides the binary for @code{texlive-dvidvi}.")
+    (license (package-license texlive-dvidvi))))
+
 (define-public texlive-dviinfox
   (package
     (name "texlive-dviinfox")