| 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 | (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)) |
| 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
|
| 113 | frundis language, a semantic markup language primarily intended for supporting
|
| 114 | authoring of novels, but also well suited for many other kinds of documents.
|
| 115 | The frundis tool can export documents to LaTeX, XHTML 5, EPUB, markdown and
|
| 116 | groff mom.
|
| 117 |
|
| 118 | The language has a focus on simplicity. It provides a few flexible built-in
|
| 119 | macros with extensible semantics. It strives to provide good error messages
|
| 120 | and catch typos, while still allowing one to finely control output for a
|
| 121 | specific 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)) |
| 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
|
| 148 | processing 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
|
| 191 | you to write using an easy-to-read, easy-to-write plain text format, then
|
| 192 | convert 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 | |
| 239 | #:phases
|
| 240 | #~(modify-phases %standard-phases
|
| 241 | (add-after 'install 'find-itself
|
| 242 | |
| 243 | |
| 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
|
| 365 | documents 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 |
| 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 | |
| 392 | |
| 393 | |
| 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 | |
| 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
|
| 449 | alternate implementation of the Markdown implementation by John Gruber (see
|
| 450 | the markdown package). It is a slower implementation, but better
|
| 451 | maintained.")
|
| 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
|
| 491 | implementation.
|
| 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 | |
| 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 | |
| 522 | |
| 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 | |
| 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
|
| 543 | GitHub 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) |
| 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
|
| 565 | convert 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 | |
| 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 | |
| 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
|
| 605 | Markdown. @code{cmark} is the C reference implementation of CommonMark. It
|
| 606 | provides the @code{libcmark} shared library for parsing CommonMark to an
|
| 607 | abstract syntax tree (@dfn{AST}) and rendering the document as HTML, groff man,
|
| 608 | LaTeX, CommonMark, or an XML representation of the AST. It also provides the
|
| 609 | command-line program @command{cmark} for parsing and rendering CommonMark.")
|
| 610 | (home-page "https://commonmark.org")
|
| 611 | |
| 612 | |
| 613 | |
| 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 | |
| 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
|
| 640 | CommonMark 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 | |
| 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
|
| 666 | additions.")))
|
| 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 |
| 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
|
| 694 | designed for using in wiki-like environments. Smu makes it very
|
| 695 | easy to write your documents on the fly and convert them into HTML.
|
| 696 | Smu is capable to parse very large documents. As long as you avoid an huge
|
| 697 | amount of indents it scales just great.
|
| 698 |
|
| 699 | Smu was started as a rewrite of Markdown but became something more
|
| 700 | lightweight and consistent. The biggest difference between Markdown
|
| 701 | and 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
|
| 722 | SAX-like interface. It is compliant to the CommonMark specification,
|
| 723 | with 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") |
| 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
|
| 747 | supporting the CommonMark specification. Features include page and
|
| 748 | directory search, document and link navigation, hotkeys, and
|
| 749 | one-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
|
| 776 | parser that supports definitions of custom tokens.
|
| 777 |
|
| 778 | Parsing Markdown into an abstract syntax tree also allows @code{mistletoe} to
|
| 779 | swap out renderers for different output formats, without touching any of the
|
| 780 | core components.")
|
| 781 | (license license:expat)))
|