nongnu: font-awesome-6: Introduce font package

Guix channel is frozen at font awesome 4, because
font awesome 5+ depends on proprietary build system.
The newer versions have more icons, so it makes sense
to package them as well.

* nongnu/packages/fonts.scm (font-awesome-6): New variable.
This commit is contained in:
Rutherther 2024-10-29 19:55:06 +01:00
parent ad966c3844
commit fb74bc9c5a

View File

@ -6,8 +6,10 @@
(define-module (nongnu packages fonts)
#:use-module (ice-9 string-fun)
#:use-module (gnu packages compression)
#:use-module (gnu packages fonts)
#:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix build-system font)
@ -325,3 +327,31 @@ automatically align with text labels."))
(description "An Apple system font intended to provide coverage for
characters defined as symbols in the Unicode Standard.")
(license (nonfree "https://www.apple.com"))))
(define-public font-awesome-6
(package/inherit font-awesome
(name "font-awesome-6")
(version "6.6.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/FortAwesome/Font-Awesome")
(commit version)))
(sha256
(base32 "0wqjmp6gkgh4qanas2a4qzqlji0ahz6q5g936bcj6qkrk334f3xm"))))
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(source (getcwd))
(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))))))))