blob: 3fec294ae07085620834417aa1bdc58d47c43f19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
;;; guix-forge --- Guix software forge meta-service
;;; Copyright © 2022, 2023, 2026 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of guix-forge.
;;;
;;; guix-forge is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published
;;; by the Free Software Foundation, either version 3 of the License,
;;; or (at your option) any later version.
;;;
;;; guix-forge is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with guix-forge. If not, see
;;; <https://www.gnu.org/licenses/>.
(use-modules ((gnu packages fonts) #:prefix guix:)
(guix packages))
;; Install web fonts in font-charter and font-fira-code. There is a
;; pending patchset https://issues.guix.gnu.org/54471 to do this in
;; upstream Guix. Use the upstream Guix packages once that patchset
;; lands in the upstream master branch.
(define font-charter
(package
(inherit guix:font-charter)
(outputs '("out"))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'install-web-fonts
(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 "/web")))
(find-files source "\\.(woff|woff2)$"))))))))))
(define font-fira-code
(package
(inherit guix:font-fira-code)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'install-web-fonts
(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 "/web")))
(find-files source "\\.(woff|woff2)$"))))))))))
(packages->manifest
(list font-charter font-fira-code))
|