guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: font-awesome: Download using git-fetch.


From: guix-commits
Subject: 01/02: gnu: font-awesome: Download using git-fetch.
Date: Tue, 22 Oct 2019 08:49:46 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 6fc9c6f7d96f44fa72ef64ebbd40a6f27a63a1e1
Author: Efraim Flashner <address@hidden>
Date:   Tue Oct 22 11:55:54 2019 +0300

    gnu: font-awesome: Download using git-fetch.
    
    The official link on the website has a regularly changing hash.
    
    * gnu/packages/fonts.scm (font-awesome)[source]: Use 'git-fetch'.
    [arguments]: Replace 'install phase.
    [home-page]: Use new upstream home-page.
---
 gnu/packages/fonts.scm | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 03bfa43..bb6dc45 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1000,14 +1000,31 @@ correct spacing.")
    ;; <https://bugs.gnu.org/32916>
    (version "4.7.0")
    (source (origin
-            (method url-fetch)
-            (uri (string-append "http://fontawesome.io/assets/";
-                                name "-" version ".zip"))
+            (method git-fetch)
+            (uri (git-reference
+                   (url "https://github.com/FortAwesome/Font-Awesome.git";)
+                   (commit (string-append "v" version))))
+            (file-name (git-file-name name version))
             (sha256
              (base32
-              "1m1rfwm4sjkv10j3xd2dhwk286a5912b2zgvc692cmxi5gxs68jf"))))
+              "0w30y26jp8nvxa3iiw7ayl6rkza1rz62msl9xw3srvxya1c77grc"))))
    (build-system font-build-system)
-   (home-page "http://fontawesome.io";)
+   (arguments
+    '(#:phases
+      (modify-phases %standard-phases
+        (replace 'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (source (string-append (getcwd) "/fonts"))
+                   (fonts (string-append out "/share/fonts")))
+              (for-each (lambda (file)
+                          (install-file file (string-append fonts 
"/truetype")))
+                        (find-files source "\\.(ttf|ttc)$"))
+              (for-each (lambda (file)
+                          (install-file file (string-append fonts 
"/opentype")))
+                        (find-files source "\\.(otf|otc)$"))
+              #t))))))
+   (home-page "https://fontawesome.com/";)
    (synopsis "Font that contains a rich iconset")
    (description
     "Font Awesome is a full suite of pictographic icons for easy scalable



reply via email to

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