guix-commits
[Top][All Lists]
Advanced

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

41/54: gnu: texlive-gregoriotex: Build executables.


From: guix-commits
Subject: 41/54: gnu: texlive-gregoriotex: Build executables.
Date: Tue, 14 May 2024 15:34:35 -0400 (EDT)

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

commit 1fc20118992c00ff05127bf9541357863e21640b
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun May 12 17:48:05 2024 +0200

    gnu: texlive-gregoriotex: Build executables.
    
    * gnu/packages/tex.scm (texlive-gregoriotex-bin): New variable.
    (texlive-gregoriotex)[arguments]<#:phases>: Include executables.
    [native-inputs]: Add TEXLIVE-GREGORIOTEX-BIN.
    
    Change-Id: Idc863a24aa9e096a8988516f696744ca4511bf6b
---
 gnu/packages/tex.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f96be0c63a..2acf2e605e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15683,6 +15683,46 @@ known as @emph{Der Grune Punkt} (``The Green Point''). 
 In Austria, it can be
 found on nearly every bottle.  It should not be confused with the Recycle
 logo.")
     (license license:gpl3+)))
+(define texlive-gregoriotex-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-gregoriotex-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" '())
+            (delete-other-directories "texk" '("gregorio"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-all-pkgs"
+                 "--enable-gregorio"
+                 (delete "--disable-gregorio" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/gregorio"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/gregorio"
+                  (invoke "make" "install"))))))))
+    (inputs '())))
 
 (define-public texlive-gregoriotex
   (package
@@ -15701,6 +15741,17 @@ logo.")
               "0lnpq6rfdb6dg543cmbsm817ziim6arxnzxzbn0wn8i8aw681idr")))
     (outputs '("out" "doc"))
     (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-bin
+            (lambda _
+              (let ((source
+                     #$(this-package-native-input "texlive-gregoriotex-bin")))
+                (copy-recursively (string-append source "/bin")
+                                  (string-append #$output "/bin"))))))))
+    (native-inputs (list texlive-gregoriotex-bin))
     (home-page "https://ctan.org/pkg/gregoriotex";)
     (synopsis "Engraving gregorian chant scores")
     (description



reply via email to

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