projects/guix·blob java-team · refs

781 lines · 30.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Mathieu Lirzin <[email protected]>
3;;; Copyright © 2015 David Thompson <[email protected]>
4;;; Copyright © 2016, 2019 Efraim Flashner <[email protected]>
5;;; Copyright © 2017 Nikita <[email protected]>
6;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2020, 2022 Marius Bakke <[email protected]>
8;;; Copyright © 2020 EuAndreh <[email protected]>
9;;; Copyright © 2021 Noisytoot <[email protected]>
10;;; Copyright © 2021 Zhu Zihao <[email protected]>
11;;; Copyright © 2021 Petr Hodina <[email protected]>
12;;; Copyright © 2022 jgart <[email protected]>
13;;; Copyright © 2022, 2024 Vinicius Monego <[email protected]>
14;;; Copyright © 2023 Zheng Junjie <[email protected]>
15;;; Copyright © 2023 Nicolas Graves <[email protected]>
16;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
17;;; Copyright © 2024 Ricardo Wurmus <[email protected]>
18;;; Copyright © 2025 Vinicius Monego <[email protected]>
19;;; Copyright © 2026 Carlos Durán Domínguez <[email protected]>
20;;; Copyright © 2026 Andy Tai <[email protected]>
21;;; Copyright © 2026 gemmaro <[email protected]>
22;;; Copyright © 2026 Ashish SHUKLA <[email protected]>
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
39(define-module (gnu packages markup)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix gexp)
44 #:use-module (guix packages)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system meson)
47 #:use-module (guix build-system go)
48 #:use-module (guix build-system trivial)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system perl)
51 #:use-module (guix build-system pyproject)
52 #:use-module (guix utils)
53 #:use-module (guix gexp)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages bash)
57 #:use-module (gnu packages build-tools)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages compiler-tools)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages imagemagick)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages perl-check)
68 #:use-module (gnu packages perl-compression)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-build)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages tex)
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages xml))
76
77(define-public gofrundis
78 (package
79 (name "gofrundis")
80 (version "0.16.0")
81 (source
82 (origin
83 (method git-fetch)
84 (uri (git-reference
85 (url "https://codeberg.org/anaseto/gofrundis")
86 (commit (string-append "v" version))))
87 (file-name (git-file-name name version))
88 (sha256
89 (base32 "11821nmx9rnxff8pm08dbdzc6rqv4xliw9kx3pdfmxjf8n6p58xj"))))
90 (build-system go-build-system)
91 (arguments
92 (list
93 #:install-source? #f
94 #:import-path "codeberg.org/anaseto/gofrundis/cmd/frundis"
95 #:unpack-path "codeberg.org/anaseto/gofrundis"
96 #:test-subdirs
97 #~(list "../../...")
98 #:phases
99 #~(modify-phases %standard-phases
100 (add-after 'unpack 'fix-paths
101 (lambda* (#:key unpack-path #:allow-other-keys)
102 (substitute* (string-append "src/" unpack-path
103 "/frundis/utils.go")
104 (("/bin/sh")
105 (string-append #$(this-package-input "bash-minimal")
106 "/bin/sh"))))))))
107 (inputs (list bash-minimal))
108 (native-inputs (list perl)) ; necessary for running the tests
109 (home-page "https://anaseto.codeberg.page/frundis/")
110 (synopsis "Tool for compiling documents written in the frundis")
111 (description
112 "@command{frundis} is a tool for compiling documents written in the
113frundis language, a semantic markup language primarily intended for supporting
114authoring of novels, but also well suited for many other kinds of documents.
115The frundis tool can export documents to LaTeX, XHTML 5, EPUB, markdown and
116groff mom.
117
118The language has a focus on simplicity. It provides a few flexible built-in
119macros with extensible semantics. It strives to provide good error messages
120and catch typos, while still allowing one to finely control output for a
121specific format when needed.")
122 (license license:isc)))
123
124(define-public hoedown
125 (package
126 (name "hoedown")
127 (version "3.0.7")
128 (source (origin
129 (method git-fetch)
130 (uri (git-reference
131 (url "https://github.com/hoedown/hoedown")
132 (commit version)))
133 (file-name (git-file-name name version))
134 (sha256
135 (base32
136 "1kr3hxjg2dgmwy9738qgj3sh3f5cygx0zxskkfhrg7x19bq9yd26"))))
137 (build-system gnu-build-system)
138 (arguments
139 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
140 #:phases (modify-phases %standard-phases
141 (delete 'configure)) ; no configure script
142 #:test-target "test"))
143 (native-inputs
144 `(("python" ,python-minimal-wrapper)
145 ("tidy" ,tidy-html)))
146 (synopsis "Markdown processing library")
147 (description "Hoedown is a standards compliant, fast, secure markdown
148processing library written in C.")
149 (home-page "https://github.com/hoedown/hoedown")
150 (license license:expat)))
151
152(define-public markdown
153 (package
154 (name "markdown")
155 (version "1.0.1")
156 (source
157 (origin
158 (method url-fetch)
159 (uri (string-append
160 "http://daringfireball.net/projects/downloads/"
161 (string-capitalize name) "_" version ".zip"))
162 (sha256
163 (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835"))))
164 (build-system trivial-build-system)
165 (arguments
166 '(#:modules ((guix build utils))
167 #:builder
168 (begin
169 (use-modules (guix build utils))
170 (let ((source (assoc-ref %build-inputs "source"))
171 (out (assoc-ref %outputs "out"))
172 (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
173 (unzip (search-input-file %build-inputs "/bin/unzip")))
174 (mkdir-p out)
175 (with-directory-excursion out
176 (invoke unzip source)
177 (mkdir "bin")
178 (mkdir-p "share/doc")
179 (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown")
180 (rename-file "Markdown_1.0.1/Markdown Readme.text"
181 "share/doc/README")
182 (patch-shebang "bin/markdown" (list perlbd))
183 (delete-file-recursively "Markdown_1.0.1"))
184 #t))))
185 (native-inputs (list unzip))
186 (inputs (list perl))
187 (home-page "http://daringfireball.net/projects/markdown")
188 (synopsis "Text-to-HTML conversion tool")
189 (description
190 "Markdown is a text-to-HTML conversion tool for web writers. It allows
191you to write using an easy-to-read, easy-to-write plain text format, then
192convert it to structurally valid XHTML (or HTML).")
193 (license (license:non-copyleft "file://License.text"
194 "See License.text in the distribution."))))
195
196(define-public latexml
197 (package
198 (name "latexml")
199 (version "0.8.8")
200 (source
201 (origin
202 (method git-fetch)
203 (uri (git-reference
204 (url "https://github.com/brucemiller/LaTeXML")
205 (commit (string-append "v" version))))
206 (file-name (git-file-name name version))
207 (sha256
208 (base32
209 "0lppm66fxadsbn73xh0nfqdi4y6d9j6xph1slvlp6ynrfbnn5p6s"))))
210 (build-system perl-build-system)
211 (arguments
212 (let ((wraplibs
213 (list "perl-archive-zip"
214 "perl-common-sense"
215 "perl-db-file"
216 "perl-encode-locale"
217 "perl-file-which"
218 "perl-getopt-long"
219 "perl-http-date"
220 "perl-http-message"
221 "perl-image-magick"
222 "perl-image-size"
223 "perl-io-string"
224 "perl-json-xs"
225 "perl-libwww"
226 "perl-mime-base64"
227 "perl-parse-recdescent"
228 "perl-pod-parser"
229 "perl-text-unidecode"
230 "perl-time-hires"
231 "perl-try-tiny"
232 "perl-types-serialiser"
233 "perl-uri"
234 "perl-xml-libxml"
235 "perl-xml-libxslt"
236 "perl-xml-sax-base")))
237 (list
238 ;; some tests skip due to missing dependencies
239 #:phases
240 #~(modify-phases %standard-phases
241 (add-after 'install 'find-itself
242 ;; Fix run-time 'Can't locate [].pm in @INC' failure and remove
243 ;; need for extensive set of propagated inputs
244 (lambda* (#:key inputs outputs #:allow-other-keys)
245 (with-directory-excursion (string-append #$output "/bin")
246 (for-each
247 (lambda* (program)
248 (wrap-program program
249 `("PERL5LIB" ":" prefix
250 (,(string-append #$output "/lib/perl5/site_perl")
251 ,#$@(map (lambda (in)
252 (file-append
253 (this-package-input in) "/lib/perl5/site_perl"))
254 wraplibs)))))
255 (find-files "." ".*")))))))))
256 (inputs
257 (list bash-minimal
258 libxml2
259 libxslt
260 perl
261 perl-archive-zip
262 perl-common-sense
263 perl-db-file
264 perl-encode-locale
265 perl-file-which
266 perl-getopt-long
267 perl-http-date
268 perl-http-message
269 perl-image-magick
270 perl-image-size
271 perl-io-string
272 perl-json-xs
273 perl-libwww
274 perl-mime-base64
275 perl-parse-recdescent
276 perl-pod-parser
277 perl-text-unidecode
278 perl-time-hires
279 perl-try-tiny
280 perl-types-serialiser
281 perl-uri
282 perl-xml-libxml
283 perl-xml-libxslt
284 perl-xml-sax-base))
285 (native-inputs
286 (list texlive-bin
287 perl-test-more-utf8
288 perl-extutils-manifest
289 perl-data-dumper
290 perl-ipc-run3
291 perl-file-temp))
292 (home-page "https://math.nist.gov/~BMiller/LaTeXML/")
293 (synopsis "LaTeX to XML, HTML, MathML, epub and Jats converter")
294 (description "This package provides a LaTeX converter, with the following goals:
295@itemize
296@item Faithful emulation of TEX’s behaviour;
297@item Easily extensible;
298@item Lossless, preserving both semantic and presentation cues;
299@item Use an abstract LATEX-like, extensible, document type;
300@item Infer the semantics of mathematical content
301@end itemize")
302 (license license:cc0)))
303
304(define-public lowdown
305 (package
306 (name "lowdown")
307 (version "3.1.1")
308 (source
309 (origin
310 (method git-fetch)
311 (uri
312 (git-reference
313 (url "https://github.com/kristapsdz/lowdown")
314 (commit (string-append "VERSION_"
315 (string-map (lambda (ch)
316 (if (char=? ch #\.) #\_ ch))
317 version)))))
318 (file-name (git-file-name name version))
319 (sha256 (base32 "0vs4fp55p79xj8r2j9v8dysrcsz1yw8jda30wn0zcp3y6hfms9cv"))))
320 (build-system gnu-build-system)
321 (arguments
322 (list
323 #:test-target "regress"
324 #:phases
325 #~(modify-phases %standard-phases
326 (add-after 'configure 'patch-Makefile
327 (lambda _
328 (substitute* "Makefile.configure"
329 (("^(CFLAGS[[:space:]]+=[[:space:]]+)" all)
330 (string-append all "-fPIC ")))))
331 (replace 'configure
332 (lambda _
333 (invoke "./configure"
334 (string-append "PREFIX=" #$output)
335 (string-append "MANDIR=" #$output "/share/man"))))
336 (replace 'build
337 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
338 (apply invoke "bmake"
339 (append make-flags
340 (if parallel-build?
341 (list "-j" (number->string
342 (parallel-job-count)))
343 '())))))
344 (replace 'check
345 (lambda* (#:key test-target make-flags parallel-build?
346 #:allow-other-keys)
347 (apply invoke "bmake" test-target
348 (append make-flags
349 (if parallel-build?
350 (list "-j" (number->string
351 (parallel-job-count)))
352 '())))))
353 (replace 'install
354 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
355 (apply invoke "bmake" "install" "install_libs"
356 (append make-flags
357 (if parallel-build?
358 (list "-j" (number->string
359 (parallel-job-count)))
360 '()))))))))
361 (native-inputs (list bmake which))
362 (home-page "https://kristaps.bsd.lv/lowdown/")
363 (synopsis "Simple Markdown translator")
364 (description "Lowdown is a Markdown translator producing HTML5, roff
365documents in the ms and man formats, LaTeX, gemini, and terminal output.")
366 (license license:isc)))
367
368(define-public discount
369 (package
370 (name "discount")
371 (version "3.0.2.0")
372 (source (origin
373 (method url-fetch)
374 (uri (string-append
375 "http://www.pell.portland.or.us/~orc/Code/"
376 "discount/discount-" version ".tar.bz2"))
377 (sha256
378 (base32
379 "0x5ny42bc6dl9njsy7y010fwcp4ggprfn96gyb06zfy28pkxjis7"))))
380 (build-system gnu-build-system)
381 (arguments
382 `(#:test-target "test"
383 #:parallel-build? #f ; libmarkdown won't be built in time
384 #:make-flags (list
385 (string-append "LFLAGS=-L. -Wl,-rpath="
386 (assoc-ref %outputs "out") "/lib"))
387 #:phases
388 (modify-phases %standard-phases
389 (add-before 'configure 'set-AC_PATH
390 (lambda _
391 ;; The default value is not suitable, so override using an
392 ;; environment variable. This just affects the build, and not the
393 ;; resulting store item.
394 (setenv "AC_PATH" (getenv "PATH"))
395 #t))
396 (replace 'configure
397 (lambda* (#:key inputs outputs #:allow-other-keys)
398 (let ((out (assoc-ref outputs "out")))
399 (setenv "CC" (string-append
400 ,(cc-for-target)
401 " -g -O2"
402 " -Wno-error=incompatible-pointer-types"))
403 ;; The ‘validate-runpath’ phase fails otherwise.
404 (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib"))
405 (invoke "./configure.sh"
406 (string-append "--prefix=" out)
407 "--shared")))))))
408 (native-inputs
409 (list pkg-config))
410 (synopsis "Markdown processing library, written in C")
411 (description
412 "Discount is a markdown implementation, written in C. It provides a
413@command{markdown} command, and a library.")
414 (home-page "https://www.pell.portland.or.us/~orc/Code/discount/")
415 (license license:bsd-3)))
416
417(define-public discount-2
418 (package/inherit discount
419 (version "2.2.7d")
420 (source (origin
421 (method url-fetch)
422 (uri (string-append
423 "http://www.pell.portland.or.us/~orc/Code/"
424 "discount/discount-" version ".tar.bz2"))
425 (sha256
426 (base32
427 "0lkvnysnnaw431dam3b8b1f0ln1iscas5wcgw0bxx35fjqg098hj"))))))
428
429(define-public perl-text-markdown
430 (package
431 (name "perl-text-markdown")
432 (version "1.000031")
433 (source
434 (origin
435 (method url-fetch)
436 (uri (string-append
437 "mirror://cpan/authors/id/B/BO/BOBTFISH/Text-Markdown-" version
438 ".tar.gz"))
439 (sha256
440 (base32 "06y79lla8adkqhrs41xdddqjs81dcrh266b50mfbg37bxkawd4f1"))))
441 (build-system perl-build-system)
442 (native-inputs (list perl-list-moreutils
443 perl-module-install
444 perl-test-differences
445 perl-test-exception))
446 (home-page "https://metacpan.org/release/Text-Markdown")
447 (synopsis "Convert Markdown syntax to (X)HTML")
448 (description "@code{Text::Markdown} is a Perl module that provides an
449alternate implementation of the Markdown implementation by John Gruber (see
450the markdown package). It is a slower implementation, but better
451maintained.")
452 (license license:bsd-3)))
453
454(define-public perl-text-markdown-discount
455 (package
456 (name "perl-text-markdown-discount")
457 (version "0.11")
458 (source
459 (origin
460 (method url-fetch)
461 (uri (string-append
462 "mirror://cpan/authors/id/S/SE/SEKIMURA/Text-Markdown-Discount-"
463 version
464 ".tar.gz"))
465 (sha256
466 (base32
467 "1xx7v3wnla7m6wa3h33whxw3vvincaicg4yra1b9wbzf2aix9rnw"))
468 (patches
469 (search-patches "perl-text-markdown-discount-unbundle.patch"))))
470 (build-system perl-build-system)
471 (arguments
472 `(#:phases
473 (modify-phases %standard-phases
474 (add-before 'build 'set-ldflags
475 (lambda* (#:key inputs #:allow-other-keys)
476 (substitute* "Makefile"
477 (("OTHERLDFLAGS = ")
478 (string-append
479 "OTHERLDFLAGS = -lmarkdown -Wl,-rpath="
480 (assoc-ref inputs "discount")
481 "/lib")))
482 #t)))))
483 (inputs
484 (list discount-2))
485 (home-page
486 "https://metacpan.org/release/Text-Markdown-Discount")
487 (synopsis
488 "Fast function for converting Markdown to HTML using Discount")
489 (description
490 "Text::Markdown::Discount is a Perl extension to the Discount markdown
491implementation.
492
493@example
494 use Text::Markdown::Discount;
495 my $html = markdown($text)
496@end example")
497 (license license:perl-license)))
498
499(define-public python-cmarkgfm
500 (package
501 (name "python-cmarkgfm")
502 (version "2024.11.20")
503 (source (origin
504 (method url-fetch)
505 (uri (pypi-uri "cmarkgfm" version))
506 (sha256
507 (base32
508 "0siwyyfgp7v5vw6xd4zy2cph6dp9f3c5xvyd2draba3m37v1rl2x"))
509 (modules '((guix build utils)))
510 (snippet
511 '(begin
512 ;; Delete bundled cmark and generated headers.
513 (for-each delete-file-recursively
514 '("third_party/cmark" "generated"))))))
515 (build-system pyproject-build-system)
516 (arguments
517 (list #:phases
518 #~(modify-phases %standard-phases
519 (add-after 'unpack 'copy-cmark-gfm
520 (lambda _
521 ;; This package needs the cmark-gfm source files
522 ;; to generate FFI bindings.
523 (copy-recursively #+(package-source (this-package-input
524 "cmark-gfm"))
525 "third_party/cmark")))
526 (add-after 'unpack 'install-cmark-headers
527 (lambda* (#:key inputs #:allow-other-keys)
528 ;; XXX: Loosely based on 'regenerate' from noxfile.py.
529 (let ((version.h (search-input-file
530 inputs "/include/cmark-gfm_version.h")))
531 (for-each (lambda (file)
532 (install-file file "generated/unix/"))
533 (cons version.h
534 (find-files (dirname version.h)
535 "_export\\.h$")))))))))
536 (native-inputs (list python-pytest python-setuptools))
537 (inputs (list cmark-gfm))
538 (propagated-inputs (list python-cffi))
539 (home-page "https://github.com/theacodes/cmarkgfm")
540 (synopsis "Python bindings for GitHub's fork of cmark")
541 (description
542 "This package provides a minimal set of Python bindings for the
543GitHub cmark fork (@code{cmark-gfm}).")
544 (license license:expat)))
545
546(define-public python-markdownify
547 (package
548 (name "python-markdownify")
549 (version "1.1.0")
550 (source
551 (origin
552 (method git-fetch) ; no tests in PyPI
553 (uri (git-reference
554 (url "https://github.com/matthewwithanm/python-markdownify")
555 (commit version)))
556 (file-name (git-file-name name version))
557 (sha256
558 (base32 "09gh3grgiaiyhgpd1fias9xac45d4zw37ikkzyaavsixfzg0akbr"))))
559 (build-system pyproject-build-system)
560 (native-inputs (list python-pytest python-setuptools python-wheel))
561 (propagated-inputs (list python-beautifulsoup4 python-six))
562 (home-page "https://github.com/matthewwithanm/python-markdownify")
563 (synopsis "Converts HTML to Markdown")
564 (description "This package provides @code{markdownify} a Python library to
565convert HTML to Markdown.")
566 (license license:expat)))
567
568(define-public cmark
569 (package
570 (name "cmark")
571 (version "0.31.2")
572 (source (origin
573 (method git-fetch)
574 (uri (git-reference
575 (url "https://github.com/commonmark/cmark")
576 (commit version)))
577 (file-name (git-file-name name version))
578 (sha256
579 (base32
580 "1nidwvh9hm0fvdq7590qrayiazdx9hidcyha9hry2wlllpp0pfkp"))
581 (modules '((guix build utils)))
582 (snippet
583 '(begin
584 ;; Delete generated files.
585 (delete-file "src/case_fold.inc")
586 (delete-file "src/entities.inc")
587 (delete-file "src/scanners.c")))))
588 (build-system cmake-build-system)
589 (arguments
590 (list
591 #:phases
592 #~(modify-phases %standard-phases
593 (add-before 'configure 'generate
594 (lambda _
595 ;; Remove clang-format invocation.
596 (substitute* "Makefile"
597 (("\\$\\(CLANG_FORMAT\\) \\$@")
598 ""))
599 (invoke "make" "src/case_fold.inc" "src/entities.inc"
600 "src/scanners.c"))))))
601 (native-inputs (list python re2c))
602 (synopsis "CommonMark Markdown reference implementation")
603 (description
604 "CommonMark is a strongly defined, highly compatible specification of
605Markdown. @code{cmark} is the C reference implementation of CommonMark. It
606provides the @code{libcmark} shared library for parsing CommonMark to an
607abstract syntax tree (@dfn{AST}) and rendering the document as HTML, groff man,
608LaTeX, CommonMark, or an XML representation of the AST. It also provides the
609command-line program @command{cmark} for parsing and rendering CommonMark.")
610 (home-page "https://commonmark.org")
611 ;; cmark is distributed with a BSD-2 license, but some components are Expat
612 ;; licensed. The CommonMark specification is Creative Commons CC-BY-SA 4.0
613 ;; licensed. See 'COPYING' in the source distribution for more information.
614 (license (list license:bsd-2 license:expat license:cc-by-sa4.0))))
615
616(define-public perl-commonmark
617 (package
618 (name "perl-commonmark")
619 (version "0.290000")
620 (source (origin
621 (method url-fetch)
622 (uri (string-append
623 "mirror://cpan/authors/id/N/NW/NWELLNHOF/CommonMark-"
624 version ".tar.gz"))
625 (sha256
626 (base32
627 "1pgaqa4f00i9r5z7l9xiya0q51ysq0nhpvgr0f3rza3cxz1v80d5"))))
628 (build-system perl-build-system)
629 (arguments
630 `(#:make-maker-flags
631 ;; MakeMaker ignores LIBRARY_PATH.
632 (list (format #f "LIBS=-L~a/lib -lcmark"
633 (assoc-ref %build-inputs "cmark")))))
634 (inputs (list cmark perl-test-leaktrace perl-devel-checklib
635 perl-module-build))
636 (home-page "https://metacpan.org/release/CommonMark")
637 (synopsis "Interface to the CommonMark C library")
638 (description
639 "This module is an XS wrapper around the official
640CommonMark C library libcmark. It closely follows the original API.")
641 (license license:perl-license)))
642
643(define-public cmark-gfm
644 (package
645 (inherit cmark)
646 (name "cmark-gfm")
647 (version "0.29.0.gfm.13")
648 (home-page "https://github.com/github/cmark-gfm")
649 (source (origin
650 (method git-fetch)
651 (uri (git-reference (url home-page) (commit version)))
652 (file-name (git-file-name name version))
653 (sha256
654 (base32
655 "1apy9i76rgs0bmgdlpjszv0fpqhlap2s12m68wvnsv8j3fsqc90y"))))
656 (arguments
657 (list #:phases #~(modify-phases %standard-phases
658 (add-after 'install 'install-config
659 (lambda _
660 ;; XXX: cmark-gfm-core-extensions.h includes this file.
661 (install-file "src/config.h"
662 (string-append #$output "/include")))))))
663 (synopsis "GitHub flavored CommonMark")
664 (description
665 "This package is a fork of @code{cmark}, with GitHub-specific Markdown
666additions.")))
667
668(define-public smu
669 (package
670 (name "smu")
671 (version "1.5")
672 (source
673 (origin
674 (method git-fetch)
675 (uri (git-reference
676 (url "https://github.com/Gottox/smu")
677 (commit (string-append "v" version))))
678 (file-name (git-file-name name version))
679 (sha256
680 (base32 "1jm7lhnzjx4q7gcwlkvsbffcy0zppywyh50d71ami6dnq182vvcc"))))
681 (build-system gnu-build-system)
682 (arguments
683 (list #:make-flags
684 #~(list (string-append "CC=" #$(cc-for-target))
685 (string-append "PREFIX=" #$output))
686 #:tests? #f ; no tests included
687 #:phases
688 #~(modify-phases %standard-phases
689 (delete 'configure))))
690 (home-page "https://github.com/Gottox/smu")
691 (synopsis "Simple markup")
692 (description
693 "Smu is a very simple and minimal markup language. It is
694designed for using in wiki-like environments. Smu makes it very
695easy to write your documents on the fly and convert them into HTML.
696Smu is capable to parse very large documents. As long as you avoid an huge
697amount of indents it scales just great.
698
699Smu was started as a rewrite of Markdown but became something more
700lightweight and consistent. The biggest difference between Markdown
701and smu is that smu doesn't support reference style links.")
702 (license license:x11)))
703
704(define-public md4c
705 (package
706 (name "md4c")
707 (version "0.4.8")
708 (source
709 (origin
710 (method git-fetch)
711 (uri (git-reference
712 (url "https://github.com/mity/md4c/")
713 (commit (string-append "release-" version))))
714 (file-name (git-file-name name version))
715 (sha256
716 (base32 "12pdh4rfjc3b0cblj5nz3jksr2376lx8ay0vw5dwa1s97q09pczq"))))
717 (build-system cmake-build-system)
718 (arguments '(#:tests? #f))
719 (home-page "https://github.com/mity/md4c/")
720 (synopsis "C Markdown parser compliant to CommonMark")
721 (description "MD4C is a C Markdown parser with a
722SAX-like interface. It is compliant to the CommonMark specification,
723with a few extensions.")
724 (license license:expat)))
725
726(define-public mdview-mtx
727 (package
728 (name "mdview-mtx")
729 (version "2025.10.30")
730 (source
731 (origin
732 (method git-fetch)
733 (uri (git-reference
734 (url "https://github.com/step-/mdview")
735 (commit version)))
736 (file-name (git-file-name name version))
737 (sha256
738 (base32 "0d9v7arbiw9q8bcfkak6v257f25pjigdm67fvw8f5xqbkmkjh0wj"))))
739 (build-system meson-build-system)
740 (inputs (list gtk+ md4c))
741 (native-inputs (list `(,glib "bin") ;for glib-compile-resources
742 pkg-config))
743 (home-page "https://github.com/step-/mdview")
744 (synopsis "GTK markdown viewer and CLI converter")
745 (description
746 "MDVIEW MTX is a graphical Markdown viewer and CLI converter
747supporting the CommonMark specification. Features include page and
748directory search, document and link navigation, hotkeys, and
749one-click export to web browser.")
750 (license (list license:gpl2 license:expat))))
751
752(define-public python-mistletoe
753 (package
754 (name "python-mistletoe")
755 (version "1.5.1")
756 (source
757 (origin
758 (method git-fetch)
759 (uri (git-reference
760 (url "https://github.com/miyuchina/mistletoe")
761 (commit (string-append "v" version))))
762 (file-name (git-file-name name version))
763 (sha256
764 (base32 "1r279m8c0rx2vm7bhnax0q5zfzz3yf44qn057wa9bqng3nz0ls47"))))
765 (build-system pyproject-build-system)
766 (native-inputs
767 (list python-parameterized
768 python-pytest
769 python-setuptools))
770 (propagated-inputs
771 (list python-pygments))
772 (home-page "https://github.com/miyuchina/mistletoe")
773 (synopsis "Extensible Markdown parser in pure Python")
774 (description
775 "The @code{mistletoe} Markdown parser is a CommonMark-compliant Markdown
776parser that supports definitions of custom tokens.
777
778Parsing Markdown into an abstract syntax tree also allows @code{mistletoe} to
779swap out renderers for different output formats, without touching any of the
780core components.")
781 (license license:expat)))