aboutsummaryrefslogtreecommitdiff
path: root/manifest.scm
blob: d931833bf84d4a171eb3361a4e90a7248062f7cd (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
;;; guix-forge --- Guix software forge meta-service
;;; Copyright © 2022 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 autotools)
             ((gnu packages fonts) #:prefix guix:)
             (gnu packages gettext)
             (gnu packages guile)
             ((gnu packages skribilo) #:prefix guix:)
             (guix git-download)
             (guix packages)
             (guix utils))

;; 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)$"))))))))))

;; Use a later unreleased version of skribilo since we need certain
;; improvements and bug fixes from it.
(define skribilo
  (let ((commit "76136f9e904e8eb17f494d20fa2969ef2d5eb1aa")
        (revision "1"))
    (package
      (inherit guix:skribilo)
      (name "skribilo")
      (version (git-version "0.9.5" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.gnu.org/git/skribilo.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "105jlpqs63fa724yldgs36bgnw3h4lq5addhmb9y3nla5a4vn2m2"))))
      (native-inputs
       `(("autoconf" ,autoconf)
         ("automake" ,automake)
         ("gettext" ,gnu-gettext)
         ,@(package-native-inputs guix:skribilo))))))

(packages->manifest
 (list font-charter font-fira-code guile-3.0 skribilo))