diff mbox series

[bug#69429,3/3] gnu: font-chiron-sung-hk: Split outputs.

Message ID 300bc46ba7044331916e7b89ec49267fcbda718d.1709046857.git.hako@ultrarare.space
State New
Headers show
Series Update Chiron fonts and split outputs. | expand

Commit Message

Hilton Chain Feb. 27, 2024, 3:58 p.m. UTC
* gnu/packages/fonts.scm (font-chiron-sung-hk)[arguments]: Split outputs.
[outputs]: Add "otf" and "ttf".

Change-Id: Id96bba47e8f9ae9404a528bcceab3e110a05db4e
---
 gnu/packages/fonts.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 73041ce79c..7b2cd7a396 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -3332,6 +3332,28 @@  (define-public font-chiron-sung-hk
                (base32
                 "1916bb834y4r4312g14zid7w3pbx1i70jcgkkfbf4z20grrj891m"))))
     (build-system font-build-system)
+    (arguments
+     (list #:modules
+           '((guix build font-build-system)
+             (guix build utils)
+             (srfi srfi-26))
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((var-dir (string-append
+                                   #$output "/share/fonts/opentype"))
+                         (otf-dir (string-append
+                                   #$output:otf "/share/fonts/opentype"))
+                         (ttf-dir (string-append
+                                   #$output:ttf "/share/fonts/truetype")))
+                     (for-each (cut install-file <> var-dir)
+                               (find-files "VAR" "\\.otf$"))
+                     (mkdir-p (dirname otf-dir))
+                     (copy-recursively "OTF" otf-dir)
+                     (mkdir-p (dirname ttf-dir))
+                     (copy-recursively "TTF" ttf-dir)))))))
+    (outputs '("out" "otf" "ttf"))
     (home-page "https://chiron-fonts.github.io/")
     (synopsis "Traditional Chinese Song typeface")
     (description