1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
3 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages unicode)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix utils)
25 #:use-module (guix build-system copy)
26 #:use-module (guix build-system trivial))
34 (method url-fetch/zipbomb)
35 (uri (string-append "https://www.unicode.org/Public/zipped/" version
39 "1ighy39cjkmqnv1797wrxjz76mv1fdw7zp5j04q55bkwxsdkvrmh"))))
40 (build-system copy-build-system)
43 '(("." "share/ucd/"))))
44 (home-page "https://www.unicode.org")
45 (synopsis "Unicode Character Database")
47 "The @dfn{Unicode Character Database} (UCD) consists of a number of data
48 files listing Unicode character properties and related data. It also includes
49 test data for conformance to several important Unicode algorithms.")
52 (define (unicode-emoji-file name version hash)
55 (uri (string-append "https://www.unicode.org/Public/emoji/"
57 "/emoji-" name ".txt"))
58 (sha256 (base32 hash))))
60 (define-public unicode-emoji
62 (name "unicode-emoji")
65 (build-system trivial-build-system)
67 `(#:modules ((guix build utils))
69 (let ((out (string-append %output "/share/unicode/emoji")))
70 (use-modules (guix build utils))
76 (string-append out "/"
77 (substring (car input) 8) ; strip "unicode-"
82 `(("unicode-emoji-data"
85 "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv"))
86 ("unicode-emoji-sequences"
89 "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs"))
93 "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck"))
94 ("unicode-emoji-variation-sequences"
96 "variation-sequences" version
97 "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a"))
98 ("unicode-emoji-zwj-sequences"
100 "zwj-sequences" version
101 "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n"))))
102 (home-page "https://www.unicode.org")
103 (synopsis "Unicode Emoji data")
105 "This package includes data files listing characters and sequences, that
106 Unicode emoji supporting fonts or keyboards should support according to the
107 Unicode Technological Standard #51.")
110 (define-public unicode-cldr-common
112 (name "unicode-cldr-common")
116 (method url-fetch/zipbomb)
117 (uri (string-append "https://unicode.org/Public/cldr/"
118 (version-major version)
119 "/cldr-common-" version ".zip"))
122 "0hxsc3j5zb32hmiaj0r3ajchmklx6zng6zlh1ca6s9plq5b9w9q7"))))
123 (build-system copy-build-system)
126 '(("common" "share/unicode/cldr/"))))
127 (home-page "https://www.unicode.org")
128 (synopsis "Locale data repository")
130 "The Unicode Common Locale Data Repository (CLDR) is a large repository
131 of locale data, including among others
134 @item patterns for formatting and parsing,
135 @item name translations,
136 @item and various information on languages, scripts and country-specific