guix-commits
[Top][All Lists]
Advanced

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

47/54: gnu: texlive-dvidvi: Build executable.


From: guix-commits
Subject: 47/54: gnu: texlive-dvidvi: Build executable.
Date: Tue, 14 May 2024 15:34:38 -0400 (EDT)

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

commit f24faedf1ecc2b1b6c5b218329910f749e3c369f
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun May 12 19:14:52 2024 +0200

    gnu: texlive-dvidvi: Build executable.
    
    * gnu/packages/tex.scm (texlive-dvidvi): Inherit from TEXLIVE-BIN.
    [source]: Build from a trimmed TEXLIVE-SOURCE.
    [arguments]: Build `dvidvi' as a single package.
    
    Change-Id: I97c0f19654b0ec281ce6b89bb065daf64a730cf9
---
 gnu/packages/tex.scm | 47 ++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 38 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 8b28f00484..95a47a934f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34458,16 +34458,45 @@ drivers (much like DVItype).")
 
 (define-public texlive-dvidvi
   (package
+    (inherit texlive-bin)
     (name "texlive-dvidvi")
-    (version (number->string %texlive-revision))
-    (source (texlive-origin
-             name version
-             (list "doc/man/man1/dvidvi.1"
-                   "doc/man/man1/dvidvi.man1.pdf")
-             (base32
-              "1w153rqm7nlmcf6162glxz282nbb6b6hjf5h0p7mbzr0j1357sxj")))
-    (outputs '("out" "doc"))
-    (build-system texlive-build-system)
+    (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* "--disable-all-pkgs"
+                 "--enable-dvidvi"
+                 (delete "--disable-dvidvi" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-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"))))))))
+    (inputs '())
     (home-page "https://ctan.org/pkg/dvidvi";)
     (synopsis "Convert one DVI file into another")
     (description



reply via email to

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