guix-commits
[Top][All Lists]
Advanced

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

05/07: gnu: font-openmoji: Update to 14.0.0-1.93f059d.


From: guix-commits
Subject: 05/07: gnu: font-openmoji: Update to 14.0.0-1.93f059d.
Date: Sat, 2 Sep 2023 01:11:58 -0400 (EDT)

lilyp pushed a commit to branch master
in repository guix.

commit a0e10c5252c70802cae57e7012bed488a0b30728
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Sat Aug 26 18:10:49 2023 +0200

    gnu: font-openmoji: Update to 14.0.0-1.93f059d.
    
    Up until and including 14.0.0, the OpenMoji font only works in Icecat.
    However, the git sources already include variants that work in other 
browsers
    and desktop applications, so let's use them.
    
    * gnu/packages/fonts.scm (font-openmoji): Update to 14.0.0-1.93f059d.
    [source]: Change to git-fetch.
    [arguments]: Add ‘chdir’, ‘strip-alternative-variants’ and ‘chdir-back’.
---
 gnu/packages/fonts.scm | 41 +++++++++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index e10227f020..3cdfb7500a 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2059,20 +2059,41 @@ emphasis while still being readable.")
     (license license:silofl1.1)))
 
 (define-public font-openmoji
-  (package
+  (let ((commit "93f059dfb68401d49beaef7a3e09b80072b51a1f")
+        (revision "1"))
+   (package
     (name "font-openmoji")
-    (version "13.1.0")
+    (version (git-version "14.0.0" revision commit))
     (source
      (origin
-       (method url-fetch/zipbomb)
-       (uri
-        (string-append "https://github.com/hfg-gmuend/openmoji/";
-                       "releases/download/" version
-                       "/openmoji-font.zip"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/hfg-gmuend/openmoji/";)
+             (commit commit)))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "0xmy3hr38v03f1riwxmxdibb7iwj0qz288inqaha3pwq7pj7ln45"))))
-    (build-system font-build-system)
+         "16w4lg2y6qzb45j08l7cdwprjhprsm11jsm6nxzxwy2wzykd7gxk"))))
+    (build-system font-build-system)
+    (arguments (list #:modules `((ice-9 ftw)
+                                 (guix build font-build-system)
+                                 (guix build utils))
+                     #:phases
+                     #~(modify-phases %standard-phases
+                         (add-after 'unpack 'chdir
+                           (lambda _ (chdir "font")))
+                         (add-after 'chdir 'strip-alternative-variants
+                           (lambda _
+                             (let ((keep '("OpenMoji-black-glyf"
+                                           "OpenMoji-color-glyf_colr_0"
+                                           "."
+                                           "..")))
+                               (for-each (lambda (f)
+                                           (unless (member f keep)
+                                             (delete-file-recursively f)))
+                                         (scandir ".")))))
+                         (add-before 'install-license-files 'chdir-back
+                           (lambda _ (chdir ".."))))))
     (native-inputs
      (list unzip))
     (home-page "https://openmoji.org";)
@@ -2080,7 +2101,7 @@ emphasis while still being readable.")
     (description
      "This package provides the OpenMoji font in both color and black
 variants.")
-    (license license:cc-by-sa4.0)))
+    (license license:cc-by-sa4.0))))
 
 (define-public font-dosis
   (package



reply via email to

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