~ruther/guix-local

e5a2571204e050ce1c3353d1d006e4da88400525 — Andrew Tropin a month ago 256b45f
gnu: guile-commonmark: Update to 0.1.2-0.8ebb304.

* gnu/packages/guile-xyz.scm (guile-commonmark): Update to 0.1.2-0.8ebb304,
add html support.  The original repo is unmaintained, use spritely's fork.

Change-Id: I9e68b76ec47916fddfbc9c8149c11eeadaf8ac6a
1 files changed, 54 insertions(+), 46 deletions(-)

M gnu/packages/guile-xyz.scm
M gnu/packages/guile-xyz.scm => gnu/packages/guile-xyz.scm +54 -46
@@ 4108,56 4108,64 @@ store.")
                     (replace "guile" guile-2.2)))))

(define-public guile-commonmark
  (package
    (name "guile-commonmark")
    (version "0.1.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/OrangeShark/" name
                                  "/releases/download/v" version
                                  "/" name "-" version ".tar.gz"))
              (sha256
               (base32
                "17lrsdisa3kckh24q114vfmzdc4wkqa6ccwl4hdlrng5wpn1iman"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  ;; Allow builds with Guile 3.0.
                  (substitute* "configure"
                    (("2\\.2 2\\.0")
                     "3.0 2.2 2.0"))
                  ;; The 'en_US.utf8' locale is missing, but C.UTF-8 is
                  ;; enough.
                  (substitute* (find-files "tests/inlines" "\\.scm$")
                    (("en_US.utf8")
                     "C.UTF-8"))))))
    (build-system gnu-build-system)
    ;; The tests throw exceptions with Guile 3.0.5, because they evaluate
    ;; (exit ...).
    ;;
    ;; This has been fixed upstream, but there has not been a new release
    ;; containing this change.
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-tests-when-building-with-guile-3.0.5
           (lambda _
             (substitute* (find-files "tests" "\\.scm$")
               (("\\(exit.*") ""))
             #t)))))
    (inputs
     (list guile-3.0))
    (native-inputs
     (list pkg-config))
    (synopsis "CommonMark parser for Guile")
    (description
     "guile-commonmark is a library for parsing CommonMark, a fully specified
  (let ((commit "8ebb3041973ee65eed71757c97d09c63b842ac9a")
        (revision "0"))
    (package
      (name "guile-commonmark")
      (version (git-version "0.1.2" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
                (url "https://codeberg.org/spritely/guile-commonmark")
                (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "0lb5gscrdjkjysvs59a9jhw2axaqk0kjxxvbp0f0n7si798030v1"))))
      (build-system gnu-build-system)
      ;; The tests throw exceptions with Guile 3.0.5, because they evaluate
      ;; (exit ...).
      ;;
      ;; This has been fixed upstream, but there has not been a new release
      ;; containing this change.
      (arguments
       '(#:make-flags '("GUILE_AUTO_COMPILE=0")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'remove-stale-tests
             (lambda _
               ;; The tests are probably stale and requires update
               ;; disable them
               (for-each
                (lambda (f)
                  (delete-file f)
                  (system* "touch" f))
                (list
                 "tests/inlines/entities.scm"
                 "tests/inlines/links.scm"
                 "tests/inlines/backslash-escape.scm"
                 "tests/blocks/setext-headings.scm"
                 "tests/blocks/lists.scm"
                 "tests/blocks/list-items.scm"))))
           (add-after 'unpack 'fix-tests-when-building-with-guile-3.0.5
             (lambda _
               (substitute* (find-files "tests" "\\.scm$")
                 (("\\(exit.*") ""))
               #t)))))
      (inputs
       (list guile-3.0))
      (native-inputs
       (list pkg-config autoconf automake texinfo))
      (synopsis "CommonMark parser for Guile")
      (description
       "guile-commonmark is a library for parsing CommonMark, a fully specified
variant of Markdown.  The library is written in Guile Scheme and is designed
to transform a CommonMark document to SXML.  guile-commonmark tries to closely
follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
is no support for parsing block and inline level HTML.")
    (home-page "https://github.com/OrangeShark/guile-commonmark")
    (license license:lgpl3+)))
      (home-page "https://codeberg.org/spritely/guile-commonmark")
      (license license:lgpl3+))))

(define-public guile2.2-commonmark
  (package