summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2024-05-28 18:26:02 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:45:28 +0200
commit66ed294e5a53b5b80dbeccf1ddc168a1596a66c6 (patch)
tree9c26d6b92ac65991e799802de728e9bf6342d983
parentc1ab21bff92be222dfc6cd64734d85af7f36b686 (diff)
downloadguix-66ed294e5a53b5b80dbeccf1ddc168a1596a66c6.tar.gz
gnu: Add texlive-xml2pmx-bin.
* gnu/packages/tex.scm (texlive-xml2pmx-bin): New variable.
(texlive-xml2pmx)[propagated-inputs]: Add TEXLIVE-XML2PMX-BIN.

Change-Id: I112c29945b0643374cced1eb24d598d2cd2259ea
-rw-r--r--gnu/packages/tex.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 94f4779b32..37aa7161f1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -48743,6 +48743,7 @@ correctly; and define two extra commands: @code{\\vfrac} and
               "1d3ralqh0b71scd59b4hmm707yfrz1rj28ni2lzkhbb1ql73bvah")))
     (outputs '("out" "doc"))
     (build-system texlive-build-system)
+    (propagated-inputs (list texlive-xml2pmx-bin))
     (home-page "https://ctan.org/pkg/xml2pmx")
     (synopsis "Convert MusicXML to PMX and MusiXTeX")
     (description
@@ -48750,6 +48751,52 @@ correctly; and define two extra commands: @code{\\vfrac} and
 MusiXTeX processing.")
     (license license:gpl3+)))
 
+(define-public texlive-xml2pmx-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-xml2pmx-bin")
+    (source
+     (origin
+       (inherit texlive-source)
+       (modules '((guix build utils)
+                  (ice-9 ftw)))
+       (snippet
+        #~(let ((delete-other-directories
+                 (lambda (root dirs)
+                   (with-directory-excursion root
+                     (for-each
+                      delete-file-recursively
+                      (scandir "."
+                               (lambda (file)
+                                 (and (not (member file (append '("." "..") dirs)))
+                                      (eq? 'directory (stat:type (stat file)))))))))))
+            (delete-other-directories "libs" '())
+            (delete-other-directories "utils" '("xml2pmx"))
+            (delete-other-directories "texk" '())))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons "--enable-xml2pmx" (delete "--enable-web2c" #$flags)))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "utils/xml2pmx"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "utils/xml2pmx"
+                  (invoke "make" "install"))))))))
+    (native-inputs '())
+    (inputs '())
+    (propagated-inputs '())
+    (home-page (package-home-page texlive-xml2pmx))
+    (synopsis "Binary for @code{texlive-xml2pmx}")
+    (description
+     "This package provides the binary for @code{texlive-xml2pmx}.")
+    (license (package-license texlive-xml2pmx))))
+
 (define-public texlive-xmltexconfig
   (package
     (name "texlive-xmltexconfig")