diff mbox series

[bug#69115,2/2] gnu: font-intel-one-mono: Split outputs for "out", "ttf" and "woff".

Message ID e36c96dd5083200b132c3541a16983a895ebef2c.1707879030.git.iyzsong@member.fsf.org
State New
Headers show
Series [bug#69115,1/2] gnu: font-intel-one-mono: Update to 1.3.0. | expand

Commit Message

vasilii.smirnov--- via Guix-patches" via Feb. 14, 2024, 2:53 a.m. UTC
From: 宋文武 <iyzsong@member.fsf.org>

* gnu/packages/fonts.scm (font-intel-one-mono)[outputs]: New field.
[arguments]: Add 'split-outputs phase.

Change-Id: I0323fb55b9609c93c916b32fef4821533d580b48
---
 gnu/packages/fonts.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

宋文武 March 10, 2024, 4:21 a.m. UTC | #1
Pushed as be1d8cdc, close.
diff mbox series

Patch

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2c532a6b5d..dc82040e84 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -226,7 +226,25 @@  (define-public font-intel-one-mono
               (sha256
                (base32
                 "0w9isn8az1k3a3q4m2llwnryy79i5v30dx1hfaf90x0zkj98ky5h"))))
+    (outputs '("out" "ttf" "woff"))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'split-outputs
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let ((out-fonts (string-append (assoc-ref outputs "out")
+                                                   "/share/fonts"))
+                         (ttf-fonts (string-append (assoc-ref outputs "ttf")
+                                                   "/share/fonts"))
+                         (woff-fonts (string-append (assoc-ref outputs "woff")
+                                                    "/share/fonts")))
+                     (mkdir-p ttf-fonts)
+                     (mkdir-p woff-fonts)
+                     (rename-file (string-append out-fonts "/truetype")
+                                  (string-append ttf-fonts "/truetype"))
+                     (rename-file (string-append out-fonts "/web")
+                                  (string-append woff-fonts "/web"))))))))
     (home-page "https://github.com/intel/intel-one-mono")
     (synopsis "Expressive monospaced font family")
     (description