guix-commits
[Top][All Lists]
Advanced

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

48/53: gnu: texlive-dtl: Build executables.


From: guix-commits
Subject: 48/53: gnu: texlive-dtl: Build executables.
Date: Mon, 13 May 2024 04:50:21 -0400 (EDT)

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

commit f3b36ca785dfc338260824750a1a6b339f6dfa0c
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun May 12 19:17:09 2024 +0200

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

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 95a47a934f..601d1d0626 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34303,18 +34303,45 @@ information on creating packages and documentation.")
 
 (define-public texlive-dtl
   (package
+    (inherit texlive-bin)
     (name "texlive-dtl")
-    (version (number->string %texlive-revision))
-    (source (texlive-origin
-             name version
-             (list "doc/man/man1/dt2dv.1"
-                   "doc/man/man1/dt2dv.man1.pdf"
-                   "doc/man/man1/dv2dt.1"
-                   "doc/man/man1/dv2dt.man1.pdf")
-             (base32
-              "0kvnsr8nxrys99rp74wlxnisfripx6jpjjkqy38d3d4gw13cvb5g")))
-    (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" '("dtl"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-all-pkgs"
+                 "--enable-dtl"
+                 (delete "--disable-dtl" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/dtl"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/dtl"
+                  (invoke "make" "install"))))))))
+    (inputs '())
     (home-page "https://ctan.org/pkg/dtl";)
     (synopsis "Tools to dis-assemble and re-assemble DVI files")
     (description



reply via email to

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