linux-initrd: Add USB kernel modules to the default initrd.
[jackhill/guix/guix.git] / gnu / packages / fonts.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Joshua Grant <tadni@riseup.net>
5 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages fonts)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix build-system trivial)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages xorg)
32 #:use-module (gnu packages pkg-config))
33
34 (define-public font-dejavu
35 (package
36 (name "font-dejavu")
37 (version "2.34")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "mirror://sourceforge/dejavu/"
41 version "/dejavu-fonts-ttf-"
42 version ".tar.bz2"))
43 (sha256
44 (base32
45 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
46 (build-system trivial-build-system)
47 (arguments
48 `(#:modules ((guix build utils))
49 #:builder (begin
50 (use-modules (guix build utils))
51
52 (let ((tar (string-append (assoc-ref %build-inputs
53 "tar")
54 "/bin/tar"))
55 (PATH (string-append (assoc-ref %build-inputs
56 "bzip2")
57 "/bin"))
58 (font-dir (string-append
59 %output "/share/fonts/truetype"))
60 (conf-dir (string-append
61 %output "/share/fontconfig/conf.avail"))
62 (doc-dir (string-append
63 %output "/share/doc/" ,name "-" ,version)))
64 (setenv "PATH" PATH)
65 (system* tar "xvf" (assoc-ref %build-inputs "source"))
66
67 (mkdir-p font-dir)
68 (mkdir-p conf-dir)
69 (mkdir-p doc-dir)
70 (chdir (string-append "dejavu-fonts-ttf-" ,version))
71 (for-each (lambda (ttf)
72 (copy-file ttf
73 (string-append font-dir "/"
74 (basename ttf))))
75 (find-files "ttf" "\\.ttf$"))
76 (for-each (lambda (conf)
77 (copy-file conf
78 (string-append conf-dir "/"
79 (basename conf))))
80 (find-files "fontconfig" "\\.conf$"))
81 (for-each (lambda (doc)
82 (copy-file doc
83 (string-append doc-dir "/"
84 (basename doc))))
85 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
86 (native-inputs `(("source" ,source)
87 ("tar" ,tar)
88 ("bzip2" ,bzip2)))
89 (home-page "http://dejavu-fonts.org/")
90 (synopsis "Vera font family derivate with additional characters")
91 (description "DejaVu provides an expanded version of the Vera font family
92 aiming for quality and broader Unicode coverage while retaining the original
93 Vera style. DejaVu currently works towards conformance with the Multilingual
94 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
95 provide serif, sans and monospaced variants.")
96 (license
97 (license:x11-style
98 "http://dejavu-fonts.org/"))))
99
100 (define-public font-bitstream-vera
101 (package
102 (name "font-bitstream-vera")
103 (version "1.10")
104 (source (origin
105 (method url-fetch)
106 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
107 version "/ttf-bitstream-vera-"
108 version ".tar.bz2"))
109 (sha256
110 (base32
111 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
112 (build-system trivial-build-system)
113 (arguments
114 `(#:modules ((guix build utils))
115 #:builder (begin
116 (use-modules (guix build utils)
117 (srfi srfi-26))
118
119 (let ((tar (string-append (assoc-ref %build-inputs
120 "tar")
121 "/bin/tar"))
122 (PATH (string-append (assoc-ref %build-inputs
123 "bzip2")
124 "/bin"))
125 (font-dir (string-append %output
126 "/share/fonts/truetype"))
127 (doc-dir (string-append %output "/share/doc/"
128 ,name "-" ,version)))
129 (setenv "PATH" PATH)
130 (system* tar "xvf" (assoc-ref %build-inputs "source"))
131
132 (mkdir-p font-dir)
133 (mkdir-p doc-dir)
134 (chdir (string-append "ttf-bitstream-vera-" ,version))
135 (for-each (lambda (ttf)
136 (copy-file ttf
137 (string-append font-dir "/" ttf)))
138 (find-files "." "\\.ttf$"))
139 (for-each (lambda (doc)
140 (copy-file doc
141 (string-append doc-dir "/" doc)))
142 (find-files "." "\\.TXT$"))))))
143 (native-inputs `(("source" ,source)
144 ("tar" ,tar)
145 ("bzip2" ,bzip2)))
146 (home-page "http://www.gnome.org/fonts/")
147 (synopsis "Bitstream Vera sans-serif typeface")
148 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
149 package provides the TrueType (TTF) files.")
150 (license
151 (license:x11-style
152 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
153
154 (define-public font-gnu-freefont-ttf
155 (package
156 (name "font-gnu-freefont-ttf")
157 (version "20100919")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
161 version ".tar.gz"))
162 (sha256
163 (base32
164 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
165 (build-system trivial-build-system)
166 (arguments
167 `(#:modules ((guix build utils))
168 #:builder (begin
169 (use-modules (guix build utils)
170 (srfi srfi-26))
171
172 (let ((tar (string-append (assoc-ref %build-inputs
173 "tar")
174 "/bin/tar"))
175 (PATH (string-append (assoc-ref %build-inputs
176 "gzip")
177 "/bin"))
178 (font-dir (string-append %output
179 "/share/fonts/truetype"))
180 (doc-dir (string-append %output "/share/doc/"
181 ,name "-" ,version)))
182 (setenv "PATH" PATH)
183 (system* tar "xvf" (assoc-ref %build-inputs "source"))
184
185 (mkdir-p font-dir)
186 (mkdir-p doc-dir)
187 (chdir (string-append "freefont-" ,version))
188 (for-each (lambda (file)
189 (let ((dir (if (string-suffix? "ttf" file)
190 font-dir
191 doc-dir)))
192 (copy-file file
193 (string-append dir "/" file))))
194 (find-files "." ""))))))
195 (native-inputs `(("source" ,source)
196 ("tar" ,tar)
197 ("gzip" ,gzip)))
198 (home-page "http://www.gnu.org/software/freefont/")
199 (synopsis "Unicode-encoded outline fonts")
200 (description
201 "The GNU Freefont project aims to provide a set of free outline
202 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
203 10646/Unicode UCS (Universal Character Set).")
204 (license license:gpl3+)))
205
206 (define-public font-liberation
207 (package
208 (name "font-liberation")
209 (version "2.00.1")
210 (source (origin
211 (method url-fetch)
212 (uri (string-append "https://fedorahosted.org/releases/l/i/"
213 "liberation-fonts/liberation-fonts-ttf-"
214 version ".tar.gz"))
215 (sha256
216 (base32
217 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
218 (build-system trivial-build-system)
219 (arguments
220 `(#:modules ((guix build utils))
221 #:builder
222 (begin
223 (use-modules (guix build utils))
224
225 (let ((tar (string-append (assoc-ref %build-inputs "tar")
226 "/bin/tar"))
227 (PATH (string-append (assoc-ref %build-inputs "gzip")
228 "/bin"))
229 (font-dir (string-append %output "/share/fonts/truetype"))
230 (doc-dir (string-append %output "/share/doc/" ,name)))
231 (setenv "PATH" PATH)
232 (system* tar "xvf" (assoc-ref %build-inputs "source"))
233 (mkdir-p font-dir)
234 (mkdir-p doc-dir)
235 (chdir (string-append "liberation-fonts-ttf-" ,version))
236 (for-each (lambda (ttf)
237 (copy-file ttf
238 (string-append font-dir "/"
239 (basename ttf))))
240 (find-files "." "\\.ttf$"))
241 (for-each (lambda (doc)
242 (copy-file doc
243 (string-append doc-dir "/"
244 (basename doc))))
245 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
246 (native-inputs
247 `(("source" ,source)
248 ("tar" ,tar)
249 ("gzip" ,gzip)))
250 (home-page "https://fedorahosted.org/liberation-fonts/")
251 (synopsis
252 "Fonts compatible with Arial, Times New Roman, and Courier New")
253 (description
254 "The Liberation font family aims at metric compatibility with
255 Arial, Times New Roman, and Courier New.
256
257 There are three sets:
258
259 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
260 Bitstream Vera Sans);
261
262 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
263 Bitstream Vera Serif);
264
265 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
266 and Bitstream Vera Sans Mono).
267
268 The Liberation Fonts are sponsored by Red Hat.")
269 (license license:silofl1.1)))
270
271 (define-public font-terminus
272 (package
273 (name "font-terminus")
274 (version "4.39")
275 (source
276 (origin
277 (method url-fetch)
278 (uri (string-append
279 "mirror://sourceforge/project/terminus-font/terminus-font-"
280 version
281 "/terminus-font-"
282 version
283 ".tar.gz"))
284 (sha256
285 (base32
286 "1gzmn7zakvy6yrvmswyjfklnsvqrjm0imhq8rjws8rdkhqwkh21i"))))
287 (build-system gnu-build-system)
288 (native-inputs
289 `(("pkg-config" ,pkg-config)
290 ("perl" ,perl)
291 ("bdftopcf" ,bdftopcf)
292 ("font-util", font-util)
293 ("mkfontdir" ,mkfontdir)))
294 (arguments
295 `(#:configure-flags (list
296 ;; install fonts into subdirectory of package output
297 ;; instead of font-util-?.?.?/share/fonts/X11
298 (string-append "--with-fontrootdir="
299 %output "/share/fonts/X11"))
300 #:tests? #f)) ;; No test target in tarball
301 (home-page "http://terminus-font.sourceforge.net/")
302 (synopsis "Simple bitmap programming font")
303 (description "Terminus Font is a clean, fixed width bitmap font, designed
304 for long (8 and more hours per day) work with computers.")
305 (license license:silofl1.1)))