| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 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))
|
| 31 |
|
| 32 | (define-public libunibreak
|
| 33 | (package
|
| 34 | (name "libunibreak")
|
| 35 | (version "6.1")
|
| 36 | (source (origin
|
| 37 | (method git-fetch)
|
| 38 | (uri (git-reference
|
| 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))
|
| 43 | (sha256
|
| 44 | (base32
|
| 45 | "0mhkbji89cyjg4g1rviyprchxzpv8pmlmqw4m10cvgfjwmpmwa7k"))))
|
| 46 | (build-system gnu-build-system)
|
| 47 | (native-inputs
|
| 48 | (list autoconf-wrapper
|
| 49 | automake
|
| 50 | libtool
|
| 51 | ucd))
|
| 52 | (arguments
|
| 53 | `(#:parallel-tests? #f |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | ))
|
| 73 | (home-page "https://vimgadgets.sourceforge.net/libunibreak/")
|
| 74 | (synopsis "Unicode line breaking and word breaking algorithms")
|
| 75 | (description
|
| 76 | "Libunibreak is an implementation of the line breaking and word
|
| 77 | breaking algorithms as described in Unicode Standard Annex 14 and
|
| 78 | Unicode Standard Annex 29. It is designed to be used in a generic text
|
| 79 | renderer.")
|
| 80 | (license zlib)))
|
| 81 |
|
| 82 | (define-public ucd
|
| 83 | (package
|
| 84 | (name "ucd")
|
| 85 | (version "15.1.0")
|
| 86 | (source
|
| 87 | (origin
|
| 88 | (method url-fetch/zipbomb)
|
| 89 | (uri (string-append "https://www.unicode.org/Public/zipped/" version
|
| 90 | "/UCD.zip"))
|
| 91 | (sha256
|
| 92 | (base32 "0xv10nkvg6451415imvb0qx72ljp0hv9f8h1sl6509ir0lync76b"))))
|
| 93 | (build-system copy-build-system)
|
| 94 | (arguments
|
| 95 | '(#:install-plan
|
| 96 | '(("." "share/ucd/"))))
|
| 97 | (home-page "https://www.unicode.org")
|
| 98 | (synopsis "Unicode Character Database")
|
| 99 | (description
|
| 100 | "The @dfn{Unicode Character Database} (UCD) consists of a number of data
|
| 101 | files listing Unicode character properties and related data. It also includes
|
| 102 | test data for conformance to several important Unicode algorithms.")
|
| 103 | (license unicode)))
|
| 104 |
|
| 105 | (define (unicode-emoji-file name version hash)
|
| 106 | (origin
|
| 107 | (method url-fetch)
|
| 108 | (uri (string-append "https://www.unicode.org/Public/emoji/"
|
| 109 | version
|
| 110 | "/emoji-" name ".txt"))
|
| 111 | (sha256 (base32 hash))))
|
| 112 |
|
| 113 | (define-public unicode-emoji
|
| 114 | (package
|
| 115 | (name "unicode-emoji")
|
| 116 | (version "15.1")
|
| 117 | (source #f)
|
| 118 | (build-system trivial-build-system)
|
| 119 | (arguments
|
| 120 | `(#:modules ((guix build utils))
|
| 121 | #:builder
|
| 122 | (let ((out (string-append %output "/share/unicode/emoji")))
|
| 123 | (use-modules (guix build utils))
|
| 124 | (mkdir-p out)
|
| 125 | (for-each
|
| 126 | (lambda (input)
|
| 127 | (copy-file
|
| 128 | (cdr input)
|
| 129 | (string-append out "/"
|
| 130 | (substring (car input) 8) |
| 131 | ".txt")))
|
| 132 | %build-inputs))))
|
| 133 | (inputs
|
| 134 | `(("unicode-emoji-sequences"
|
| 135 | ,(unicode-emoji-file
|
| 136 | "sequences" version
|
| 137 | "1lahs35c3dqpai22yvn5ri31livrz0cvc8c63jzgn11mbq8wjwpb"))
|
| 138 | ("unicode-emoji-test"
|
| 139 | ,(unicode-emoji-file
|
| 140 | "test" version
|
| 141 | "1nby2gl5wffhcpa8i91a0qxx3a2751qampx6rxvam3m2k8jfwxnq"))
|
| 142 | ("unicode-emoji-zwj-sequences"
|
| 143 | ,(unicode-emoji-file
|
| 144 | "zwj-sequences" version
|
| 145 | "0mqfzcz1ka78jjk8gk6bfywq4ldmj26rri08zsdqzkfgr8ys0xls"))))
|
| 146 | (home-page "https://www.unicode.org")
|
| 147 | (synopsis "Unicode Emoji data")
|
| 148 | (description
|
| 149 | "This package includes data files listing characters and sequences, that
|
| 150 | Unicode emoji supporting fonts or keyboards should support according to the
|
| 151 | Unicode Technological Standard #51.")
|
| 152 | (license unicode)))
|
| 153 |
|
| 154 | (define-public unicode-emoji-12
|
| 155 | (package
|
| 156 | (inherit unicode-emoji)
|
| 157 | (name "unicode-emoji")
|
| 158 | (version "12.0")
|
| 159 | (arguments
|
| 160 | `(#:modules ((guix build utils))
|
| 161 | #:builder
|
| 162 | (let ((out (string-append %output "/share/unicode/emoji")))
|
| 163 | (use-modules (guix build utils))
|
| 164 | (mkdir-p out)
|
| 165 | (for-each
|
| 166 | (lambda (input)
|
| 167 | (copy-file
|
| 168 | (cdr input)
|
| 169 | (string-append out "/"
|
| 170 | (substring (car input) 8) |
| 171 | ".txt")))
|
| 172 | %build-inputs)
|
| 173 | #t)))
|
| 174 | (inputs
|
| 175 | `(("unicode-emoji-data"
|
| 176 | ,(unicode-emoji-file
|
| 177 | "data" version
|
| 178 | "03sf7h1d6kb9m5s02lif88jsi5kjszpkfvcymaqxj8ds70ar9pgv"))
|
| 179 | ("unicode-emoji-sequences"
|
| 180 | ,(unicode-emoji-file
|
| 181 | "sequences" version
|
| 182 | "1hghki2rn3n7m4lwpwi2a5wrsf2nij4bxga9ldabx4g0g2k23svs"))
|
| 183 | ("unicode-emoji-test"
|
| 184 | ,(unicode-emoji-file
|
| 185 | "test" version
|
| 186 | "1dqd0fh999mh6naj816ni113m9dimfy3ih9nffjq2lrv9mmlgdck"))
|
| 187 | ("unicode-emoji-variation-sequences"
|
| 188 | ,(unicode-emoji-file
|
| 189 | "variation-sequences" version
|
| 190 | "1cccwx5bl79w4c19vi5dhjqxrph92s8hihp9y8s2cqvdzmgbln7a"))
|
| 191 | ("unicode-emoji-zwj-sequences"
|
| 192 | ,(unicode-emoji-file
|
| 193 | "zwj-sequences" version
|
| 194 | "1l791nbijmmhwa7kmvfn8gp26ban512l6mgqpz1mnbq3xm19181n"))))))
|
| 195 |
|
| 196 | (define-public unicode-cldr-common
|
| 197 | (package
|
| 198 | (name "unicode-cldr-common")
|
| 199 | (version "36.0")
|
| 200 | (source
|
| 201 | (origin
|
| 202 | (method url-fetch/zipbomb)
|
| 203 | (uri (string-append "https://unicode.org/Public/cldr/"
|
| 204 | (version-major version)
|
| 205 | "/cldr-common-" version ".zip"))
|
| 206 | (sha256
|
| 207 | (base32
|
| 208 | "0hxsc3j5zb32hmiaj0r3ajchmklx6zng6zlh1ca6s9plq5b9w9q7"))))
|
| 209 | (build-system copy-build-system)
|
| 210 | (arguments
|
| 211 | '(#:install-plan
|
| 212 | '(("common" "share/unicode/cldr/"))))
|
| 213 | (home-page "https://www.unicode.org")
|
| 214 | (synopsis "Locale data repository")
|
| 215 | (description
|
| 216 | "The Unicode Common Locale Data Repository (CLDR) is a large repository
|
| 217 | of locale data, including among others
|
| 218 |
|
| 219 | @itemize
|
| 220 | @item patterns for formatting and parsing,
|
| 221 | @item name translations,
|
| 222 | @item and various information on languages, scripts and country-specific
|
| 223 | conventions.
|
| 224 | @end itemize\n")
|
| 225 | (license unicode)))
|