1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages unicode)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix utils)
24 #:use-module (guix build-system trivial))
32 (method url-fetch/zipbomb)
33 (uri (string-append "https://www.unicode.org/Public/zipped/" version
37 "1ighy39cjkmqnv1797wrxjz76mv1fdw7zp5j04q55bkwxsdkvrmh"))))
38 (build-system trivial-build-system)
40 `(#:modules ((guix build utils))
42 (let ((out (string-append %output "/share/ucd")))
43 (use-modules (guix build utils))
45 (copy-recursively (assoc-ref %build-inputs "source") out)
47 (home-page "https://www.unicode.org")
48 (synopsis "Unicode Character Database")
50 "The @dfn{Unicode Character Database} (UCD) consists of a number of data
51 files listing Unicode character properties and related data. It also includes
52 test data for conformance to several important Unicode algorithms.")
55 (define (unicode-emoji-file name version hash)
58 (uri (string-append "https://www.unicode.org/Public/emoji/"
60 "/emoji-" name ".txt"))
61 (sha256 (base32 hash))))
63 (define-public unicode-emoji
65 (name "unicode-emoji")
68 (build-system trivial-build-system)
70 `(#:modules ((guix build utils))
72 (let ((out (string-append %output "/share/unicode/emoji")))
73 (use-modules (guix build utils))
79 (string-append out "/"
80 (substring (car input) 8) ; strip "unicode-"
85 `(("unicode-emoji-data"
88 "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv"))
89 ("unicode-emoji-sequences"
92 "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs"))
96 "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck"))
97 ("unicode-emoji-variation-sequences"
99 "variation-sequences" version
100 "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a"))
101 ("unicode-emoji-zwj-sequences"
103 "zwj-sequences" version
104 "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n"))))
105 (home-page "https://www.unicode.org")
106 (synopsis "Unicode Emoji data")
108 "This package includes data files listing characters and sequences, that
109 Unicode emoji supporting fonts or keyboards should support according to the
110 Unicode Technological Standard #51.")
113 (define-public unicode-cldr-common
115 (name "unicode-cldr-common")
119 (method url-fetch/zipbomb)
120 (uri (string-append "https://unicode.org/Public/cldr/"
121 (version-major version)
122 "/cldr-common-" version ".zip"))
125 "0hxsc3j5zb32hmiaj0r3ajchmklx6zng6zlh1ca6s9plq5b9w9q7"))))
126 (build-system trivial-build-system)
128 `(#:modules ((guix build utils))
130 (let ((out (string-append %output "/share/unicode/cldr/common")))
131 (use-modules (guix build utils))
133 (copy-recursively (string-append (assoc-ref %build-inputs "source")
137 (home-page "https://www.unicode.org")
138 (synopsis "Locale data repository")
140 "The Unicode Common Locale Data Repository (CLDR) is a large repository
141 of locale data, including among others
144 @item patterns for formatting and parsing,
145 @item name translations,
146 @item and various informations on languages, scripts and country-specific