summary refs log tree commit diff
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2024-02-14 10:53:24 +0800
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2024-02-22 16:12:23 +0100
commitbe1d8cdc76ff51878d2aca34a3fbbc990fcbc7be (patch)
tree07e748e5abf85484d373fc22d320dcf3b93ae2c9
parent63f6f75eae596b2fe7ab010117e96eb3f8dd0552 (diff)
downloadguix-be1d8cdc76ff51878d2aca34a3fbbc990fcbc7be.tar.gz
gnu: font-intel-one-mono: Split outputs for "out", "ttf" and "woff".
* gnu/packages/fonts.scm (font-intel-one-mono)[outputs]: New field.
[arguments]: Add 'split-outputs phase.

Change-Id: I0323fb55b9609c93c916b32fef4821533d580b48
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-rw-r--r--gnu/packages/fonts.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index fb1349c9ba..01d280f55f 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -226,7 +226,25 @@ in print.  With attention to detail for high resolution rendering.")
               (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