projects/guix·blob kernel-updates · refs

311 lines · 11.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2025 Giacomo Leidi <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
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.
10;;;
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.
15;;;
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/>.
18
19(define-module (gnu packages elixir-markup)
20 #:use-module (gnu packages elixir-xyz)
21 #:use-module (gnu packages erlang-xyz)
22 #:use-module (gnu packages web)
23 #:use-module (guix build-system mix)
24 #:use-module (guix download)
25 #:use-module (guix gexp)
26 #:use-module ((guix licenses)
27 #:prefix license:)
28 #:use-module (guix packages))
29
30(define-public elixir-earmark-ast-dsl
31 (package
32 (name "elixir-earmark-ast-dsl")
33 (version "0.3.7")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (hexpm-uri "earmark_ast_dsl" version))
38 (sha256
39 (base32 "1c90204jcz1pbxxdxmvwr32y663jwvpn05izqp7zmqlp8yknzlhj"))))
40 (build-system mix-build-system)
41 (synopsis
42 "Toolset to generate EarmarkParser AST Nodes")
43 (description
44 "@code{EarmarkAstDsl} is a toolset to generate @code{EarmarkParser}
45conformant AST Nodes. Its main purpose is to remove boilerplate code from
46Earmark and @code{EarmarkParser} tests.")
47 (home-page "https://hexdocs.pm/earmark_ast_dsl/")
48 (license license:asl2.0)))
49
50(define-public elixir-earmark-parser
51 (package
52 (name "elixir-earmark-parser")
53 (version "1.4.46")
54 (source
55 (origin
56 (method url-fetch)
57 (uri (hexpm-uri "earmark_parser" version))
58 (sha256
59 (base32 "1xc9ivpqpqkcl15zcb5qgbpbrns1v62wsbbba8pwcs0wi9p66i4w"))))
60 (build-system mix-build-system)
61 (native-inputs
62 (list elixir-earmark-ast-dsl elixir-excoveralls elixir-floki))
63 (synopsis "AST parser and generator for Markdown")
64 (description "This package providesAST parser and generator for Markdown.")
65 (home-page "https://hexdocs.pm/earmark_parser/")
66 (license license:asl2.0)))
67
68(define-public elixir-earmark
69 (package
70 (name "elixir-earmark")
71 (version "1.4.47")
72 (source
73 (origin
74 (method url-fetch)
75 (uri (hexpm-uri "earmark" version))
76 (sha256
77 (base32 "1y4qqq3bxim9b9jrpbdxpagsjs5whlig4zva6hxmznf2lazbx5iy"))))
78 (build-system mix-build-system)
79 (native-inputs
80 (list elixir-earmark-ast-dsl
81 elixir-excoveralls
82 elixir-floki
83 elixir-traverse))
84 (synopsis
85 "Elixir Markdown converter")
86 (description
87 "Earmark is a pure-Elixir Markdown converter. It is intended to be used as a
88library (just call Earmark.as_html), but can also be used as a command-line tool
89(run mix escript.build first). Output generation is pluggable.")
90 (home-page "https://hexdocs.pm/earmark/")
91 (license license:asl2.0)))
92
93(define-public elixir-easyhtml
94 (package
95 (name "elixir-easyhtml")
96 (version "0.4.0")
97 (source
98 (origin
99 (method url-fetch)
100 (uri (hexpm-uri "easyhtml" version))
101 (sha256
102 (base32 "00wciw1sy9d8mjxaq3xfswg8fqcw1vidc7f7zasj784lqqv52wim"))))
103 (build-system mix-build-system)
104 (propagated-inputs (list elixir-lazy-html))
105 (synopsis "EasyHTML makes working with HTML easy.")
106 (description "@code{EasyHTML} makes working with HTML easy. It uses
107LazyHTML.")
108 (home-page "https://hexdocs.pm/easyhtml/")
109 (license license:asl2.0)))
110
111(define-public elixir-ex-doc
112 (package
113 (name "elixir-ex-doc")
114 (version "0.40.3")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (hexpm-uri "ex_doc" version))
119 (sha256
120 (base32 "1pkkp42dgj3dks6p4x9fbx39rscwgkb8b6s8kdsdkv1gfiby6mi7"))))
121 (build-system mix-build-system)
122 (arguments
123 ;; FIXME: tests depend on lazy_html which is not yet packaged.
124 (list #:tests? #f))
125 (native-inputs
126 (list elixir-easyhtml
127 elixir-jason
128 elixir-floki))
129 (propagated-inputs
130 (list elixir-earmark-parser elixir-makeup-c elixir-makeup-elixir
131 elixir-makeup-erlang elixir-makeup-html))
132 (synopsis "Documentation generation tool for Elixir")
133 (description "@code{ExDoc} is a documentation generation tool for Elixir.")
134 (home-page "https://hexdocs.pm/ex_doc/")
135 (license license:asl2.0)))
136
137(define-public elixir-html-entities
138 (package
139 (name "elixir-html-entities")
140 (version "0.5.2")
141 (source
142 (origin
143 (method url-fetch)
144 (uri (hexpm-uri "html_entities" version))
145 (sha256
146 (base32 "1k7xyj0q38ms3n5hbn782pa6w1vgd6biwlxr4db6319l828a6fy5"))))
147 (build-system mix-build-system)
148 (synopsis "Decode and encode HTML entities in a string")
149 (description "This library provides an Elixir module to decode and encode
150HTML entities in a string.")
151 (home-page "https://hexdocs.pm/html_entities/")
152 (license license:expat)))
153
154(define-public elixir-html-sanitize-ex
155 (package
156 (name "elixir-html-sanitize-ex")
157 (version "1.5.2")
158 (source
159 (origin
160 (method url-fetch)
161 (uri (hexpm-uri "html_sanitize_ex" version))
162 (sha256
163 (base32 "1bfi31xs23i4j7136i6b9w5f202nw982bql8v26khg6flwicjzc0"))))
164 (build-system mix-build-system)
165 (propagated-inputs (list erlang-mochiweb))
166 (synopsis "HTML sanitizer for Elixir")
167 (description "HTML sanitizer for Elixir.")
168 (home-page "https://hexdocs.pm/html_sanitize_ex/")
169 (license license:expat)))
170
171(define-public elixir-floki
172 (package
173 (name "elixir-floki")
174 (version "0.38.4")
175 (source
176 (origin
177 (method url-fetch)
178 (uri (hexpm-uri "floki" version))
179 (sha256
180 (base32 "0ws94kq53556hg3fr8ylwi780lls17aa5b7dqx2rirz8xr2ldcxx"))))
181 (build-system mix-build-system)
182 (native-inputs
183 (list elixir-credo elixir-jason))
184 (synopsis
185 "Simple HTML parser")
186 (description
187 "Floki is a simple HTML parser that enables search for nodes using CSS selectors.")
188 (home-page "https://hexdocs.pm/floki/")
189 (license license:expat)))
190
191(define-public elixir-lazy-html
192 (package
193 (name "elixir-lazy-html")
194 (version "0.1.11")
195 (source
196 (origin
197 (method url-fetch)
198 (uri (hexpm-uri "lazy_html" version))
199 (sha256
200 (base32 "0fw8cd0vwj1v7qd9sbcjzvflrhg5jrbd4wqnlahyqccwja9fa6rv"))))
201 (build-system mix-build-system)
202 (arguments
203 (list
204 #:phases
205 #~(modify-phases %standard-phases
206 (add-after 'unpack 'set-HOME
207 (lambda _
208 (setenv "HOME" "/tmp")
209 ;; Compile the NIF from source instead of fetching a
210 ;; precompiled binary from GitHub.
211 ;; https://github.com/dashbitco/lazy_html/pull/38
212 (substitute* "mix.exs"
213 (("make_precompiler: \\{:nif, CCPrecompiler\\},") "")
214 ;; elixir_make is only used at build time; keep it out of
215 ;; the application list so dependents need not start it.
216 ;; https://github.com/dashbitco/lazy_html/pull/36
217 (("\\{:elixir_make, \"~> 0\\.9\\.0\"\\}")
218 "{:elixir_make, \"~> 0.9.0\", runtime: false}"))
219 ;; The Makefile clones and builds a pinned lexbor from
220 ;; GitHub; link against the lexbor package instead.
221 ;; https://github.com/dashbitco/lazy_html/pull/37
222 (substitute* "Makefile"
223 (("^\\$\\(NIF_PATH\\): \\$\\(SOURCES\\) \\$\\(LEXBOR_LIB\\)")
224 "$(NIF_PATH): $(SOURCES)")
225 (("\\$\\(SOURCES\\) \\$\\(LEXBOR_LIB\\) -o")
226 "$(SOURCES) -llexbor -o")))))))
227 (native-inputs (list elixir-elixir-make))
228 (inputs (list lexbor))
229 (propagated-inputs (list elixir-fine))
230 (synopsis "Efficient parsing and querying of HTML documents")
231 (description "LazyHTML is designed around lazy HTML documents. Documents
232are parsed and kept natively in memory for as long as possible. Query selectors
233are executed in native code for performance and adheres to browser standards.
234Under the hood, LazyHTML uses Lexbor, a fast, dependency-free and comprehensive
235HTML engine, written entirely in C.")
236 (home-page "https://lazy-html.hexdocs.pm/")
237 (license license:asl2.0)))
238
239(define-public elixir-makeup-c
240 (package
241 (name "elixir-makeup-c")
242 (version "0.1.1")
243 (source
244 (origin
245 (method url-fetch)
246 (uri (hexpm-uri "makeup_c" version))
247 (sha256
248 (base32 "0s98gwsvi88mxf3wjsi05l7dgkw4gzbihzlsq5ad68i86x2wzsc9"))))
249 (build-system mix-build-system)
250 (propagated-inputs (list elixir-makeup))
251 (synopsis "C lexer for the Makeup syntax highlighter")
252 (description "This package provides @code{elixir-makeup-c}, a library
253implementing a C lexer for the Makeup syntax highlighter.")
254 (home-page "https://hexdocs.pm/makeup_c/")
255 (license license:bsd-2)))
256
257(define-public elixir-makeup-elixir
258 (package
259 (name "elixir-makeup-elixir")
260 (version "1.0.1")
261 (source
262 (origin
263 (method url-fetch)
264 (uri (hexpm-uri "makeup_elixir" version))
265 (sha256
266 (base32 "01wmpzzf445xnc7gr7ml9hmqz6rqxpsx9bpxjzymqgia846r113j"))))
267 (build-system mix-build-system)
268 (propagated-inputs (list elixir-makeup elixir-nimble-parsec))
269 (synopsis "Elixir lexer for the Makeup syntax highlighter")
270 (description "This package provides @code{elixir-makeup-elixir}, a library
271implementing an Elixir lexer for the Makeup syntax highlighter.")
272 (home-page "https://hexdocs.pm/makeup_elixir/")
273 (license license:bsd-2)))
274
275(define-public elixir-makeup-erlang
276 (package
277 (name "elixir-makeup-erlang")
278 (version "1.1.0")
279 (source
280 (origin
281 (method url-fetch)
282 (uri (hexpm-uri "makeup_erlang" version))
283 (sha256
284 (base32 "0g1wqxhgjwxzxg9mflpx318n5c0j4zl0zvdskabh66nxn47pimhw"))))
285 (build-system mix-build-system)
286 (propagated-inputs (list elixir-makeup))
287 (synopsis "Erlang lexer for the Makeup syntax highlighter")
288 (description "This package provides @code{elixir-makeup-erlang}, a library
289implementing an Erlang lexer for the Makeup syntax highlighter.")
290 (home-page "https://hexdocs.pm/makeup_erlang/")
291 (license license:bsd-2)))
292
293(define-public elixir-makeup-html
294 (package
295 (name "elixir-makeup-html")
296 (version "0.2.0")
297 (source
298 (origin
299 (method url-fetch)
300 (uri (hexpm-uri "makeup_html" version))
301 (sha256
302 (base32 "1ciildxh4bmacbkbil4hhsjhp7z31ycnvq072fml59m6p6zgfmh8"))))
303 (build-system mix-build-system)
304 (native-inputs
305 (list elixir-stream-data))
306 (propagated-inputs (list elixir-makeup))
307 (synopsis "HTML lexer for the Makeup syntax highlighter")
308 (description "This package provides @code{elixir-makeup-html}, a library
309implementing an HTML lexer for the Makeup syntax highlighter.")
310 (home-page "https://hexdocs.pm/makeup_html/")
311 (license license:expat)))