~ruther/guix-local

ref: 71162fc33078dc5af761e6f12472aad1bb680a48 guix-local/gnu/packages/elixir-i18n.scm -rw-r--r-- 6.6 KiB
71162fc3 — Giacomo Leidi gnu: Add elixir-ex-cldr-lists. 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2025 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages elixir-i18n)
  #:use-module (gnu packages erlang)
  #:use-module (gnu packages elixir-markup)
  #:use-module (gnu packages elixir-xyz)
  #:use-module (guix build-system mix)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix gexp)
  #:use-module ((guix licenses)
                #:prefix license:)
  #:use-module (guix packages))

(define-public elixir-cldr-utils
  (package
    (name "elixir-cldr-utils")
    (version "2.28.3")
    (source
     (origin
       (method url-fetch)
       (uri (hexpm-uri "cldr_utils" version))
       (sha256
        (base32 "1dgzaxfj0whv2rjkf57jnzkl63az50wypzjwcwnz31yilpckq220"))))
    (build-system mix-build-system)
    (propagated-inputs (list elixir-castore erlang-certifi elixir-decimal))
    (synopsis
     "Helpers for @code{ex_cldr}")
    (description
     "@code{Map}, @code{Calendar}, @code{Digits}, @code{Decimal}, @code{HTTP},
@code{Macro}, @code{Math}, and @code{String} helpers for @code{ex_cldr}.")
    (home-page "https://hexdocs.pm/cldr_utils/")
    (license license:asl2.0)))

(define-public elixir-digital-token
  (package
    (name "elixir-digital-token")
    (version "1.0.0")
    (source
     (origin
       (method url-fetch)
       (uri (hexpm-uri "digital_token" version))
       (sha256
        (base32 "1rp9r5jb0db52f969jmgv5sp8k0vd98dnqwrgca0fyzsqalgbmlf"))))
    (build-system mix-build-system)
    (propagated-inputs (list elixir-cldr-utils elixir-jason))
    (synopsis
     "ISO 24165 Digital Tokens")
    (description
     "Elixir integration for ISO 24165 Digital Tokens (crypto currencies) through the
DTIF registry data.")
    (home-page "https://hexdocs.pm/digital_token/")
    (license license:asl2.0)))

(define-public elixir-ex-cldr-currencies
  (package
    (name "elixir-ex-cldr-currencies")
    (version "2.16.5")
    (source
     (origin
       (method url-fetch)
       (uri (hexpm-uri "ex_cldr_currencies" version))
       (sha256
        (base32 "1lrhiyi5ywcvpirf0k4qs6l9pwvijwix1bvqwafki9zh5281g5s3"))))
    (build-system mix-build-system)
    (propagated-inputs (list elixir-ex-cldr elixir-jason))
    (synopsis
     "Currency localization data encapsulation function")
    (description
     "Currency localization data encapsulation functions for the Common Locale Data
Repository (CLDR).")
    (home-page "https://hexdocs.pm/ex_cldr_currencies/")
    (license license:asl2.0)))

(define-public elixir-ex-cldr-lists
  (package
    (name "elixir-ex-cldr-lists")
    (version "2.11.1")
    (source
     (origin
       (method url-fetch)
       (uri (hexpm-uri "ex_cldr_lists" version))
       (sha256
        (base32 "1qmdnk8am9dy6k4z93svq7lz288cwmi8aswsn4c3zjqca421q5h0"))))
    (build-system mix-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'override-mix-env
            (lambda _
              (symlink (string-append (getcwd) "/config/release.exs")
                       "config/prod.exs"))))))
    (propagated-inputs (list elixir-ex-cldr-numbers elixir-ex-doc elixir-jason))
    (synopsis
     "List formatting functions for @code{ex_cldr}.")
    (description
     "List formatting functions for the Common Locale Data Repository (CLDR) package
@code{ex_cldr}.")
    (home-page "https://hexdocs.pm/ex_cldr_lists/")
    (license license:asl2.0)))

(define-public elixir-ex-cldr-minimal
  (package
    (name "elixir-ex-cldr-minimal")
    (version "2.43.2")
    (source
     (origin
       (method url-fetch)
       (uri (hexpm-uri "ex_cldr" version))
       (sha256
        (base32 "0ai765853c2zjmrwni9j0753c8fv9431na93gpvnc488pnkkfl89"))))
    (build-system mix-build-system)
    (native-inputs
     (list elixir-stream-data))
    (propagated-inputs
     (list elixir-cldr-utils elixir-decimal elixir-gettext elixir-jason
           elixir-nimble-parsec))
    (synopsis
     "Common Locale Data Repository (CLDR) functions for Elixir")
    (description
     "Common Locale Data Repository (CLDR) functions for Elixir to localize and format
numbers, dates, lists, messages, languages, territories and units with support
for over 700 locales for internationalized (i18n) and localized (L10N)
applications.")
    (home-page "https://hexdocs.pm/ex_cldr/")
    (license license:asl2.0)))

(define-public elixir-ex-cldr-numbers
  (package
    (name "elixir-ex-cldr-numbers")
    (version "2.35.2")
    (source
     (origin
       (method url-fetch)
       (uri (hexpm-uri "ex_cldr_numbers" version))
       (sha256
        (base32 "1pan719k511ya67s7vldz3djry5m6vsb4vynkfggwznyly0zrdbd"))))
    (build-system mix-build-system)
    (propagated-inputs
     (list elixir-decimal elixir-digital-token elixir-ex-cldr
           elixir-ex-cldr-currencies elixir-jason))
    (synopsis
     "Number and currency localization and formatting")
    (description
     "Number and currency localization and formatting functions for the Common Locale
Data Repository (CLDR).")
    (home-page "https://hexdocs.pm/ex_cldr_numbers/")
    (license license:asl2.0)))

(define-public elixir-ex-cldr
  (package
    (inherit elixir-ex-cldr-minimal)
    (name "elixir-ex-cldr")
    (version "2.43.2")
    (source
     (origin
       ;; The hex.pm package ships only the en locale.
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/elixir-cldr/cldr.git")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1wgwp74ya0gkvd5pk4qv9s38p85r5yw370y4wv7jywy3hrbrj9f5"))))
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'disable-failing-tests
            ;; test That locales with no version are replaced with current version
            ;; test That locales with an old version are replaced with current version
            (lambda _
              (for-each delete-file '("test/locale_upgrade_test.exs")))))))))