1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
3 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages unicode)
22 #:use-module (gnu packages autotools)
23 #:use-module (guix git-download)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module (guix build-system copy)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system trivial))
32 (define-public libunibreak
39 (url "https://github.com/adah1972/libunibreak")
40 (commit (string-append "libunibreak_"
41 (string-replace-substring version "." "_")))))
42 (file-name (git-file-name name version))
45 "0r5dndhwsiy65lmavz3vdgal9nl8g97hbmdjg6zyq3zh5hs87vwf"))))
46 (build-system gnu-build-system)
48 (list autoconf-wrapper
51 ucd-next ; required for tests
54 `(#:parallel-tests? #f ; parallel tests cause non-deterministic
57 (modify-phases %standard-phases
58 (add-before 'check 'pre-check
59 (lambda* (#:key inputs #:allow-other-keys)
60 (for-each (lambda (file)
62 (search-input-file inputs
63 (string-append "/share/ucd/auxiliary/"
65 (string-append "src/" file)))
68 "GraphemeBreakTest.txt")))))))
69 (home-page "http://vimgadgets.sourceforge.net/libunibreak/")
70 (synopsis "Unicode line breaking and word breaking algorithms")
72 "Libunibreak is an implementation of the line breaking and word
73 breaking algorithms as described in Unicode Standard Annex 14 and
74 Unicode Standard Annex 29. It is designed to be used in a generic text
84 (method url-fetch/zipbomb)
85 (uri (string-append "https://www.unicode.org/Public/zipped/" version
88 (base32 "001nq9w52ijma0vps40xwy2q6ylpyf1393lzb128ibypnmv54fh3"))))
89 (build-system copy-build-system)
92 '(("." "share/ucd/"))))
93 (home-page "https://www.unicode.org")
94 (synopsis "Unicode Character Database")
96 "The @dfn{Unicode Character Database} (UCD) consists of a number of data
97 files listing Unicode character properties and related data. It also includes
98 test data for conformance to several important Unicode algorithms.")
101 (define-public ucd-next
108 (method url-fetch/zipbomb)
109 (uri (string-append "https://www.unicode.org/Public/zipped/" version
113 "001nq9w52ijma0vps40xwy2q6ylpyf1393lzb128ibypnmv54fh3"))))))
115 (define (unicode-emoji-file name version hash)
118 (uri (string-append "https://www.unicode.org/Public/emoji/"
120 "/emoji-" name ".txt"))
121 (sha256 (base32 hash))))
123 (define-public unicode-emoji
125 (name "unicode-emoji")
128 (build-system trivial-build-system)
130 `(#:modules ((guix build utils))
132 (let ((out (string-append %output "/share/unicode/emoji")))
133 (use-modules (guix build utils))
139 (string-append out "/"
140 (substring (car input) 8) ; strip "unicode-"
145 `(("unicode-emoji-data"
148 "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv"))
149 ("unicode-emoji-sequences"
152 "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs"))
153 ("unicode-emoji-test"
156 "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck"))
157 ("unicode-emoji-variation-sequences"
159 "variation-sequences" version
160 "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a"))
161 ("unicode-emoji-zwj-sequences"
163 "zwj-sequences" version
164 "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n"))))
165 (home-page "https://www.unicode.org")
166 (synopsis "Unicode Emoji data")
168 "This package includes data files listing characters and sequences, that
169 Unicode emoji supporting fonts or keyboards should support according to the
170 Unicode Technological Standard #51.")
173 (define-public unicode-cldr-common
175 (name "unicode-cldr-common")
179 (method url-fetch/zipbomb)
180 (uri (string-append "https://unicode.org/Public/cldr/"
181 (version-major version)
182 "/cldr-common-" version ".zip"))
185 "0hxsc3j5zb32hmiaj0r3ajchmklx6zng6zlh1ca6s9plq5b9w9q7"))))
186 (build-system copy-build-system)
189 '(("common" "share/unicode/cldr/"))))
190 (home-page "https://www.unicode.org")
191 (synopsis "Locale data repository")
193 "The Unicode Common Locale Data Repository (CLDR) is a large repository
194 of locale data, including among others
197 @item patterns for formatting and parsing,
198 @item name translations,
199 @item and various information on languages, scripts and country-specific